diff --git a/_apps/monitoring.yaml b/_apps/monitoring.yaml new file mode 100644 index 0000000..9fffdc1 --- /dev/null +++ b/_apps/monitoring.yaml @@ -0,0 +1,23 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: monitoring + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: monitoring + server: https://kubernetes.default.svc + project: default + source: + path: monitoring/manifests + repoURL: https://git.tbrnt.ch/tobru/gitops-tbrnt.git + targetRevision: HEAD + directory: + recurse: true +--- +apiVersion: v1 +kind: Namespace +metadata: + name: monitoring diff --git a/monitoring/README.md b/monitoring/README.md new file mode 100644 index 0000000..69aa3ee --- /dev/null +++ b/monitoring/README.md @@ -0,0 +1,17 @@ +# Cluster Monitoring + +Source: [kube-prometheus](https://github.com/coreos/kube-prometheus). + +## Build + +``` +docker run --rm -v $(pwd):$(pwd) --workdir $(pwd) quay.io/coreos/jsonnet-ci ./build.sh monitoring.jsonnet +``` + +## Update libs + +``` +docker run --rm -v $(pwd):$(pwd) --workdir $(pwd) quay.io/coreos/jsonnet-ci jb update +``` + +Then build again, obviously diff --git a/monitoring/build.sh b/monitoring/build.sh new file mode 100755 index 0000000..bf45a0b --- /dev/null +++ b/monitoring/build.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# This script uses arg $1 (name of *.jsonnet file to use) to generate the manifests/*.yaml files. + +set -e +set -x +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +# Make sure to start with a clean 'manifests' dir +rm -rf manifests +mkdir -p manifests/setup + +jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {} + diff --git a/monitoring/jsonnetfile.json b/monitoring/jsonnetfile.json new file mode 100644 index 0000000..44c6d85 --- /dev/null +++ b/monitoring/jsonnetfile.json @@ -0,0 +1,14 @@ +{ + "dependencies": [ + { + "name": "kube-prometheus", + "source": { + "git": { + "remote": "https://github.com/coreos/kube-prometheus", + "subdir": "jsonnet/kube-prometheus" + } + }, + "version": "master" + } + ] +} diff --git a/monitoring/jsonnetfile.lock.json b/monitoring/jsonnetfile.lock.json new file mode 100644 index 0000000..51a9db9 --- /dev/null +++ b/monitoring/jsonnetfile.lock.json @@ -0,0 +1,158 @@ +{ + "dependencies": [ + { + "name": "etcd-mixin", + "source": { + "git": { + "remote": "https://github.com/coreos/etcd", + "subdir": "Documentation/etcd-mixin" + } + }, + "version": "c94782cd55fb44df43574505db9ac1c1b7d49c00", + "sum": "Ko3qhNfC2vN/houLh6C0Ryacjv70gl0DVPGU/PQ4OD0=" + }, + { + "name": "grafana", + "source": { + "git": { + "remote": "https://github.com/brancz/kubernetes-grafana", + "subdir": "grafana" + } + }, + "version": "539a90dbf63c812ad0194d8078dd776868a11c81", + "sum": "b8faWX1qqLGyN67sA36oRqYZ5HX+tHBRMPtrWRqIysE=" + }, + { + "name": "grafana-builder", + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs", + "subdir": "grafana-builder" + } + }, + "version": "7ac7da1a0fe165b68cdb718b2521b560d51bd1f4", + "sum": "slxrtftVDiTlQK22ertdfrg4Epnq97gdrLI63ftUfaE=" + }, + { + "name": "grafonnet", + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet-lib", + "subdir": "grafonnet" + } + }, + "version": "c459106d2d2b583dd3a83f6c75eb52abee3af764", + "sum": "CeM3LRgUCUJTolTdMnerfMPGYmhClx7gX5ajrQVEY2Y=" + }, + { + "name": "ksonnet", + "source": { + "git": { + "remote": "https://github.com/ksonnet/ksonnet-lib", + "subdir": "" + } + }, + "version": "0d2f82676817bbf9e4acf6495b2090205f323b9f", + "sum": "h28BXZ7+vczxYJ2sCt8JuR9+yznRtU/iA6DCpQUrtEg=" + }, + { + "name": "kube-prometheus", + "source": { + "git": { + "remote": "https://github.com/coreos/kube-prometheus", + "subdir": "jsonnet/kube-prometheus" + } + }, + "version": "8b0b0bc51435a5f7742307c86235273ab568dffe", + "sum": "NJN0f7veWXOJyM3PNDM6vJQEzpkDxOchU9EVnoSRe6E=" + }, + { + "name": "kube-state-metrics", + "source": { + "git": { + "remote": "https://github.com/kubernetes/kube-state-metrics", + "subdir": "jsonnet/kube-state-metrics" + } + }, + "version": "30c152b805781b5571ed25b914cc66c615964ffb", + "sum": "cJjGZaLBjcIGrLHZLjRPU9c3KL+ep9rZTb9dbALSKqA=" + }, + { + "name": "kube-state-metrics-mixin", + "source": { + "git": { + "remote": "https://github.com/kubernetes/kube-state-metrics", + "subdir": "jsonnet/kube-state-metrics-mixin" + } + }, + "version": "30c152b805781b5571ed25b914cc66c615964ffb", + "sum": "E1GGavnf9PCWBm4WVrxWnc0FIj72UcbcweqGioWrOdU=" + }, + { + "name": "kubernetes-mixin", + "source": { + "git": { + "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin", + "subdir": "" + } + }, + "version": "b2d7f762bd22be3ba5e7d54a1fcecfe1092f214b", + "sum": "NqrJQnQnRDzkCbrHg7L1zX8XPAzfoE4DS2XBEj6WC8g=" + }, + { + "name": "node-mixin", + "source": { + "git": { + "remote": "https://github.com/prometheus/node_exporter", + "subdir": "docs/node-mixin" + } + }, + "version": "92ea3c6a3f0ea2d1d55de168e65037e2313f9940", + "sum": "7vEamDTP9AApeiF4Zu9ZyXzDIs3rYHzwf9k7g8X+wsg=" + }, + { + "name": "prometheus", + "source": { + "git": { + "remote": "https://github.com/prometheus/prometheus", + "subdir": "documentation/prometheus-mixin" + } + }, + "version": "40dd13b07420a044cc1b0ca57f639c572583d9c1", + "sum": "u1YS9CVuBTcw2vks0PZbLb1gtlI/7bVGDVBZsjWFLTw=" + }, + { + "name": "prometheus-operator", + "source": { + "git": { + "remote": "https://github.com/coreos/prometheus-operator", + "subdir": "jsonnet/prometheus-operator" + } + }, + "version": "89f35ef22db0dc24c523bf8be473bcbcf9ac81f6", + "sum": "KCO153lAOWmWfoj3rQGhLB+8UmyvQ2Bghu/ewDqVum4=" + }, + { + "name": "promgrafonnet", + "source": { + "git": { + "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin", + "subdir": "lib/promgrafonnet" + } + }, + "version": "b2d7f762bd22be3ba5e7d54a1fcecfe1092f214b", + "sum": "VhgBM39yv0f4bKv8VfGg4FXkg573evGDRalip9ypKbc=" + }, + { + "name": "slo-libsonnet", + "source": { + "git": { + "remote": "https://github.com/metalmatze/slo-libsonnet", + "subdir": "slo-libsonnet" + } + }, + "version": "437c402c5f3ad86c3c16db8471f1649284fef0ee", + "sum": "2Zcyku1f558VrUpMaJnI78fahDksPLcS1idmxxwcQ7Q=" + } + ] +} diff --git a/monitoring/manifests/alertmanager-alertmanager.yaml b/monitoring/manifests/alertmanager-alertmanager.yaml new file mode 100644 index 0000000..87f98b3 --- /dev/null +++ b/monitoring/manifests/alertmanager-alertmanager.yaml @@ -0,0 +1,18 @@ +apiVersion: monitoring.coreos.com/v1 +kind: Alertmanager +metadata: + labels: + alertmanager: main + name: main + namespace: monitoring +spec: + baseImage: quay.io/prometheus/alertmanager + nodeSelector: + kubernetes.io/os: linux + replicas: 3 + securityContext: + fsGroup: 2000 + runAsNonRoot: true + runAsUser: 1000 + serviceAccountName: alertmanager-main + version: v0.20.0 diff --git a/monitoring/manifests/alertmanager-secret.yaml b/monitoring/manifests/alertmanager-secret.yaml new file mode 100644 index 0000000..ecd30d3 --- /dev/null +++ b/monitoring/manifests/alertmanager-secret.yaml @@ -0,0 +1,42 @@ +apiVersion: v1 +data: {} +kind: Secret +metadata: + name: alertmanager-main + namespace: monitoring +stringData: + alertmanager.yaml: |- + "global": + "resolve_timeout": "5m" + "inhibit_rules": + - "equal": + - "alertname" + "source_match": + "severity": "critical" + "target_match_re": + "severity": "warning|info" + - "equal": + - "alertname" + "source_match": + "severity": "warning" + "target_match_re": + "severity": "info" + "receivers": + - "name": "Default" + - "name": "Watchdog" + - "name": "Critical" + "route": + "group_by": + - "namespace" + "group_interval": "5m" + "group_wait": "30s" + "receiver": "Default" + "repeat_interval": "12h" + "routes": + - "match": + "alertname": "Watchdog" + "receiver": "Watchdog" + - "match": + "severity": "critical" + "receiver": "Critical" +type: Opaque diff --git a/monitoring/manifests/alertmanager-service.yaml b/monitoring/manifests/alertmanager-service.yaml new file mode 100644 index 0000000..df4c9ff --- /dev/null +++ b/monitoring/manifests/alertmanager-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + alertmanager: main + name: alertmanager-main + namespace: monitoring +spec: + ports: + - name: web + port: 9093 + targetPort: web + selector: + alertmanager: main + app: alertmanager + sessionAffinity: ClientIP diff --git a/monitoring/manifests/alertmanager-serviceAccount.yaml b/monitoring/manifests/alertmanager-serviceAccount.yaml new file mode 100644 index 0000000..5c06d5e --- /dev/null +++ b/monitoring/manifests/alertmanager-serviceAccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: alertmanager-main + namespace: monitoring diff --git a/monitoring/manifests/alertmanager-serviceMonitor.yaml b/monitoring/manifests/alertmanager-serviceMonitor.yaml new file mode 100644 index 0000000..548af0d --- /dev/null +++ b/monitoring/manifests/alertmanager-serviceMonitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: alertmanager + name: alertmanager + namespace: monitoring +spec: + endpoints: + - interval: 30s + port: web + selector: + matchLabels: + alertmanager: main diff --git a/monitoring/manifests/grafana-dashboardDatasources.yaml b/monitoring/manifests/grafana-dashboardDatasources.yaml new file mode 100644 index 0000000..22d4748 --- /dev/null +++ b/monitoring/manifests/grafana-dashboardDatasources.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +data: + datasources.yaml: ewogICAgImFwaVZlcnNpb24iOiAxLAogICAgImRhdGFzb3VyY2VzIjogWwogICAgICAgIHsKICAgICAgICAgICAgImFjY2VzcyI6ICJwcm94eSIsCiAgICAgICAgICAgICJlZGl0YWJsZSI6IGZhbHNlLAogICAgICAgICAgICAibmFtZSI6ICJwcm9tZXRoZXVzIiwKICAgICAgICAgICAgIm9yZ0lkIjogMSwKICAgICAgICAgICAgInR5cGUiOiAicHJvbWV0aGV1cyIsCiAgICAgICAgICAgICJ1cmwiOiAiaHR0cDovL3Byb21ldGhldXMtazhzLm1vbml0b3Jpbmcuc3ZjOjkwOTAiLAogICAgICAgICAgICAidmVyc2lvbiI6IDEKICAgICAgICB9CiAgICBdCn0= +kind: Secret +metadata: + name: grafana-datasources + namespace: monitoring +type: Opaque diff --git a/monitoring/manifests/grafana-dashboardDefinitions.yaml b/monitoring/manifests/grafana-dashboardDefinitions.yaml new file mode 100644 index 0000000..e3b2295 --- /dev/null +++ b/monitoring/manifests/grafana-dashboardDefinitions.yaml @@ -0,0 +1,33600 @@ +apiVersion: v1 +items: +- apiVersion: v1 + data: + apiserver.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(up{job=\"apiserver\", cluster=\"$cluster\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Up", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"2..\", cluster=\"$cluster\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"3..\", cluster=\"$cluster\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"4..\", cluster=\"$cluster\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"5..\", cluster=\"$cluster\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5xx", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "RPC Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{job=\"apiserver\", instance=~\"$instance\", verb!=\"WATCH\", cluster=\"$cluster\"}[5m])) by (verb, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Request duration 99th quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(workqueue_adds_total{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{name}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Work Queue Add Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(workqueue_depth{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{name}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Work Queue Depth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{name}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Work Queue Latency", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "etcd_helper_cache_entry_total{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ETCD Cache Entry Total", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(etcd_helper_cache_hit_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} hit", + "refId": "A" + }, + { + "expr": "sum(rate(etcd_helper_cache_miss_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} miss", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ETCD Cache Hit/Miss Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99,sum(rate(etcd_request_cache_get_duration_seconds_bucket{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} get", + "refId": "A" + }, + { + "expr": "histogram_quantile(0.99,sum(rate(etcd_request_cache_add_duration_seconds_bucket{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} miss", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "ETCD Cache Duration 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_resident_memory_bytes{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(process_cpu_seconds_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "go_goroutines{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Goroutines", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(apiserver_request_total, cluster)", + "refresh": 1, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(apiserver_request_total{job=\"apiserver\", cluster=\"$cluster\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / API server", + "uid": "09ec8aa1e996d6ffcd6817bbaff4db1b", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-apiserver + namespace: monitoring +- apiVersion: v1 + data: + cluster-total.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "columns": [ + { + "text": "Time", + "value": "Time" + }, + { + "text": "Value #A", + "value": "Value #A" + }, + { + "text": "Value #B", + "value": "Value #B" + }, + { + "text": "Value #C", + "value": "Value #C" + }, + { + "text": "Value #D", + "value": "Value #D" + }, + { + "text": "Value #E", + "value": "Value #E" + }, + { + "text": "Value #F", + "value": "Value #F" + }, + { + "text": "Value #G", + "value": "Value #G" + }, + { + "text": "Value #H", + "value": "Value #H" + }, + { + "text": "namespace", + "value": "namespace" + } + ], + "datasource": "$datasource", + "fill": 1, + "fontSize": "90%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "lines": true, + "linewidth": 1, + "minSpan": 24, + "nullPointMode": "null as zero", + "renderer": "flot", + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "spaceLength": 10, + "span": 24, + "styles": [ + { + "alias": "Time", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Time", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Current Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "d/8b7a8b326d7a6f1f04244066368c67af/kubernetes-networking-namespace-pods?orgId=1&refresh=30s&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Status", + "type": "table" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 6, + "panels": [ + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 9, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth History", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 10, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 12, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 15, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 50 + }, + "id": 16, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 59 + }, + "id": 17, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\".+\"}[$interval:$resolution])) by (namespace))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{namespace}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 59 + }, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + { + "targetBlank": true, + "title": "What is TCP Retransmit?", + "url": "https://accedian.com/enterprises/blog/network-packet-loss-retransmissions-and-duplicate-acknowledgements/" + } + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(rate(node_netstat_Tcp_RetransSegs[$interval:$resolution]) / rate(node_netstat_Tcp_OutSegs[$interval:$resolution])) by (instance))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of TCP Retransimts out of all sent segments", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 59 + }, + "id": 19, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [ + { + "targetBlank": true, + "title": "Why monitor SYN retransmits?", + "url": "https://github.com/prometheus/node_exporter/issues/1023#issuecomment-408128365" + } + ], + "minSpan": 24, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(rate(node_netstat_TcpExt_TCPSynRetrans[$interval:$resolution]) / rate(node_netstat_Tcp_RetransSegs[$interval:$resolution])) by (instance))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of TCP SYN Retransimts out of all retransmits", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "30s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Networking / Cluster", + "uid": "ff635a025bcfea7bc3dd4f508990a3e9", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-cluster-total + namespace: monitoring +- apiVersion: v1 + data: + controller-manager.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(up{job=\"kube-controller-manager\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Up", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(workqueue_adds_total{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{name}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Work Queue Add Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(workqueue_depth{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{name}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Work Queue Depth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{name}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Work Queue Latency", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5xx", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Kube API Request Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 8, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Post Request Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Get Request Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_resident_memory_bytes{job=\"kube-controller-manager\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(process_cpu_seconds_total{job=\"kube-controller-manager\",instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "go_goroutines{job=\"kube-controller-manager\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Goroutines", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(process_cpu_seconds_total{job=\"kube-controller-manager\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Controller Manager", + "uid": "72e0e05bef5099e5f049b05fdc429ed4", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-controller-manager + namespace: monitoring +- apiVersion: v1 + data: + k8s-resources-cluster.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "100px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 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": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", cluster=\"$cluster\"}[1m]))", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 2, + "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": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_cpu_cores{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Requests Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 3, + "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": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_cpu_cores{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "CPU Limits Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 4, + "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": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 5, + "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": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Requests Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "format": "percentunit", + "id": 6, + "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": 2, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "70,80", + "timeFrom": null, + "timeShift": null, + "title": "Memory Limits Commitment", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "singlestat", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Headlines", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 8, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to workloads", + "linkUrl": "./d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 10, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workloads", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": true, + "linkTooltip": "Drill down to workloads", + "linkUrl": "./d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests by Namespace", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Requests", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 11, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Namespace", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell", + "pattern": "namespace", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 14, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Namespace: Received", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 15, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Namespace: Transmitted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 16, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 17, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 19, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$interval])) by (namespace)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{namespace}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(node_cpu_seconds_total, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Compute Resources / Cluster", + "uid": "efa86fd1d0c121a26444b636a3f509a8", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-k8s-resources-cluster + namespace: monitoring +- apiVersion: v1 + data: + k8s-resources-namespace.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Compute Resources / Namespace (Pods)", + "uid": "85a562078cdf77779eaa1add43ccec1e", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-k8s-resources-namespace + namespace: monitoring +- apiVersion: v1 + data: + k8s-resources-node.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=\"$node\", container!=\"\"}) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{node=\"$node\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_rss{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_cache{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_memory_swap{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "node", + "multi": false, + "name": "node", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, node)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Compute Resources / Node (Pods)", + "uid": "200ac8fdbfbb74b39aff88118e4d1c2c", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-k8s-resources-node + namespace: monitoring +- apiVersion: v1 + data: + k8s-resources-pod.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", cluster=\"$cluster\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{container}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{container}} (RSS)", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{container}} (Cache)", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{container}} (Swap)", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Usage (RSS)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Cache)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Usage (Swap)", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Container", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "container", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval])) by (pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "pod", + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=\"$namespace\"}, pod)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Compute Resources / Pod", + "uid": "6581e46e4e5c7ba40a07646395ef7b23", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-k8s-resources-pod + namespace: monitoring +- apiVersion: v1 + data: + k8s-resources-workload.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Pod: Received", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Pod: Transmitted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod) \ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "workload", + "multi": false, + "name": "workload", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}, workload)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "type", + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\"}, workload_type)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Compute Resources / Workload", + "uid": "a164a7f0339f99e89cea5cb47e9be617", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-k8s-resources-workload + namespace: monitoring +- apiVersion: v1 + data: + k8s-resources-workloads-namespace.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}} - {{workload_type}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Running Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "CPU Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "CPU Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload, workload_type)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}} - {{workload_type}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Usage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Running Pods", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Memory Usage", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Requests %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Memory Limits", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "bytes" + }, + { + "alias": "Memory Limits %", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}) by (workload, workload_type)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory Quota", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Current Receive Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Transmit Bandwidth", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down to pods", + "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Workload Type", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "workload_type", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Network Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Workload: Received", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Container Bandwidth by Workload: Transmitted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 11, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$interval])\n* on (namespace,pod) \ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{workload}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "deployment", + "value": "deployment" + }, + "datasource": "$datasource", + "definition": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Compute Resources / Namespace (Workloads)", + "uid": "a87fb0d919ec0ea5f6543124e16c42a5", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-k8s-resources-workloads-namespace + namespace: monitoring +- apiVersion: v1 + data: + kubelet.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(up{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Up", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(kubelet_running_pod_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": "", + "title": "Running Pods", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 4, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(kubelet_running_container_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": "", + "title": "Running Container", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(volume_manager_total_volumes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\", state=\"actual_state_of_world\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": "", + "title": "Actual Volume Count", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 6, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(volume_manager_total_volumes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",state=\"desired_state_of_world\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": "", + "title": "Desired Volume Count", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 7, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(kubelet_node_config_error{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": "", + "title": "Config Error Count", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubelet_runtime_operations_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (operation_type, instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_type}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Operation Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubelet_runtime_operations_errors_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_type)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_type}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Operation Error Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(kubelet_runtime_operations_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_type, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_type}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Operation duration 99th quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} pod", + "refId": "A" + }, + { + "expr": "sum(rate(kubelet_pod_worker_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} worker", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Pod Start Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} pod", + "refId": "A" + }, + { + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} worker", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Pod Start Duration", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(storage_operation_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_name}} {{volume_plugin}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Storage Operation Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(storage_operation_errors_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_name}} {{volume_plugin}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Storage Operation Error Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 15, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(storage_operation_duration_seconds_bucket{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_name}} {{volume_plugin}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Storage Operation Duration 99th quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 16, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubelet_cgroup_manager_duration_seconds_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_type)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{operation_type}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Cgroup manager operation rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 17, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(kubelet_cgroup_manager_duration_seconds_bucket{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_type, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{operation_type}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Cgroup manager 99th quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "description": "Pod lifecycle event generator", + "fill": 1, + "gridPos": { + + }, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubelet_pleg_relist_duration_seconds_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "PLEG relist rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 19, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_interval_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "PLEG relist interval", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "PLEG relist duration", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 21, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5xx", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "RPC Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 22, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Request duration 99th quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 23, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_resident_memory_bytes{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 24, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 25, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "go_goroutines{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Goroutines", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(kubelet_runtime_operations_total{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Kubelet", + "uid": "3138fa155d5915769fbded898ac09fd9", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-kubelet + namespace: monitoring +- apiVersion: v1 + data: + namespace-by-pod.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "height": 9, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "height": 9, + "id": 4, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "columns": [ + { + "text": "Time", + "value": "Time" + }, + { + "text": "Value #A", + "value": "Value #A" + }, + { + "text": "Value #B", + "value": "Value #B" + }, + { + "text": "Value #C", + "value": "Value #C" + }, + { + "text": "Value #D", + "value": "Value #D" + }, + { + "text": "Value #E", + "value": "Value #E" + }, + { + "text": "Value #F", + "value": "Value #F" + }, + { + "text": "pod", + "value": "pod" + } + ], + "datasource": "$datasource", + "fill": 1, + "fontSize": "100%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "lines": true, + "linewidth": 1, + "minSpan": 24, + "nullPointMode": "null as zero", + "renderer": "flot", + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "spaceLength": 10, + "span": 24, + "styles": [ + { + "alias": "Time", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Time", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Pod", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "d/7a18067ce943a40ae25454675c19ff5c/kubernetes-networking-pod?orgId=1&refresh=30s&var-namespace=$namespace&var-pod=$__cell", + "pattern": "pod", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Status", + "type": "table" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 6, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 9, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 30 + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 12, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 14, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "30s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Networking / Namespace (Pods)", + "uid": "8b7a8b326d7a6f1f04244066368c67af", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-namespace-by-pod + namespace: monitoring +- apiVersion: v1 + data: + namespace-by-workload.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ workload }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ workload }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "columns": [ + { + "text": "Time", + "value": "Time" + }, + { + "text": "Value #A", + "value": "Value #A" + }, + { + "text": "Value #B", + "value": "Value #B" + }, + { + "text": "Value #C", + "value": "Value #C" + }, + { + "text": "Value #D", + "value": "Value #D" + }, + { + "text": "Value #E", + "value": "Value #E" + }, + { + "text": "Value #F", + "value": "Value #F" + }, + { + "text": "Value #G", + "value": "Value #G" + }, + { + "text": "Value #H", + "value": "Value #H" + }, + { + "text": "workload", + "value": "workload" + } + ], + "datasource": "$datasource", + "fill": 1, + "fontSize": "90%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "lines": true, + "linewidth": 1, + "minSpan": 24, + "nullPointMode": "null as zero", + "renderer": "flot", + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "spaceLength": 10, + "span": 24, + "styles": [ + { + "alias": "Time", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Time", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Current Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Current Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Received", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #C", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Average Bandwidth Transmitted", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #D", + "thresholds": [ + + ], + "type": "number", + "unit": "Bps" + }, + { + "alias": "Rate of Received Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #E", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #F", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Received Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #G", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Rate of Transmitted Packets Dropped", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #H", + "thresholds": [ + + ], + "type": "number", + "unit": "pps" + }, + { + "alias": "Workload", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "Drill down", + "linkUrl": "d/728bf77cc1166d2f3133bf25846876cc/kubernetes-networking-workload?orgId=1&refresh=30s&var-namespace=$namespace&var-type=$type&var-workload=$__cell", + "pattern": "workload", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Status", + "type": "table" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 6, + "panels": [ + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ workload }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ workload }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 9, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth HIstory", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 38 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{workload}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 38 + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{workload}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 39 + }, + "id": 12, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{workload}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 14, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{workload}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 15, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 41 + }, + "id": 16, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{workload}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 17, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\", workload_type=\"$type\"}) by (workload))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{workload}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "30s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "deployment", + "value": "deployment" + }, + "datasource": "$datasource", + "definition": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Networking / Namespace (Workload)", + "uid": "bbb2a765a623ae38130206c7d94a160f", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-namespace-by-workload + namespace: monitoring +- apiVersion: v1 + data: + node-cluster-rsrc-use.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n instance:node_cpu_utilisation:rate1m{job=\"node-exporter\"}\n*\n instance:node_num_cpu:sum{job=\"node-exporter\"}\n)\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\"}))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}\n/ scalar(count(instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Saturation (load1 per CPU)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_memory_utilisation:ratio{job=\"node-exporter\"}\n/ scalar(count(instance:node_memory_utilisation:ratio{job=\"node-exporter\"}))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_vmstat_pgmajfault:rate1m{job=\"node-exporter\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Saturation (Major Page Faults)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "rps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/ Receive/", + "stack": "A" + }, + { + "alias": "/ Transmit/", + "stack": "B", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} Receive", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + }, + { + "expr": "instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} Transmit", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Utilisation (Bytes Receive/Transmit)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/ Receive/", + "stack": "A" + }, + { + "alias": "/ Transmit/", + "stack": "B", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} Receive", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + }, + { + "expr": "instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} Transmit", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Saturation (Drops Receive/Transmit)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "rps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Network", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{device}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} {{device}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Saturation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk IO", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum without (device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"} - node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\"}\n )\n) \n/ scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"})))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "legendLink": "/dashboard/file/node-rsrc-use.json", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Space Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk Space", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "USE Method / Cluster", + "uid": "3e97d1d02672cdd0861f4c97c64f89b2", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-node-cluster-rsrc-use + namespace: monitoring +- apiVersion: v1 + data: + node-rsrc-use.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "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": [ + { + "expr": "instance:node_cpu_utilisation:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Utilisation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "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": [ + { + "expr": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Saturation", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Saturation (Load1 per CPU)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "CPU", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 3, + "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": [ + { + "expr": "instance:node_memory_utilisation:ratio{job=\"node-exporter\", job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Memory", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "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": [ + { + "expr": "instance:node_vmstat_pgmajfault:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Major page faults", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Saturation (Major Page Faults)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 5, + "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": [ + { + "alias": "/Receive/", + "stack": "A" + }, + { + "alias": "/Transmit/", + "stack": "B", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Receive", + "legendLink": null, + "step": 10 + }, + { + "expr": "instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Transmit", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Utilisation (Bytes Receive/Transmit)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 6, + "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": [ + { + "alias": "/Receive/", + "stack": "A" + }, + { + "alias": "/Transmit/", + "stack": "B", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Receive drops", + "legendLink": null, + "step": 10 + }, + { + "expr": "instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Transmit drops", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Net Saturation (Drops Receive/Transmit)", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "rps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Net", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 7, + "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": [ + { + "expr": "instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 8, + "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": [ + { + "expr": "instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk IO Saturation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk IO", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "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": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "1 -\n(\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n/\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{device}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Space Utilisation", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Disk Space", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "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": "instance", + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(up{job=\"node-exporter\"}, instance)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "USE Method / Node", + "uid": "fac67cfbe174d3ef53eb473d73d9212f", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-node-rsrc-use + namespace: monitoring +- apiVersion: v1 + data: + nodes.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n (1 - rate(node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"}[$__interval]))\n/ ignoring(cpu) group_left\n count without (cpu)( node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n", + "format": "time_series", + "interval": "1m", + "intervalFactor": 5, + "legendFormat": "{{cpu}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 0, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "node_load1{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "1m load average", + "refId": "A" + }, + { + "expr": "node_load5{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5m load average", + "refId": "B" + }, + { + "expr": "node_load15{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "15m load average", + "refId": "C" + }, + { + "expr": "count(node_cpu_seconds_total{job=\"node-exporter\", instance=\"$instance\", mode=\"idle\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "logical cores", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Load Average", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory used", + "refId": "A" + }, + { + "expr": "node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory buffers", + "refId": "B" + }, + { + "expr": "node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory cached", + "refId": "C" + }, + { + "expr": "node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "memory free", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "100 -\n(\n node_memory_MemAvailable_bytes{job=\"node-exporter\", instance=\"$instance\"}\n/\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"}\n* 100\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Memory Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 0, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + { + "alias": "/ read| written/", + "yaxis": 1 + }, + { + "alias": "/ io time/", + "yaxis": 2 + } + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(node_disk_read_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "{{device}} read", + "refId": "A" + }, + { + "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "{{device}} written", + "refId": "B" + }, + { + "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "{{device}} io time", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk I/O", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + { + "alias": "used", + "color": "#E0B400" + }, + { + "alias": "available", + "color": "#73BF69" + } + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(\n max by (device) (\n node_filesystem_size_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n -\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "used", + "refId": "A" + }, + { + "expr": "sum(\n max by (device) (\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "available", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Disk Space Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 0, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "{{device}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Received", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 0, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", instance=\"$instance\", device!=\"lo\"}[$__interval])", + "format": "time_series", + "interval": "1m", + "intervalFactor": 2, + "legendFormat": "{{device}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Transmitted", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(node_exporter_build_info{job=\"node-exporter\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Nodes", + "uid": "fa49a4706d07a042595b664c87fb33ea", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-nodes + namespace: monitoring +- apiVersion: v1 + data: + persistentvolumesusage.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "(\n sum without(instance, node) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used Space", + "refId": "A" + }, + { + "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Free Space", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Volume Space Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Volume Space Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 9, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Used inodes", + "refId": "A" + }, + { + "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": " Free inodes", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Volume inodes Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "$datasource", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n* 100\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "80, 90", + "title": "Volume inodes Usage", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "PersistentVolumeClaim", + "multi": false, + "name": "volume", + "options": [ + + ], + "query": "label_values(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\"}, persistentvolumeclaim)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Persistent Volumes", + "uid": "919b92a8e8041bd567af9edab12c840c", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-persistentvolumesusage + namespace: monitoring +- apiVersion: v1 + data: + pod-total.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "height": 9, + "id": 3, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace: $pod", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "decimals": 0, + "format": "time_series", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "height": 9, + "id": 4, + "interval": null, + "links": [ + + ], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "minSpan": 12, + "nullPointMode": "connected", + "nullText": null, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "max": 10000000000, + "min": 0, + "title": "$namespace: $pod", + "unit": "Bps" + }, + "mappings": [ + + ], + "override": { + + }, + "thresholds": [ + { + "color": "dark-green", + "index": 0, + "value": null + }, + { + "color": "dark-yellow", + "index": 1, + "value": 5000000000 + }, + { + "color": "dark-red", + "index": 2, + "value": 7000000000 + } + ], + "values": false + } + }, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 12, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution]))", + "format": "time_series", + "instant": null, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "type": "gauge", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 8, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 11, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$interval:$resolution])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "30s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total{namespace=~\"$namespace\"}, pod)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total{namespace=~\"$namespace\"}, pod)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Networking / Pod", + "uid": "7a18067ce943a40ae25454675c19ff5c", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-pod-total + namespace: monitoring +- apiVersion: v1 + data: + pods.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "$datasource", + "enable": true, + "expr": "time() == BOOL timestamp(rate(kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[2m]) > 0)", + "hide": false, + "iconColor": "rgba(215, 44, 44, 1)", + "name": "Restarts", + "showIn": 0, + "tags": [ + "restart" + ], + "type": "rows" + } + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(container) (container_memory_working_set_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Current: {{ container }}", + "refId": "A" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Requested: {{ container }}", + "refId": "B" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Limit: {{ container }}", + "refId": "C" + }, + { + "expr": "sum by(container) (container_memory_cache{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\", container=~\"$container\", container!=\"POD\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Cache: {{ container }}", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (container) (irate(container_cpu_usage_seconds_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", image!=\"\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"}[4m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Current: {{ container }}", + "refId": "A" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Requested: {{ container }}", + "refId": "B" + }, + { + "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Limit: {{ container }}", + "refId": "C" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum by (pod) (irate(container_network_receive_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[4m])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "RX: {{ pod }}", + "refId": "A" + }, + { + "expr": "sort_desc(sum by (pod) (irate(container_network_transmit_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[4m])))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "TX: {{ pod }}", + "refId": "B" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network I/O", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max by (container) (kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Restarts: {{ container }}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Total Restarts Per Container", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_info, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Pod", + "multi": false, + "name": "pod", + "options": [ + + ], + "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=~\"$namespace\"}, pod)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "Container", + "multi": false, + "name": "container", + "options": [ + + ], + "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}, container)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Pods", + "uid": "ab4f13a9892a76a4d21ce8c2445bf4ea", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-pods + namespace: monitoring +- apiVersion: v1 + data: + prometheus-remote-write.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(\n prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"} \n- \n ignoring(queue) group_right(instance) prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Highest Timestamp In vs. Highest Timestamp Sent", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(\n rate(prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) \n- \n ignoring (queue) group_right(instance) rate(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate[5m]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Timestamps", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(\n prometheus_remote_storage_samples_in_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n- \n ignoring(queue) group_right(instance) rate(prometheus_remote_storage_succeeded_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) \n- \n rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate, in vs. succeeded or dropped [5m]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Samples", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "minSpan": 6, + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Shards", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_shards_max{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Max Shards", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_shards_min{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Min Shards", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_shards_desired{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Desired Shards", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Shards", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_shard_capacity{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Shard Capacity", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_pending_samples{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Pending Samples", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Shard Details", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_tsdb_wal_segment_current{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "TSDB Current Segment", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "none", + "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, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_wal_watcher_current_segment{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Remote Write Current Segment", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Segments", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Dropped Samples", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 14, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_remote_storage_failed_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Failed Samples", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 15, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_remote_storage_retried_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Retried Samples", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 16, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 3, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_remote_storage_enqueue_retries_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{cluster}}:{{instance}}-{{queue}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Enqueue Retries", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Misc. Rates", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "text": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "value": { + "selected": true, + "text": "All", + "value": "$__all" + } + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(prometheus_build_info, instance)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "value": { + "selected": true, + "text": "All", + "value": "$__all" + } + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_container_info{image=~\".*prometheus.*\"}, cluster)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "queue", + "options": [ + + ], + "query": "label_values(prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}, queue)", + "refresh": 2, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "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": "browser", + "title": "Prometheus Remote Write", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-prometheus-remote-write + namespace: monitoring +- apiVersion: v1 + data: + prometheus.json: |- + { + "annotations": { + "list": [ + + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "links": [ + + ], + "refresh": "10s", + "rows": [ + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 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": 12, + "stack": false, + "steppedLine": false, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Count", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #A", + "thresholds": [ + + ], + "type": "hidden", + "unit": "short" + }, + { + "alias": "Uptime", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "Value #B", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Instance", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "instance", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Job", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "job", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "Version", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTooltip": "Drill down", + "linkUrl": "", + "pattern": "version", + "thresholds": [ + + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "/.*/", + "thresholds": [ + + ], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count by (job, instance, version) (prometheus_build_info{job=~\"$job\", instance=~\"$instance\"})", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "expr": "max by (job, instance) (time() - process_start_time_seconds{job=~\"$job\", instance=~\"$instance\"})", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Prometheus Stats", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transform": "table", + "type": "table", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Prometheus Stats", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 2, + "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": [ + { + "expr": "sum(rate(prometheus_target_sync_length_seconds_sum{job=~\"$job\",instance=~\"$instance\"}[5m])) by (scrape_job) * 1e3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{scrape_job}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Target Sync", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(prometheus_sd_discovered_targets{job=~\"$job\",instance=~\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Targets", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Targets", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Discovery", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "id": 4, + "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": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "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", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{interval}} configured", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Scrape Interval Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 5, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_exceeded_sample_limit_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "exceeded sample limit: {{job}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_sample_duplicate_timestamp_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "duplicate timestamp: {{job}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_sample_out_of_bounds_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "out of bounds: {{job}}", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum by (job) (rate(prometheus_target_scrapes_sample_out_of_order_total[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "out of order: {{job}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Scrape failures", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_tsdb_head_samples_appended_total{job=~\"$job\",instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{instance}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Appended Samples", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Retrieval", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_tsdb_head_series{job=~\"$job\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{instance}} head series", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Head Series", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_tsdb_head_chunks{job=~\"$job\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{instance}} head chunks", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Head Chunks", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Storage", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "rate(prometheus_engine_query_duration_seconds_count{job=~\"$job\",instance=~\"$instance\",slice=\"inner_eval\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{job}} {{instance}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Query Rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 10, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 0, + "links": [ + + ], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "max by (slice) (prometheus_engine_query_duration_seconds{quantile=\"0.9\",job=~\"$job\",instance=~\"$instance\"}) * 1e3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{slice}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Stage Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Query", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "job", + "multi": true, + "name": "job", + "options": [ + + ], + "query": "label_values(prometheus_build_info, job)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "instance", + "multi": true, + "name": "instance", + "options": [ + + ], + "query": "label_values(prometheus_build_info, instance)", + "refresh": 1, + "regex": "", + "sort": 2, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "Prometheus", + "uid": "", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-prometheus + namespace: monitoring +- apiVersion: v1 + data: + proxy.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(up{job=\"kube-proxy\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Up", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "rate", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rules Sync Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rule Sync Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "rate", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Programming Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Network Programming Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5xx", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Kube API Request Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 8, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-proxy\",instance=~\"$instance\",verb=\"POST\"}[5m])) by (verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Post Request Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Get Request Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_resident_memory_bytes{job=\"kube-proxy\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 11, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(process_cpu_seconds_total{job=\"kube-proxy\",instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "go_goroutines{job=\"kube-proxy\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Goroutines", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Proxy", + "uid": "632e265de029684c40b21cb76bca4f94", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-proxy + namespace: monitoring +- apiVersion: v1 + data: + scheduler.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "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" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(up{job=\"kube-scheduler\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Up", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "min" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} e2e", + "refId": "A" + }, + { + "expr": "sum(rate(scheduler_binding_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} binding", + "refId": "B" + }, + { + "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} scheduling algorithm", + "refId": "C" + }, + { + "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} volume", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Scheduling Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} e2e", + "refId": "A" + }, + { + "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} binding", + "refId": "B" + }, + { + "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} scheduling algorithm", + "refId": "C" + }, + { + "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}} volume", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Scheduling latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "5xx", + "refId": "D" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Kube API Request Rate", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 8, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Post Request Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{verb}} {{url}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Get Request Latency 99th Quantile", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "process_resident_memory_bytes{job=\"kube-scheduler\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "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": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(process_cpu_seconds_total{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU usage", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "go_goroutines{job=\"kube-scheduler\",instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Goroutines", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(process_cpu_seconds_total{job=\"kube-scheduler\"}, instance)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Scheduler", + "uid": "2e6b6a3b4bddf1427b3a55aa1311c656", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-scheduler + namespace: monitoring +- apiVersion: v1 + data: + statefulset.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + + ] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "refresh": "", + "rows": [ + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 2, + "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": "cores", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "CPU", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 3, + "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": "GB", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(container_memory_usage_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}) / 1024^3", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Memory", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 4, + "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": "Bps", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 4, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(rate(container_network_transmit_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\",pod=~\"$statefulset.*\"}[3m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Network", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "height": "100px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 5, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Desired Replicas", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 6, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Replicas of current version", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 7, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_status_observed_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", statefulset=\"$statefulset\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Observed Generation", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "$datasource", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + + }, + "id": 8, + "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" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "max(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "title": "Metadata Generation", + "tooltip": { + "shared": false + }, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "0", + "value": "null" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 1, + "gridPos": { + + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [ + + ], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "max(kube_statefulset_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas specified", + "refId": "A" + }, + { + "expr": "max(kube_statefulset_status_replicas{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas created", + "refId": "B" + }, + { + "expr": "min(kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "ready", + "refId": "C" + }, + { + "expr": "min(kube_statefulset_status_replicas_current{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "replicas of current version", + "refId": "D" + }, + { + "expr": "min(kube_statefulset_status_replicas_updated{job=\"kube-state-metrics\", statefulset=\"$statefulset\", cluster=\"$cluster\", namespace=\"$namespace\"}) without (instance, pod)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "updated", + "refId": "E" + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Replicas", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6", + "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation, cluster)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": "Name", + "multi": false, + "name": "statefulset", + "options": [ + + ], + "query": "label_values(kube_statefulset_metadata_generation{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\"}, statefulset)", + "refresh": 2, + "regex": "", + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / StatefulSets", + "uid": "a31c1f46e6f727cb37c0d731a7245005", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-statefulset + namespace: monitoring +- apiVersion: v1 + data: + workload-total.json: |- + { + "__inputs": [ + + ], + "__requires": [ + + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [ + + ], + "panels": [ + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Current Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ pod }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ pod }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 5, + "panels": [ + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 6, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ pod }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Received", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [ + + ], + "minSpan": 24, + "nullPointMode": "null", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 24, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ pod }}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Average Rate of Bytes Transmitted", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Average Bandwidth", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": false, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 8, + "panels": [ + + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Bandwidth HIstory", + "titleSize": "h6", + "type": "row" + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 12 + }, + "id": 9, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 11, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 13, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Packets", + "titleSize": "h6", + "type": "row" + }, + { + "collapse": true, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 14, + "panels": [ + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 23 + }, + "id": 15, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Received Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + }, + { + "aliasColors": { + + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", + "fill": 2, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 23 + }, + "id": 16, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [ + + ], + "minSpan": 12, + "nullPointMode": "connected", + "paceLength": 10, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$interval:$resolution])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\", workload_type=\"$type\"}) by (pod))\n", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Rate of Transmitted Packets Dropped", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [ + + ] + }, + "yaxes": [ + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "pps", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Errors", + "titleSize": "h6", + "type": "row" + } + ], + "refresh": "30s", + "rows": [ + + ], + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes-mixin" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": null, + "name": "datasource", + "options": [ + + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".+", + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "kube-system", + "value": "kube-system" + }, + "datasource": "$datasource", + "definition": "label_values(container_network_receive_packets_total, namespace)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": false, + "name": "namespace", + "options": [ + + ], + "query": "label_values(container_network_receive_packets_total, namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "", + "value": "" + }, + "datasource": "$datasource", + "definition": "label_values(mixin_pod_workload{namespace=~\"$namespace\"}, workload)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "workload", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\"}, workload)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "deployment", + "value": "deployment" + }, + "datasource": "$datasource", + "definition": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "type", + "options": [ + + ], + "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "resolution", + "options": [ + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + } + ], + "query": "30s,5m,1h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + }, + { + "allValue": null, + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "text": "5m", + "value": "5m" + }, + "datasource": "$datasource", + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "interval", + "options": [ + { + "selected": true, + "text": "4h", + "value": "4h" + } + ], + "query": "4h", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [ + + ], + "tagsQuery": "", + "type": "interval", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "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": "", + "title": "Kubernetes / Networking / Workload", + "uid": "728bf77cc1166d2f3133bf25846876cc", + "version": 0 + } + kind: ConfigMap + metadata: + name: grafana-dashboard-workload-total + namespace: monitoring +kind: ConfigMapList diff --git a/monitoring/manifests/grafana-dashboardSources.yaml b/monitoring/manifests/grafana-dashboardSources.yaml new file mode 100644 index 0000000..d8b401a --- /dev/null +++ b/monitoring/manifests/grafana-dashboardSources.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +data: + dashboards.yaml: |- + { + "apiVersion": 1, + "providers": [ + { + "folder": "", + "name": "0", + "options": { + "path": "/grafana-dashboard-definitions/0" + }, + "orgId": 1, + "type": "file" + } + ] + } +kind: ConfigMap +metadata: + name: grafana-dashboards + namespace: monitoring diff --git a/monitoring/manifests/grafana-deployment.yaml b/monitoring/manifests/grafana-deployment.yaml new file mode 100644 index 0000000..5ccf92f --- /dev/null +++ b/monitoring/manifests/grafana-deployment.yaml @@ -0,0 +1,203 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: grafana + name: grafana + namespace: monitoring +spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - image: grafana/grafana:6.6.0 + name: grafana + ports: + - containerPort: 3000 + name: http + readinessProbe: + httpGet: + path: /api/health + port: http + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + readOnly: false + - mountPath: /etc/grafana/provisioning/datasources + name: grafana-datasources + readOnly: false + - mountPath: /etc/grafana/provisioning/dashboards + name: grafana-dashboards + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/apiserver + name: grafana-dashboard-apiserver + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/cluster-total + name: grafana-dashboard-cluster-total + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/controller-manager + name: grafana-dashboard-controller-manager + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/k8s-resources-cluster + name: grafana-dashboard-k8s-resources-cluster + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/k8s-resources-namespace + name: grafana-dashboard-k8s-resources-namespace + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/k8s-resources-node + name: grafana-dashboard-k8s-resources-node + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/k8s-resources-pod + name: grafana-dashboard-k8s-resources-pod + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/k8s-resources-workload + name: grafana-dashboard-k8s-resources-workload + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/k8s-resources-workloads-namespace + name: grafana-dashboard-k8s-resources-workloads-namespace + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/kubelet + name: grafana-dashboard-kubelet + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/namespace-by-pod + name: grafana-dashboard-namespace-by-pod + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/namespace-by-workload + name: grafana-dashboard-namespace-by-workload + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/node-cluster-rsrc-use + name: grafana-dashboard-node-cluster-rsrc-use + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/node-rsrc-use + name: grafana-dashboard-node-rsrc-use + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/nodes + name: grafana-dashboard-nodes + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/persistentvolumesusage + name: grafana-dashboard-persistentvolumesusage + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/pod-total + name: grafana-dashboard-pod-total + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/pods + name: grafana-dashboard-pods + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/prometheus-remote-write + name: grafana-dashboard-prometheus-remote-write + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/prometheus + name: grafana-dashboard-prometheus + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/proxy + name: grafana-dashboard-proxy + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/scheduler + name: grafana-dashboard-scheduler + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/statefulset + name: grafana-dashboard-statefulset + readOnly: false + - mountPath: /grafana-dashboard-definitions/0/workload-total + name: grafana-dashboard-workload-total + readOnly: false + nodeSelector: + beta.kubernetes.io/os: linux + securityContext: + runAsNonRoot: true + runAsUser: 65534 + serviceAccountName: grafana + volumes: + - emptyDir: {} + name: grafana-storage + - name: grafana-datasources + secret: + secretName: grafana-datasources + - configMap: + name: grafana-dashboards + name: grafana-dashboards + - configMap: + name: grafana-dashboard-apiserver + name: grafana-dashboard-apiserver + - configMap: + name: grafana-dashboard-cluster-total + name: grafana-dashboard-cluster-total + - configMap: + name: grafana-dashboard-controller-manager + name: grafana-dashboard-controller-manager + - configMap: + name: grafana-dashboard-k8s-resources-cluster + name: grafana-dashboard-k8s-resources-cluster + - configMap: + name: grafana-dashboard-k8s-resources-namespace + name: grafana-dashboard-k8s-resources-namespace + - configMap: + name: grafana-dashboard-k8s-resources-node + name: grafana-dashboard-k8s-resources-node + - configMap: + name: grafana-dashboard-k8s-resources-pod + name: grafana-dashboard-k8s-resources-pod + - configMap: + name: grafana-dashboard-k8s-resources-workload + name: grafana-dashboard-k8s-resources-workload + - configMap: + name: grafana-dashboard-k8s-resources-workloads-namespace + name: grafana-dashboard-k8s-resources-workloads-namespace + - configMap: + name: grafana-dashboard-kubelet + name: grafana-dashboard-kubelet + - configMap: + name: grafana-dashboard-namespace-by-pod + name: grafana-dashboard-namespace-by-pod + - configMap: + name: grafana-dashboard-namespace-by-workload + name: grafana-dashboard-namespace-by-workload + - configMap: + name: grafana-dashboard-node-cluster-rsrc-use + name: grafana-dashboard-node-cluster-rsrc-use + - configMap: + name: grafana-dashboard-node-rsrc-use + name: grafana-dashboard-node-rsrc-use + - configMap: + name: grafana-dashboard-nodes + name: grafana-dashboard-nodes + - configMap: + name: grafana-dashboard-persistentvolumesusage + name: grafana-dashboard-persistentvolumesusage + - configMap: + name: grafana-dashboard-pod-total + name: grafana-dashboard-pod-total + - configMap: + name: grafana-dashboard-pods + name: grafana-dashboard-pods + - configMap: + name: grafana-dashboard-prometheus-remote-write + name: grafana-dashboard-prometheus-remote-write + - configMap: + name: grafana-dashboard-prometheus + name: grafana-dashboard-prometheus + - configMap: + name: grafana-dashboard-proxy + name: grafana-dashboard-proxy + - configMap: + name: grafana-dashboard-scheduler + name: grafana-dashboard-scheduler + - configMap: + name: grafana-dashboard-statefulset + name: grafana-dashboard-statefulset + - configMap: + name: grafana-dashboard-workload-total + name: grafana-dashboard-workload-total diff --git a/monitoring/manifests/grafana-service.yaml b/monitoring/manifests/grafana-service.yaml new file mode 100644 index 0000000..3acdf1e --- /dev/null +++ b/monitoring/manifests/grafana-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: grafana + name: grafana + namespace: monitoring +spec: + ports: + - name: http + port: 3000 + targetPort: http + selector: + app: grafana diff --git a/monitoring/manifests/grafana-serviceAccount.yaml b/monitoring/manifests/grafana-serviceAccount.yaml new file mode 100644 index 0000000..3ed3e03 --- /dev/null +++ b/monitoring/manifests/grafana-serviceAccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: grafana + namespace: monitoring diff --git a/monitoring/manifests/grafana-serviceMonitor.yaml b/monitoring/manifests/grafana-serviceMonitor.yaml new file mode 100644 index 0000000..7ede266 --- /dev/null +++ b/monitoring/manifests/grafana-serviceMonitor.yaml @@ -0,0 +1,12 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: grafana + namespace: monitoring +spec: + endpoints: + - interval: 15s + port: http + selector: + matchLabels: + app: grafana diff --git a/monitoring/manifests/kube-state-metrics-clusterRole.yaml b/monitoring/manifests/kube-state-metrics-clusterRole.yaml new file mode 100644 index 0000000..5edf165 --- /dev/null +++ b/monitoring/manifests/kube-state-metrics-clusterRole.yaml @@ -0,0 +1,117 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + name: kube-state-metrics +rules: +- apiGroups: + - "" + resources: + - configmaps + - secrets + - nodes + - pods + - services + - resourcequotas + - replicationcontrollers + - limitranges + - persistentvolumeclaims + - persistentvolumes + - namespaces + - endpoints + verbs: + - list + - watch +- apiGroups: + - extensions + resources: + - daemonsets + - deployments + - replicasets + - ingresses + verbs: + - list + - watch +- apiGroups: + - apps + resources: + - statefulsets + - daemonsets + - deployments + - replicasets + verbs: + - list + - watch +- apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - list + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - list + - watch +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - list + - watch +- apiGroups: + - certificates.k8s.io + resources: + - certificatesigningrequests + verbs: + - list + - watch +- apiGroups: + - storage.k8s.io + resources: + - storageclasses + - volumeattachments + verbs: + - list + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - list + - watch +- apiGroups: + - networking.k8s.io + resources: + - networkpolicies + verbs: + - list + - watch +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - list + - watch diff --git a/monitoring/manifests/kube-state-metrics-clusterRoleBinding.yaml b/monitoring/manifests/kube-state-metrics-clusterRoleBinding.yaml new file mode 100644 index 0000000..305c91b --- /dev/null +++ b/monitoring/manifests/kube-state-metrics-clusterRoleBinding.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + name: kube-state-metrics +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kube-state-metrics +subjects: +- kind: ServiceAccount + name: kube-state-metrics + namespace: monitoring diff --git a/monitoring/manifests/kube-state-metrics-deployment.yaml b/monitoring/manifests/kube-state-metrics-deployment.yaml new file mode 100644 index 0000000..a41e02c --- /dev/null +++ b/monitoring/manifests/kube-state-metrics-deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + name: kube-state-metrics + namespace: monitoring +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: kube-state-metrics + template: + metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + spec: + containers: + - image: quay.io/coreos/kube-state-metrics:v1.9.4 + livenessProbe: + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + name: kube-state-metrics + ports: + - containerPort: 8080 + name: http-metrics + - containerPort: 8081 + name: telemetry + readinessProbe: + httpGet: + path: / + port: 8081 + initialDelaySeconds: 5 + timeoutSeconds: 5 + securityContext: + runAsUser: 65534 + nodeSelector: + kubernetes.io/os: linux + serviceAccountName: kube-state-metrics diff --git a/monitoring/manifests/kube-state-metrics-service.yaml b/monitoring/manifests/kube-state-metrics-service.yaml new file mode 100644 index 0000000..691a2b2 --- /dev/null +++ b/monitoring/manifests/kube-state-metrics-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + name: kube-state-metrics + namespace: monitoring +spec: + clusterIP: None + ports: + - name: http-metrics + port: 8080 + targetPort: http-metrics + - name: telemetry + port: 8081 + targetPort: telemetry + selector: + app.kubernetes.io/name: kube-state-metrics diff --git a/monitoring/manifests/kube-state-metrics-serviceAccount.yaml b/monitoring/manifests/kube-state-metrics-serviceAccount.yaml new file mode 100644 index 0000000..74878e5 --- /dev/null +++ b/monitoring/manifests/kube-state-metrics-serviceAccount.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + name: kube-state-metrics + namespace: monitoring diff --git a/monitoring/manifests/kube-state-metrics-serviceMonitor.yaml b/monitoring/manifests/kube-state-metrics-serviceMonitor.yaml new file mode 100644 index 0000000..3bfa689 --- /dev/null +++ b/monitoring/manifests/kube-state-metrics-serviceMonitor.yaml @@ -0,0 +1,24 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 + name: kube-state-metrics + namespace: monitoring +spec: + endpoints: + - honorLabels: true + interval: 30s + port: http-metrics + relabelings: + - action: labeldrop + regex: (pod|service|endpoint|namespace) + scrapeTimeout: 30s + - interval: 30s + port: telemetry + jobLabel: app.kubernetes.io/name + selector: + matchLabels: + app.kubernetes.io/name: kube-state-metrics + app.kubernetes.io/version: 1.9.4 diff --git a/monitoring/manifests/node-exporter-clusterRole.yaml b/monitoring/manifests/node-exporter-clusterRole.yaml new file mode 100644 index 0000000..ad783ae --- /dev/null +++ b/monitoring/manifests/node-exporter-clusterRole.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: node-exporter +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create diff --git a/monitoring/manifests/node-exporter-clusterRoleBinding.yaml b/monitoring/manifests/node-exporter-clusterRoleBinding.yaml new file mode 100644 index 0000000..a5a2050 --- /dev/null +++ b/monitoring/manifests/node-exporter-clusterRoleBinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: node-exporter +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: node-exporter +subjects: +- kind: ServiceAccount + name: node-exporter + namespace: monitoring diff --git a/monitoring/manifests/node-exporter-daemonset.yaml b/monitoring/manifests/node-exporter-daemonset.yaml new file mode 100644 index 0000000..7a65619 --- /dev/null +++ b/monitoring/manifests/node-exporter-daemonset.yaml @@ -0,0 +1,89 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + labels: + app: node-exporter + name: node-exporter + namespace: monitoring +spec: + selector: + matchLabels: + app: node-exporter + template: + metadata: + labels: + app: node-exporter + spec: + containers: + - args: + - --web.listen-address=127.0.0.1:9100 + - --path.procfs=/host/proc + - --path.sysfs=/host/sys + - --path.rootfs=/host/root + - --no-collector.wifi + - --no-collector.hwmon + - --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)$ + image: quay.io/prometheus/node-exporter:v0.18.1 + name: node-exporter + resources: + limits: + cpu: 250m + memory: 180Mi + requests: + cpu: 102m + memory: 180Mi + volumeMounts: + - mountPath: /host/proc + name: proc + readOnly: false + - mountPath: /host/sys + name: sys + readOnly: false + - mountPath: /host/root + mountPropagation: HostToContainer + name: root + readOnly: true + - args: + - --logtostderr + - --secure-listen-address=[$(IP)]:9100 + - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 + - --upstream=http://127.0.0.1:9100/ + env: + - name: IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay.io/coreos/kube-rbac-proxy:v0.4.1 + name: kube-rbac-proxy + ports: + - containerPort: 9100 + hostPort: 9100 + name: https + resources: + limits: + cpu: 20m + memory: 40Mi + requests: + cpu: 10m + memory: 20Mi + hostNetwork: true + hostPID: true + nodeSelector: + kubernetes.io/os: linux + securityContext: + runAsNonRoot: true + runAsUser: 65534 + serviceAccountName: node-exporter + tolerations: + - operator: Exists + volumes: + - hostPath: + path: /proc + name: proc + - hostPath: + path: /sys + name: sys + - hostPath: + path: / + name: root diff --git a/monitoring/manifests/node-exporter-service.yaml b/monitoring/manifests/node-exporter-service.yaml new file mode 100644 index 0000000..1d728d7 --- /dev/null +++ b/monitoring/manifests/node-exporter-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + k8s-app: node-exporter + name: node-exporter + namespace: monitoring +spec: + clusterIP: None + ports: + - name: https + port: 9100 + targetPort: https + selector: + app: node-exporter diff --git a/monitoring/manifests/node-exporter-serviceAccount.yaml b/monitoring/manifests/node-exporter-serviceAccount.yaml new file mode 100644 index 0000000..8a03ac1 --- /dev/null +++ b/monitoring/manifests/node-exporter-serviceAccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: node-exporter + namespace: monitoring diff --git a/monitoring/manifests/node-exporter-serviceMonitor.yaml b/monitoring/manifests/node-exporter-serviceMonitor.yaml new file mode 100644 index 0000000..3ceed6c --- /dev/null +++ b/monitoring/manifests/node-exporter-serviceMonitor.yaml @@ -0,0 +1,26 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: node-exporter + name: node-exporter + namespace: monitoring +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 15s + port: https + relabelings: + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: instance + scheme: https + tlsConfig: + insecureSkipVerify: true + jobLabel: k8s-app + selector: + matchLabels: + k8s-app: node-exporter diff --git a/monitoring/manifests/prometheus-adapter-apiService.yaml b/monitoring/manifests/prometheus-adapter-apiService.yaml new file mode 100644 index 0000000..a215efe --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-apiService.yaml @@ -0,0 +1,13 @@ +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: v1beta1.metrics.k8s.io +spec: + group: metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: prometheus-adapter + namespace: monitoring + version: v1beta1 + versionPriority: 100 diff --git a/monitoring/manifests/prometheus-adapter-clusterRole.yaml b/monitoring/manifests/prometheus-adapter-clusterRole.yaml new file mode 100644 index 0000000..a02d2bb --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-clusterRole.yaml @@ -0,0 +1,16 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus-adapter +rules: +- apiGroups: + - "" + resources: + - nodes + - namespaces + - pods + - services + verbs: + - get + - list + - watch diff --git a/monitoring/manifests/prometheus-adapter-clusterRoleAggregatedMetricsReader.yaml b/monitoring/manifests/prometheus-adapter-clusterRoleAggregatedMetricsReader.yaml new file mode 100644 index 0000000..9f0dbb3 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-clusterRoleAggregatedMetricsReader.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + rbac.authorization.k8s.io/aggregate-to-view: "true" + name: system:aggregated-metrics-reader +rules: +- apiGroups: + - metrics.k8s.io + resources: + - pods + - nodes + verbs: + - get + - list + - watch diff --git a/monitoring/manifests/prometheus-adapter-clusterRoleBinding.yaml b/monitoring/manifests/prometheus-adapter-clusterRoleBinding.yaml new file mode 100644 index 0000000..7e8f3da --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-clusterRoleBinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prometheus-adapter +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-adapter +subjects: +- kind: ServiceAccount + name: prometheus-adapter + namespace: monitoring diff --git a/monitoring/manifests/prometheus-adapter-clusterRoleBindingDelegator.yaml b/monitoring/manifests/prometheus-adapter-clusterRoleBindingDelegator.yaml new file mode 100644 index 0000000..4295b50 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-clusterRoleBindingDelegator.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: resource-metrics:system:auth-delegator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- kind: ServiceAccount + name: prometheus-adapter + namespace: monitoring diff --git a/monitoring/manifests/prometheus-adapter-clusterRoleServerResources.yaml b/monitoring/manifests/prometheus-adapter-clusterRoleServerResources.yaml new file mode 100644 index 0000000..fcb914c --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-clusterRoleServerResources.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: resource-metrics-server-resources +rules: +- apiGroups: + - metrics.k8s.io + resources: + - '*' + verbs: + - '*' diff --git a/monitoring/manifests/prometheus-adapter-configMap.yaml b/monitoring/manifests/prometheus-adapter-configMap.yaml new file mode 100644 index 0000000..5961c01 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-configMap.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +data: + config.yaml: | + resourceRules: + cpu: + containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>,container!="POD",container!="",pod!=""}[5m])) by (<<.GroupBy>>) + nodeQuery: sum(1 - rate(node_cpu_seconds_total{mode="idle"}[5m]) * on(namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>}) by (<<.GroupBy>>) + resources: + overrides: + node: + resource: node + namespace: + resource: namespace + pod: + resource: pod + containerLabel: container + memory: + containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,container!="POD",container!="",pod!=""}) 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: + resource: pod + containerLabel: container + window: 5m +kind: ConfigMap +metadata: + name: adapter-config + namespace: monitoring diff --git a/monitoring/manifests/prometheus-adapter-deployment.yaml b/monitoring/manifests/prometheus-adapter-deployment.yaml new file mode 100644 index 0000000..2228106 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-adapter + namespace: monitoring +spec: + replicas: 1 + selector: + matchLabels: + name: prometheus-adapter + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + template: + metadata: + labels: + name: prometheus-adapter + spec: + containers: + - args: + - --cert-dir=/var/run/serving-cert + - --config=/etc/adapter/config.yaml + - --logtostderr=true + - --metrics-relist-interval=1m + - --prometheus-url=http://prometheus-k8s.monitoring.svc:9090/ + - --secure-port=6443 + image: quay.io/coreos/k8s-prometheus-adapter-amd64:v0.5.0 + name: prometheus-adapter + ports: + - containerPort: 6443 + volumeMounts: + - mountPath: /tmp + name: tmpfs + readOnly: false + - mountPath: /var/run/serving-cert + name: volume-serving-cert + readOnly: false + - mountPath: /etc/adapter + name: config + readOnly: false + nodeSelector: + kubernetes.io/os: linux + serviceAccountName: prometheus-adapter + volumes: + - emptyDir: {} + name: tmpfs + - emptyDir: {} + name: volume-serving-cert + - configMap: + name: adapter-config + name: config diff --git a/monitoring/manifests/prometheus-adapter-roleBindingAuthReader.yaml b/monitoring/manifests/prometheus-adapter-roleBindingAuthReader.yaml new file mode 100644 index 0000000..48c8f32 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-roleBindingAuthReader.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: resource-metrics-auth-reader + namespace: kube-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: extension-apiserver-authentication-reader +subjects: +- kind: ServiceAccount + name: prometheus-adapter + namespace: monitoring diff --git a/monitoring/manifests/prometheus-adapter-service.yaml b/monitoring/manifests/prometheus-adapter-service.yaml new file mode 100644 index 0000000..e786e01 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + name: prometheus-adapter + name: prometheus-adapter + namespace: monitoring +spec: + ports: + - name: https + port: 443 + targetPort: 6443 + selector: + name: prometheus-adapter diff --git a/monitoring/manifests/prometheus-adapter-serviceAccount.yaml b/monitoring/manifests/prometheus-adapter-serviceAccount.yaml new file mode 100644 index 0000000..d7e7050 --- /dev/null +++ b/monitoring/manifests/prometheus-adapter-serviceAccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: prometheus-adapter + namespace: monitoring diff --git a/monitoring/manifests/prometheus-clusterRole.yaml b/monitoring/manifests/prometheus-clusterRole.yaml new file mode 100644 index 0000000..d5c4598 --- /dev/null +++ b/monitoring/manifests/prometheus-clusterRole.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus-k8s +rules: +- apiGroups: + - "" + resources: + - nodes/metrics + verbs: + - get +- nonResourceURLs: + - /metrics + verbs: + - get diff --git a/monitoring/manifests/prometheus-clusterRoleBinding.yaml b/monitoring/manifests/prometheus-clusterRoleBinding.yaml new file mode 100644 index 0000000..554bb6f --- /dev/null +++ b/monitoring/manifests/prometheus-clusterRoleBinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prometheus-k8s +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-k8s +subjects: +- kind: ServiceAccount + name: prometheus-k8s + namespace: monitoring diff --git a/monitoring/manifests/prometheus-operator-serviceMonitor.yaml b/monitoring/manifests/prometheus-operator-serviceMonitor.yaml new file mode 100644 index 0000000..50cc14a --- /dev/null +++ b/monitoring/manifests/prometheus-operator-serviceMonitor.yaml @@ -0,0 +1,18 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + name: prometheus-operator + namespace: monitoring +spec: + endpoints: + - honorLabels: true + port: http + selector: + matchLabels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 diff --git a/monitoring/manifests/prometheus-prometheus.yaml b/monitoring/manifests/prometheus-prometheus.yaml new file mode 100644 index 0000000..1c8422d --- /dev/null +++ b/monitoring/manifests/prometheus-prometheus.yaml @@ -0,0 +1,34 @@ +apiVersion: monitoring.coreos.com/v1 +kind: Prometheus +metadata: + labels: + prometheus: k8s + name: k8s + namespace: monitoring +spec: + alerting: + alertmanagers: + - name: alertmanager-main + namespace: monitoring + port: web + baseImage: quay.io/prometheus/prometheus + nodeSelector: + kubernetes.io/os: linux + podMonitorNamespaceSelector: {} + podMonitorSelector: {} + replicas: 2 + resources: + requests: + memory: 400Mi + ruleSelector: + matchLabels: + prometheus: k8s + role: alert-rules + securityContext: + fsGroup: 2000 + runAsNonRoot: true + runAsUser: 1000 + serviceAccountName: prometheus-k8s + serviceMonitorNamespaceSelector: {} + serviceMonitorSelector: {} + version: v2.15.2 diff --git a/monitoring/manifests/prometheus-roleBindingConfig.yaml b/monitoring/manifests/prometheus-roleBindingConfig.yaml new file mode 100644 index 0000000..ec0129d --- /dev/null +++ b/monitoring/manifests/prometheus-roleBindingConfig.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: prometheus-k8s-config + namespace: monitoring +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s-config +subjects: +- kind: ServiceAccount + name: prometheus-k8s + namespace: monitoring diff --git a/monitoring/manifests/prometheus-roleBindingSpecificNamespaces.yaml b/monitoring/manifests/prometheus-roleBindingSpecificNamespaces.yaml new file mode 100644 index 0000000..c7527f6 --- /dev/null +++ b/monitoring/manifests/prometheus-roleBindingSpecificNamespaces.yaml @@ -0,0 +1,42 @@ +apiVersion: rbac.authorization.k8s.io/v1 +items: +- apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: default + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: monitoring +- apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: kube-system + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: monitoring +- apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: monitoring + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: monitoring +kind: RoleBindingList diff --git a/monitoring/manifests/prometheus-roleConfig.yaml b/monitoring/manifests/prometheus-roleConfig.yaml new file mode 100644 index 0000000..5f1cd04 --- /dev/null +++ b/monitoring/manifests/prometheus-roleConfig.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: prometheus-k8s-config + namespace: monitoring +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get diff --git a/monitoring/manifests/prometheus-roleSpecificNamespaces.yaml b/monitoring/manifests/prometheus-roleSpecificNamespaces.yaml new file mode 100644 index 0000000..b920b88 --- /dev/null +++ b/monitoring/manifests/prometheus-roleSpecificNamespaces.yaml @@ -0,0 +1,51 @@ +apiVersion: rbac.authorization.k8s.io/v1 +items: +- apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: default + rules: + - apiGroups: + - "" + resources: + - services + - endpoints + - pods + verbs: + - get + - list + - watch +- apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: kube-system + rules: + - apiGroups: + - "" + resources: + - services + - endpoints + - pods + verbs: + - get + - list + - watch +- apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: monitoring + rules: + - apiGroups: + - "" + resources: + - services + - endpoints + - pods + verbs: + - get + - list + - watch +kind: RoleList diff --git a/monitoring/manifests/prometheus-rules.yaml b/monitoring/manifests/prometheus-rules.yaml new file mode 100644 index 0000000..522433d --- /dev/null +++ b/monitoring/manifests/prometheus-rules.yaml @@ -0,0 +1,1421 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + labels: + prometheus: k8s + role: alert-rules + name: prometheus-k8s-rules + namespace: monitoring +spec: + groups: + - name: node-exporter.rules + rules: + - expr: | + count without (cpu) ( + count without (mode) ( + node_cpu_seconds_total{job="node-exporter"} + ) + ) + record: instance:node_num_cpu:sum + - expr: | + 1 - avg without (cpu, mode) ( + rate(node_cpu_seconds_total{job="node-exporter", mode="idle"}[1m]) + ) + record: instance:node_cpu_utilisation:rate1m + - expr: | + ( + node_load1{job="node-exporter"} + / + instance:node_num_cpu:sum{job="node-exporter"} + ) + record: instance:node_load1_per_cpu:ratio + - expr: | + 1 - ( + node_memory_MemAvailable_bytes{job="node-exporter"} + / + node_memory_MemTotal_bytes{job="node-exporter"} + ) + record: instance:node_memory_utilisation:ratio + - expr: | + rate(node_vmstat_pgmajfault{job="node-exporter"}[1m]) + record: instance:node_vmstat_pgmajfault:rate1m + - expr: | + rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"}[1m]) + record: instance_device:node_disk_io_time_seconds:rate1m + - expr: | + rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"}[1m]) + record: instance_device:node_disk_io_time_weighted_seconds:rate1m + - expr: | + sum without (device) ( + rate(node_network_receive_bytes_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_receive_bytes_excluding_lo:rate1m + - expr: | + sum without (device) ( + rate(node_network_transmit_bytes_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_transmit_bytes_excluding_lo:rate1m + - expr: | + sum without (device) ( + rate(node_network_receive_drop_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_receive_drop_excluding_lo:rate1m + - expr: | + sum without (device) ( + rate(node_network_transmit_drop_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_transmit_drop_excluding_lo:rate1m + - name: kube-apiserver.rules + rules: + - expr: | + sum(rate(apiserver_request_duration_seconds_sum{subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, pod) + / + sum(rate(apiserver_request_duration_seconds_count{subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, pod) + record: cluster:apiserver_request_duration_seconds:mean5m + - expr: | + histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, pod)) + labels: + quantile: "0.99" + record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, pod)) + labels: + quantile: "0.9" + record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, pod)) + labels: + quantile: "0.5" + record: cluster_quantile:apiserver_request_duration_seconds:histogram_quantile + - name: k8s.rules + rules: + - expr: | + sum(rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}[5m])) by (namespace) + record: namespace:container_cpu_usage_seconds_total:sum_rate + - expr: | + sum by (cluster, namespace, pod, container) ( + rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}[5m]) + ) * on (cluster, namespace, pod) group_left(node) max by(cluster, namespace, pod, node) (kube_pod_info) + record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate + - expr: | + container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + record: node_namespace_pod_container:container_memory_working_set_bytes + - expr: | + container_memory_rss{job="kubelet", metrics_path="/metrics/cadvisor", image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + record: node_namespace_pod_container:container_memory_rss + - expr: | + container_memory_cache{job="kubelet", metrics_path="/metrics/cadvisor", image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + record: node_namespace_pod_container:container_memory_cache + - expr: | + container_memory_swap{job="kubelet", metrics_path="/metrics/cadvisor", image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + record: node_namespace_pod_container:container_memory_swap + - expr: | + sum(container_memory_usage_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}) by (namespace) + record: namespace:container_memory_usage_bytes:sum + - expr: | + sum by (namespace) ( + sum by (namespace, pod) ( + max by (namespace, pod, container) ( + kube_pod_container_resource_requests_memory_bytes{job="kube-state-metrics"} + ) * on(namespace, pod) group_left() max by (namespace, pod) ( + kube_pod_status_phase{phase=~"Pending|Running"} == 1 + ) + ) + ) + record: namespace:kube_pod_container_resource_requests_memory_bytes:sum + - expr: | + sum by (namespace) ( + sum by (namespace, pod) ( + max by (namespace, pod, container) ( + kube_pod_container_resource_requests_cpu_cores{job="kube-state-metrics"} + ) * on(namespace, pod) group_left() max by (namespace, pod) ( + kube_pod_status_phase{phase=~"Pending|Running"} == 1 + ) + ) + ) + record: namespace:kube_pod_container_resource_requests_cpu_cores:sum + - expr: | + sum( + label_replace( + label_replace( + kube_pod_owner{job="kube-state-metrics", owner_kind="ReplicaSet"}, + "replicaset", "$1", "owner_name", "(.*)" + ) * on(replicaset, namespace) group_left(owner_name) kube_replicaset_owner{job="kube-state-metrics"}, + "workload", "$1", "owner_name", "(.*)" + ) + ) by (cluster, namespace, workload, pod) + labels: + workload_type: deployment + record: mixin_pod_workload + - expr: | + sum( + label_replace( + kube_pod_owner{job="kube-state-metrics", owner_kind="DaemonSet"}, + "workload", "$1", "owner_name", "(.*)" + ) + ) by (cluster, namespace, workload, pod) + labels: + workload_type: daemonset + record: mixin_pod_workload + - expr: | + sum( + label_replace( + kube_pod_owner{job="kube-state-metrics", owner_kind="StatefulSet"}, + "workload", "$1", "owner_name", "(.*)" + ) + ) by (cluster, namespace, workload, pod) + labels: + workload_type: statefulset + record: mixin_pod_workload + - name: kube-scheduler.rules + rules: + - expr: | + histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.99" + record: cluster_quantile:scheduler_e2e_scheduling_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.99" + record: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.99" + record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.9" + record: cluster_quantile:scheduler_e2e_scheduling_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.9" + record: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(scheduler_binding_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.9" + record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.5" + record: cluster_quantile:scheduler_e2e_scheduling_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.5" + record: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(scheduler_binding_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: "0.5" + record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile + - name: node.rules + rules: + - expr: | + sum(min(kube_pod_info) by (cluster, node)) + record: ':kube_pod_info_node_count:' + - expr: | + max(label_replace(kube_pod_info{job="kube-state-metrics"}, "pod", "$1", "pod", "(.*)")) by (node, namespace, pod) + record: 'node_namespace_pod:kube_pod_info:' + - expr: | + count by (cluster, node) (sum by (node, cpu) ( + node_cpu_seconds_total{job="node-exporter"} + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + )) + record: node:node_num_cpu:sum + - expr: | + sum( + node_memory_MemAvailable_bytes{job="node-exporter"} or + ( + node_memory_Buffers_bytes{job="node-exporter"} + + node_memory_Cached_bytes{job="node-exporter"} + + node_memory_MemFree_bytes{job="node-exporter"} + + node_memory_Slab_bytes{job="node-exporter"} + ) + ) by (cluster) + record: :node_memory_MemAvailable_bytes:sum + - 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 + - name: kube-prometheus-general.rules + rules: + - expr: count without(instance, pod, node) (up == 1) + record: count:up1 + - expr: count without(instance, pod, node) (up == 0) + record: count:up0 + - name: kube-state-metrics + rules: + - alert: KubeStateMetricsListErrors + annotations: + message: kube-state-metrics is experiencing errors at an elevated rate in + list operations. This is likely causing it to not be able to expose metrics + about Kubernetes objects correctly or at all. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatemetricslisterrors + expr: | + (sum(rate(kube_state_metrics_list_total{job="kube-state-metrics",result="error"}[5m])) + / + sum(rate(kube_state_metrics_list_total{job="kube-state-metrics"}[5m]))) + > 0.01 + for: 15m + labels: + severity: critical + - alert: KubeStateMetricsWatchErrors + annotations: + message: kube-state-metrics is experiencing errors at an elevated rate in + watch operations. This is likely causing it to not be able to expose metrics + about Kubernetes objects correctly or at all. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatemetricswatcherrors + expr: | + (sum(rate(kube_state_metrics_watch_total{job="kube-state-metrics",result="error"}[5m])) + / + sum(rate(kube_state_metrics_watch_total{job="kube-state-metrics"}[5m]))) + > 0.01 + for: 15m + labels: + severity: critical + - name: node-exporter + rules: + - alert: NodeFilesystemSpaceFillingUp + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available space left and is filling + up. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemspacefillingup + summary: Filesystem is predicted to run out of space within the next 24 hours. + expr: | + ( + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 40 + and + predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - alert: NodeFilesystemSpaceFillingUp + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available space left and is filling + up fast. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemspacefillingup + summary: Filesystem is predicted to run out of space within the next 4 hours. + expr: | + ( + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 20 + and + predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeFilesystemAlmostOutOfSpace + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available space left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemalmostoutofspace + summary: Filesystem has less than 5% space left. + expr: | + ( + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 5 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - alert: NodeFilesystemAlmostOutOfSpace + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available space left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemalmostoutofspace + summary: Filesystem has less than 3% space left. + expr: | + ( + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 3 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeFilesystemFilesFillingUp + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available inodes left and is filling + up. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemfilesfillingup + summary: Filesystem is predicted to run out of inodes within the next 24 hours. + expr: | + ( + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 40 + and + predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - alert: NodeFilesystemFilesFillingUp + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available inodes left and is filling + up fast. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemfilesfillingup + summary: Filesystem is predicted to run out of inodes within the next 4 hours. + expr: | + ( + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 20 + and + predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeFilesystemAlmostOutOfFiles + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available inodes left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemalmostoutoffiles + summary: Filesystem has less than 5% inodes left. + expr: | + ( + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 5 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - alert: NodeFilesystemAlmostOutOfFiles + annotations: + description: Filesystem on {{ $labels.device }} at {{ $labels.instance }} + has only {{ printf "%.2f" $value }}% available inodes left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodefilesystemalmostoutoffiles + summary: Filesystem has less than 3% inodes left. + expr: | + ( + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 3 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeNetworkReceiveErrs + annotations: + description: '{{ $labels.instance }} interface {{ $labels.device }} has encountered + {{ printf "%.0f" $value }} receive errors in the last two minutes.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodenetworkreceiveerrs + summary: Network interface is reporting many receive errors. + expr: | + increase(node_network_receive_errs_total[2m]) > 10 + for: 1h + labels: + severity: warning + - alert: NodeNetworkTransmitErrs + annotations: + description: '{{ $labels.instance }} interface {{ $labels.device }} has encountered + {{ printf "%.0f" $value }} transmit errors in the last two minutes.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodenetworktransmiterrs + summary: Network interface is reporting many transmit errors. + expr: | + increase(node_network_transmit_errs_total[2m]) > 10 + for: 1h + labels: + severity: warning + - name: kubernetes-apps + rules: + - alert: KubePodCrashLooping + annotations: + message: Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container + }}) is restarting {{ printf "%.2f" $value }} times / 5 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodcrashlooping + expr: | + rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[15m]) * 60 * 5 > 0 + for: 15m + labels: + severity: critical + - alert: KubePodNotReady + annotations: + message: Pod {{ $labels.namespace }}/{{ $labels.pod }} has been in a non-ready + state for longer than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodnotready + expr: | + sum by (namespace, pod) (max by(namespace, pod) (kube_pod_status_phase{job="kube-state-metrics", phase=~"Pending|Unknown"}) * on(namespace, pod) group_left(owner_kind) max by(namespace, pod, owner_kind) (kube_pod_owner{owner_kind!="Job"})) > 0 + for: 15m + labels: + severity: critical + - alert: KubeDeploymentGenerationMismatch + 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. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentgenerationmismatch + expr: | + kube_deployment_status_observed_generation{job="kube-state-metrics"} + != + kube_deployment_metadata_generation{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeDeploymentReplicasMismatch + annotations: + message: Deployment {{ $labels.namespace }}/{{ $labels.deployment }} has not + matched the expected number of replicas for longer than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentreplicasmismatch + expr: | + kube_deployment_spec_replicas{job="kube-state-metrics"} + != + kube_deployment_status_replicas_available{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetReplicasMismatch + annotations: + message: StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} has + not matched the expected number of replicas for longer than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetreplicasmismatch + expr: | + kube_statefulset_status_replicas_ready{job="kube-state-metrics"} + != + kube_statefulset_status_replicas{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetGenerationMismatch + 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. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetgenerationmismatch + expr: | + kube_statefulset_status_observed_generation{job="kube-state-metrics"} + != + kube_statefulset_metadata_generation{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetUpdateNotRolledOut + annotations: + message: StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} update + has not been rolled out. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetupdatenotrolledout + expr: | + max without (revision) ( + kube_statefulset_status_current_revision{job="kube-state-metrics"} + unless + kube_statefulset_status_update_revision{job="kube-state-metrics"} + ) + * + ( + kube_statefulset_replicas{job="kube-state-metrics"} + != + kube_statefulset_status_replicas_updated{job="kube-state-metrics"} + ) + for: 15m + labels: + severity: critical + - alert: KubeDaemonSetRolloutStuck + annotations: + message: Only {{ $value | humanizePercentage }} of the desired Pods of DaemonSet + {{ $labels.namespace }}/{{ $labels.daemonset }} are scheduled and ready. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck + expr: | + kube_daemonset_status_number_ready{job="kube-state-metrics"} + / + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} < 1.00 + for: 15m + labels: + severity: critical + - alert: KubeContainerWaiting + annotations: + message: Pod {{ $labels.namespace }}/{{ $labels.pod }} container {{ $labels.container}} + has been in waiting state for longer than 1 hour. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecontainerwaiting + expr: | + sum by (namespace, pod, container) (kube_pod_container_status_waiting_reason{job="kube-state-metrics"}) > 0 + for: 1h + labels: + severity: warning + - alert: KubeDaemonSetNotScheduled + annotations: + message: '{{ $value }} Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset + }} are not scheduled.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetnotscheduled + expr: | + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} + - + kube_daemonset_status_current_number_scheduled{job="kube-state-metrics"} > 0 + for: 10m + labels: + severity: warning + - alert: KubeDaemonSetMisScheduled + annotations: + message: '{{ $value }} Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset + }} are running where they are not supposed to run.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetmisscheduled + expr: | + kube_daemonset_status_number_misscheduled{job="kube-state-metrics"} > 0 + for: 10m + labels: + severity: warning + - alert: KubeCronJobRunning + annotations: + message: CronJob {{ $labels.namespace }}/{{ $labels.cronjob }} is taking more + than 1h to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecronjobrunning + expr: | + time() - kube_cronjob_next_schedule_time{job="kube-state-metrics"} > 3600 + for: 1h + labels: + severity: warning + - alert: KubeJobCompletion + annotations: + message: Job {{ $labels.namespace }}/{{ $labels.job_name }} is taking more + than one hour to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobcompletion + expr: | + kube_job_spec_completions{job="kube-state-metrics"} - kube_job_status_succeeded{job="kube-state-metrics"} > 0 + for: 1h + labels: + severity: warning + - alert: KubeJobFailed + annotations: + message: Job {{ $labels.namespace }}/{{ $labels.job_name }} failed to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobfailed + expr: | + kube_job_failed{job="kube-state-metrics"} > 0 + for: 15m + labels: + severity: warning + - alert: KubeHpaReplicasMismatch + annotations: + message: HPA {{ $labels.namespace }}/{{ $labels.hpa }} has not matched the + desired number of replicas for longer than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubehpareplicasmismatch + expr: | + (kube_hpa_status_desired_replicas{job="kube-state-metrics"} + != + kube_hpa_status_current_replicas{job="kube-state-metrics"}) + and + changes(kube_hpa_status_current_replicas[15m]) == 0 + for: 15m + labels: + severity: warning + - alert: KubeHpaMaxedOut + annotations: + message: HPA {{ $labels.namespace }}/{{ $labels.hpa }} has been running at + max replicas for longer than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubehpamaxedout + expr: | + kube_hpa_status_current_replicas{job="kube-state-metrics"} + == + kube_hpa_spec_max_replicas{job="kube-state-metrics"} + for: 15m + labels: + severity: warning + - name: kubernetes-resources + rules: + - alert: KubeCPUOvercommit + annotations: + message: Cluster has overcommitted CPU resource requests for Pods and cannot + tolerate node failure. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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) + for: 5m + labels: + severity: warning + - alert: KubeMemOvercommit + annotations: + message: Cluster has overcommitted memory resource requests for Pods and cannot + tolerate node failure. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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) + for: 5m + labels: + severity: warning + - alert: KubeCPUOvercommit + annotations: + message: Cluster has overcommitted CPU resource requests for Namespaces. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecpuovercommit + expr: | + sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="cpu"}) + / + sum(kube_node_status_allocatable_cpu_cores) + > 1.5 + for: 5m + labels: + severity: warning + - alert: KubeMemOvercommit + annotations: + message: Cluster has overcommitted memory resource requests for Namespaces. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubememovercommit + expr: | + sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="memory"}) + / + sum(kube_node_status_allocatable_memory_bytes{job="node-exporter"}) + > 1.5 + for: 5m + labels: + severity: warning + - alert: KubeQuotaExceeded + annotations: + message: Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage + }} of its {{ $labels.resource }} quota. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubequotaexceeded + expr: | + kube_resourcequota{job="kube-state-metrics", type="used"} + / ignoring(instance, job, type) + (kube_resourcequota{job="kube-state-metrics", type="hard"} > 0) + > 0.90 + for: 15m + labels: + severity: warning + - alert: CPUThrottlingHigh + annotations: + message: '{{ $value | humanizePercentage }} throttling of CPU in namespace + {{ $labels.namespace }} for container {{ $labels.container }} in pod {{ + $labels.pod }}.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-cputhrottlinghigh + expr: | + sum(increase(container_cpu_cfs_throttled_periods_total{container!="", }[5m])) by (container, pod, namespace) + / + sum(increase(container_cpu_cfs_periods_total{}[5m])) by (container, pod, namespace) + > ( 25 / 100 ) + for: 15m + labels: + severity: warning + - name: kubernetes-storage + rules: + - alert: KubePersistentVolumeUsageCritical + annotations: + message: The PersistentVolume claimed by {{ $labels.persistentvolumeclaim + }} in Namespace {{ $labels.namespace }} is only {{ $value | humanizePercentage + }} free. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeusagecritical + expr: | + kubelet_volume_stats_available_bytes{job="kubelet", metrics_path="/metrics"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet", metrics_path="/metrics"} + < 0.03 + for: 1m + labels: + severity: critical + - alert: KubePersistentVolumeFullInFourDays + 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 {{ $value | humanizePercentage }} is available. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumefullinfourdays + expr: | + ( + kubelet_volume_stats_available_bytes{job="kubelet", metrics_path="/metrics"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet", metrics_path="/metrics"} + ) < 0.15 + and + predict_linear(kubelet_volume_stats_available_bytes{job="kubelet", metrics_path="/metrics"}[6h], 4 * 24 * 3600) < 0 + for: 1h + labels: + severity: critical + - alert: KubePersistentVolumeErrors + annotations: + message: The persistent volume {{ $labels.persistentvolume }} has status {{ + $labels.phase }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeerrors + expr: | + kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0 + for: 5m + labels: + severity: critical + - name: kubernetes-system + rules: + - alert: KubeVersionMismatch + annotations: + message: There are {{ $value }} different semantic versions of Kubernetes + components running. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeversionmismatch + expr: | + count(count by (gitVersion) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"gitVersion","$1","gitVersion","(v[0-9]*.[0-9]*.[0-9]*).*"))) > 1 + for: 15m + labels: + severity: warning + - alert: KubeClientErrors + annotations: + message: Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance + }}' is experiencing {{ $value | humanizePercentage }} errors.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclienterrors + expr: | + (sum(rate(rest_client_requests_total{code=~"5.."}[5m])) by (instance, job) + / + sum(rate(rest_client_requests_total[5m])) by (instance, job)) + > 0.01 + for: 15m + labels: + severity: warning + - name: kube-apiserver-error + rules: + - alert: ErrorBudgetBurn + annotations: + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-errorbudgetburn + expr: | + ( + status_class_5xx:apiserver_request_total:ratio_rate1h{job="apiserver"} > (14.4*0.010000) + and + status_class_5xx:apiserver_request_total:ratio_rate5m{job="apiserver"} > (14.4*0.010000) + ) + or + ( + status_class_5xx:apiserver_request_total:ratio_rate6h{job="apiserver"} > (6*0.010000) + and + status_class_5xx:apiserver_request_total:ratio_rate30m{job="apiserver"} > (6*0.010000) + ) + labels: + job: apiserver + severity: critical + - alert: ErrorBudgetBurn + annotations: + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-errorbudgetburn + expr: | + ( + status_class_5xx:apiserver_request_total:ratio_rate1d{job="apiserver"} > (3*0.010000) + and + status_class_5xx:apiserver_request_total:ratio_rate2h{job="apiserver"} > (3*0.010000) + ) + or + ( + status_class_5xx:apiserver_request_total:ratio_rate3d{job="apiserver"} > (0.010000) + and + status_class_5xx:apiserver_request_total:ratio_rate6h{job="apiserver"} > (0.010000) + ) + labels: + job: apiserver + severity: warning + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[5m] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate5m + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[30m] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate30m + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[1h] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate1h + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[2h] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate2h + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[6h] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate6h + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[1d] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate1d + - expr: | + sum by (status_class) ( + label_replace( + rate(apiserver_request_total{job="apiserver"}[3d] + ), "status_class", "${1}xx", "code", "([0-9])..") + ) + labels: + job: apiserver + record: status_class:apiserver_request_total:rate3d + - expr: | + sum(status_class:apiserver_request_total:rate5m{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate5m{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate5m + - expr: | + sum(status_class:apiserver_request_total:rate30m{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate30m{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate30m + - expr: | + sum(status_class:apiserver_request_total:rate1h{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate1h{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate1h + - expr: | + sum(status_class:apiserver_request_total:rate2h{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate2h{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate2h + - expr: | + sum(status_class:apiserver_request_total:rate6h{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate6h{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate6h + - expr: | + sum(status_class:apiserver_request_total:rate1d{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate1d{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate1d + - expr: | + sum(status_class:apiserver_request_total:rate3d{job="apiserver",status_class="5xx"}) + / + sum(status_class:apiserver_request_total:rate3d{job="apiserver"}) + labels: + job: apiserver + record: status_class_5xx:apiserver_request_total:ratio_rate3d + - name: kubernetes-system-apiserver + rules: + - alert: KubeAPILatencyHigh + annotations: + message: The API server has an abnormal latency of {{ $value }} seconds for + {{ $labels.verb }} {{ $labels.resource }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh + expr: | + ( + cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} + > + on (verb) group_left() + ( + avg by (verb) (cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} >= 0) + + + 2*stddev by (verb) (cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} >= 0) + ) + ) > on (verb) group_left() + 1.2 * avg by (verb) (cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} >= 0) + and on (verb,resource) + cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{job="apiserver",quantile="0.99"} + > + 1 + for: 5m + labels: + severity: warning + - alert: KubeAPILatencyHigh + annotations: + message: The API server has a 99th percentile latency of {{ $value }} seconds + for {{ $labels.verb }} {{ $labels.resource }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh + expr: | + cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{job="apiserver",quantile="0.99"} > 4 + for: 10m + labels: + severity: critical + - alert: KubeAPIErrorsHigh + annotations: + message: API server is returning errors for {{ $value | humanizePercentage + }} of requests. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: | + sum(rate(apiserver_request_total{job="apiserver",code=~"5.."}[5m])) + / + sum(rate(apiserver_request_total{job="apiserver"}[5m])) > 0.03 + for: 10m + labels: + severity: critical + - alert: KubeAPIErrorsHigh + annotations: + message: API server is returning errors for {{ $value | humanizePercentage + }} of requests. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: | + sum(rate(apiserver_request_total{job="apiserver",code=~"5.."}[5m])) + / + sum(rate(apiserver_request_total{job="apiserver"}[5m])) > 0.01 + for: 10m + labels: + severity: warning + - alert: KubeAPIErrorsHigh + annotations: + message: API server is returning errors for {{ $value | humanizePercentage + }} of requests for {{ $labels.verb }} {{ $labels.resource }} {{ $labels.subresource + }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: | + sum(rate(apiserver_request_total{job="apiserver",code=~"5.."}[5m])) by (resource,subresource,verb) + / + sum(rate(apiserver_request_total{job="apiserver"}[5m])) by (resource,subresource,verb) > 0.10 + for: 10m + labels: + severity: critical + - alert: KubeAPIErrorsHigh + annotations: + message: API server is returning errors for {{ $value | humanizePercentage + }} of requests for {{ $labels.verb }} {{ $labels.resource }} {{ $labels.subresource + }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: | + sum(rate(apiserver_request_total{job="apiserver",code=~"5.."}[5m])) by (resource,subresource,verb) + / + sum(rate(apiserver_request_total{job="apiserver"}[5m])) by (resource,subresource,verb) > 0.05 + for: 10m + labels: + severity: warning + - alert: KubeClientCertificateExpiration + annotations: + message: A client certificate used to authenticate to the apiserver is expiring + in less than 7.0 days. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclientcertificateexpiration + expr: | + apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 604800 + labels: + severity: warning + - alert: KubeClientCertificateExpiration + annotations: + message: A client certificate used to authenticate to the apiserver is expiring + in less than 24.0 hours. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclientcertificateexpiration + expr: | + apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 86400 + labels: + severity: critical + - alert: KubeAPIDown + annotations: + message: KubeAPI has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapidown + expr: | + absent(up{job="apiserver"} == 1) + for: 15m + labels: + severity: critical + - name: kubernetes-system-kubelet + rules: + - alert: KubeNodeNotReady + annotations: + message: '{{ $labels.node }} has been unready for more than 15 minutes.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubenodenotready + expr: | + kube_node_status_condition{job="kube-state-metrics",condition="Ready",status="true"} == 0 + for: 15m + labels: + severity: warning + - alert: KubeNodeUnreachable + annotations: + message: '{{ $labels.node }} is unreachable and some workloads may be rescheduled.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubenodeunreachable + expr: | + kube_node_spec_taint{job="kube-state-metrics",key="node.kubernetes.io/unreachable",effect="NoSchedule"} == 1 + for: 2m + labels: + severity: warning + - alert: KubeletTooManyPods + annotations: + message: Kubelet '{{ $labels.node }}' is running at {{ $value | humanizePercentage + }} of its Pod capacity. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubelettoomanypods + expr: | + max(max(kubelet_running_pod_count{job="kubelet", metrics_path="/metrics"}) by(instance) * on(instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"}) by(node) / max(kube_node_status_capacity_pods{job="kube-state-metrics"}) by(node) > 0.95 + for: 15m + labels: + severity: warning + - alert: KubeletDown + annotations: + message: Kubelet has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletdown + expr: | + absent(up{job="kubelet", metrics_path="/metrics"} == 1) + for: 15m + labels: + severity: critical + - name: kubernetes-system-scheduler + rules: + - alert: KubeSchedulerDown + annotations: + message: KubeScheduler has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeschedulerdown + expr: | + absent(up{job="kube-scheduler"} == 1) + for: 15m + labels: + severity: critical + - name: kubernetes-system-controller-manager + rules: + - alert: KubeControllerManagerDown + annotations: + message: KubeControllerManager has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecontrollermanagerdown + expr: | + absent(up{job="kube-controller-manager"} == 1) + for: 15m + labels: + severity: critical + - name: prometheus + rules: + - alert: PrometheusBadConfig + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} has failed to + reload its configuration. + summary: Failed Prometheus configuration reload. + 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{job="prometheus-k8s",namespace="monitoring"}[5m]) == 0 + for: 10m + labels: + severity: critical + - alert: PrometheusNotificationQueueRunningFull + annotations: + description: Alert notification queue of Prometheus {{$labels.namespace}}/{{$labels.pod}} + is running full. + summary: Prometheus alert notification queue predicted to run full in less + than 30m. + 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{job="prometheus-k8s",namespace="monitoring"}[5m], 60 * 30) + > + min_over_time(prometheus_notifications_queue_capacity{job="prometheus-k8s",namespace="monitoring"}[5m]) + ) + for: 15m + labels: + severity: warning + - alert: PrometheusErrorSendingAlertsToSomeAlertmanagers + annotations: + description: '{{ printf "%.1f" $value }}% errors while sending alerts from + Prometheus {{$labels.namespace}}/{{$labels.pod}} to Alertmanager {{$labels.alertmanager}}.' + summary: Prometheus has encountered more than 1% errors sending alerts to + a specific Alertmanager. + expr: | + ( + rate(prometheus_notifications_errors_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + / + rate(prometheus_notifications_sent_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + ) + * 100 + > 1 + for: 15m + labels: + severity: warning + - alert: PrometheusErrorSendingAlertsToAnyAlertmanager + annotations: + description: '{{ printf "%.1f" $value }}% minimum errors while sending alerts + from Prometheus {{$labels.namespace}}/{{$labels.pod}} to any Alertmanager.' + summary: Prometheus encounters more than 3% errors sending alerts to any Alertmanager. + expr: | + min without(alertmanager) ( + rate(prometheus_notifications_errors_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + / + rate(prometheus_notifications_sent_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + ) + * 100 + > 3 + for: 15m + labels: + severity: critical + - alert: PrometheusNotConnectedToAlertmanagers + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} is not connected + to any Alertmanagers. + summary: Prometheus is not connected to any Alertmanagers. + 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{job="prometheus-k8s",namespace="monitoring"}[5m]) < 1 + for: 10m + labels: + severity: warning + - alert: PrometheusTSDBReloadsFailing + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} has detected + {{$value | humanize}} reload failures over the last 3h. + summary: Prometheus has issues reloading blocks from disk. + expr: | + increase(prometheus_tsdb_reloads_failures_total{job="prometheus-k8s",namespace="monitoring"}[3h]) > 0 + for: 4h + labels: + severity: warning + - alert: PrometheusTSDBCompactionsFailing + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} has detected + {{$value | humanize}} compaction failures over the last 3h. + summary: Prometheus has issues compacting blocks. + expr: | + increase(prometheus_tsdb_compactions_failed_total{job="prometheus-k8s",namespace="monitoring"}[3h]) > 0 + for: 4h + labels: + severity: warning + - alert: PrometheusNotIngestingSamples + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} is not ingesting + samples. + summary: Prometheus is not ingesting samples. + expr: | + rate(prometheus_tsdb_head_samples_appended_total{job="prometheus-k8s",namespace="monitoring"}[5m]) <= 0 + for: 10m + labels: + severity: warning + - alert: PrometheusDuplicateTimestamps + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} is dropping + {{ printf "%.4g" $value }} samples/s with different values but duplicated + timestamp. + summary: Prometheus is dropping samples with duplicate timestamps. + expr: | + rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="prometheus-k8s",namespace="monitoring"}[5m]) > 0 + for: 10m + labels: + severity: warning + - alert: PrometheusOutOfOrderTimestamps + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} is dropping + {{ printf "%.4g" $value }} samples/s with timestamps arriving out of order. + summary: Prometheus drops samples with out-of-order timestamps. + expr: | + rate(prometheus_target_scrapes_sample_out_of_order_total{job="prometheus-k8s",namespace="monitoring"}[5m]) > 0 + for: 10m + labels: + severity: warning + - alert: PrometheusRemoteStorageFailures + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} failed to send + {{ printf "%.1f" $value }}% of the samples to queue {{$labels.queue}}. + summary: Prometheus fails to send samples to remote storage. + expr: | + ( + rate(prometheus_remote_storage_failed_samples_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + / + ( + rate(prometheus_remote_storage_failed_samples_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + + + rate(prometheus_remote_storage_succeeded_samples_total{job="prometheus-k8s",namespace="monitoring"}[5m]) + ) + ) + * 100 + > 1 + for: 15m + labels: + severity: critical + - alert: PrometheusRemoteWriteBehind + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} remote write + is {{ printf "%.1f" $value }}s behind for queue {{$labels.queue}}. + summary: Prometheus remote write is behind. + 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{job="prometheus-k8s",namespace="monitoring"}[5m]) + - on(job, instance) group_right + max_over_time(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{job="prometheus-k8s",namespace="monitoring"}[5m]) + ) + > 120 + for: 15m + labels: + severity: critical + - alert: PrometheusRemoteWriteDesiredShards + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} remote write + desired shards calculation wants to run {{ $value }} shards, which is more + than the max of {{ printf `prometheus_remote_storage_shards_max{instance="%s",job="prometheus-k8s",namespace="monitoring"}` + $labels.instance | query | first | value }}. + summary: Prometheus remote write desired shards calculation wants to run more + than configured max shards. + 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{job="prometheus-k8s",namespace="monitoring"}[5m]) + > + max_over_time(prometheus_remote_storage_shards_max{job="prometheus-k8s",namespace="monitoring"}[5m]) + ) + for: 15m + labels: + severity: warning + - alert: PrometheusRuleFailures + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} has failed to + evaluate {{ printf "%.0f" $value }} rules in the last 5m. + summary: Prometheus is failing rule evaluations. + expr: | + increase(prometheus_rule_evaluation_failures_total{job="prometheus-k8s",namespace="monitoring"}[5m]) > 0 + for: 15m + labels: + severity: critical + - alert: PrometheusMissingRuleEvaluations + annotations: + description: Prometheus {{$labels.namespace}}/{{$labels.pod}} has missed {{ + printf "%.0f" $value }} rule group evaluations in the last 5m. + summary: Prometheus is missing rule evaluations due to slow rule group evaluation. + expr: | + increase(prometheus_rule_group_iterations_missed_total{job="prometheus-k8s",namespace="monitoring"}[5m]) > 0 + for: 15m + labels: + severity: warning + - 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{job="alertmanager-main",namespace="monitoring"}) BY (service) / ON(service) GROUP_LEFT() label_replace(max(prometheus_operator_spec_replicas{job="prometheus-operator",namespace="monitoring",controller="alertmanager"}) by (name, job, namespace, controller), "service", "alertmanager-$1", "name", "(.*)") != 1 + 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{job="alertmanager-main",namespace="monitoring"} == 0 + for: 10m + labels: + severity: warning + - alert: AlertmanagerMembersInconsistent + annotations: + message: Alertmanager has not found all other members of the cluster. + expr: | + alertmanager_cluster_members{job="alertmanager-main",namespace="monitoring"} + != on (service) GROUP_LEFT() + count by (service) (alertmanager_cluster_members{job="alertmanager-main",namespace="monitoring"}) + for: 5m + labels: + severity: critical + - name: general.rules + rules: + - alert: TargetDown + annotations: + message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service + }} targets in {{ $labels.namespace }} namespace 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 + - 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{job="node-exporter"}) > 0.05 + 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{job="node-exporter",device!~"veth.+"}[2m]) > 2 + for: 2m + labels: + severity: warning + - name: prometheus-operator + rules: + - alert: PrometheusOperatorReconcileErrors + annotations: + message: Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace + }} Namespace. + expr: | + rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator",namespace="monitoring"}[5m]) > 0.1 + for: 10m + labels: + severity: warning + - alert: PrometheusOperatorNodeLookupErrors + annotations: + message: Errors while reconciling Prometheus in {{ $labels.namespace }} Namespace. + expr: | + rate(prometheus_operator_node_address_lookup_errors_total{job="prometheus-operator",namespace="monitoring"}[5m]) > 0.1 + for: 10m + labels: + severity: warning diff --git a/monitoring/manifests/prometheus-service.yaml b/monitoring/manifests/prometheus-service.yaml new file mode 100644 index 0000000..4f61e88 --- /dev/null +++ b/monitoring/manifests/prometheus-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + prometheus: k8s + name: prometheus-k8s + namespace: monitoring +spec: + ports: + - name: web + port: 9090 + targetPort: web + selector: + app: prometheus + prometheus: k8s + sessionAffinity: ClientIP diff --git a/monitoring/manifests/prometheus-serviceAccount.yaml b/monitoring/manifests/prometheus-serviceAccount.yaml new file mode 100644 index 0000000..3e55fad --- /dev/null +++ b/monitoring/manifests/prometheus-serviceAccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: prometheus-k8s + namespace: monitoring diff --git a/monitoring/manifests/prometheus-serviceMonitor.yaml b/monitoring/manifests/prometheus-serviceMonitor.yaml new file mode 100644 index 0000000..b7605db --- /dev/null +++ b/monitoring/manifests/prometheus-serviceMonitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: prometheus + name: prometheus + namespace: monitoring +spec: + endpoints: + - interval: 30s + port: web + selector: + matchLabels: + prometheus: k8s diff --git a/monitoring/manifests/prometheus-serviceMonitorApiserver.yaml b/monitoring/manifests/prometheus-serviceMonitorApiserver.yaml new file mode 100644 index 0000000..500c0d3 --- /dev/null +++ b/monitoring/manifests/prometheus-serviceMonitorApiserver.yaml @@ -0,0 +1,74 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: apiserver + name: kube-apiserver + namespace: monitoring +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 30s + metricRelabelings: + - action: drop + regex: kubelet_(pod_worker_latency_microseconds|pod_start_latency_microseconds|cgroup_manager_latency_microseconds|pod_worker_start_latency_microseconds|pleg_relist_latency_microseconds|pleg_relist_interval_microseconds|runtime_operations|runtime_operations_latency_microseconds|runtime_operations_errors|eviction_stats_age_microseconds|device_plugin_registration_count|device_plugin_alloc_latency_microseconds|network_plugin_operations_latency_microseconds) + sourceLabels: + - __name__ + - action: drop + regex: scheduler_(e2e_scheduling_latency_microseconds|scheduling_algorithm_predicate_evaluation|scheduling_algorithm_priority_evaluation|scheduling_algorithm_preemption_evaluation|scheduling_algorithm_latency_microseconds|binding_latency_microseconds|scheduling_latency_seconds) + sourceLabels: + - __name__ + - action: drop + regex: apiserver_(request_count|request_latencies|request_latencies_summary|dropped_requests|storage_data_key_generation_latencies_microseconds|storage_transformation_failures_total|storage_transformation_latencies_microseconds|proxy_tunnel_sync_latency_secs) + sourceLabels: + - __name__ + - action: drop + regex: kubelet_docker_(operations|operations_latency_microseconds|operations_errors|operations_timeout) + sourceLabels: + - __name__ + - action: drop + regex: reflector_(items_per_list|items_per_watch|list_duration_seconds|lists_total|short_watches_total|watch_duration_seconds|watches_total) + sourceLabels: + - __name__ + - action: drop + regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary) + sourceLabels: + - __name__ + - action: drop + regex: transformation_(transformation_latencies_microseconds|failures_total) + sourceLabels: + - __name__ + - action: drop + regex: (admission_quota_controller_adds|crd_autoregistration_controller_work_duration|APIServiceOpenAPIAggregationControllerQueue1_adds|AvailableConditionController_retries|crd_openapi_controller_unfinished_work_seconds|APIServiceRegistrationController_retries|admission_quota_controller_longest_running_processor_microseconds|crdEstablishing_longest_running_processor_microseconds|crdEstablishing_unfinished_work_seconds|crd_openapi_controller_adds|crd_autoregistration_controller_retries|crd_finalizer_queue_latency|AvailableConditionController_work_duration|non_structural_schema_condition_controller_depth|crd_autoregistration_controller_unfinished_work_seconds|AvailableConditionController_adds|DiscoveryController_longest_running_processor_microseconds|autoregister_queue_latency|crd_autoregistration_controller_adds|non_structural_schema_condition_controller_work_duration|APIServiceRegistrationController_adds|crd_finalizer_work_duration|crd_naming_condition_controller_unfinished_work_seconds|crd_openapi_controller_longest_running_processor_microseconds|DiscoveryController_adds|crd_autoregistration_controller_longest_running_processor_microseconds|autoregister_unfinished_work_seconds|crd_naming_condition_controller_queue_latency|crd_naming_condition_controller_retries|non_structural_schema_condition_controller_queue_latency|crd_naming_condition_controller_depth|AvailableConditionController_longest_running_processor_microseconds|crdEstablishing_depth|crd_finalizer_longest_running_processor_microseconds|crd_naming_condition_controller_adds|APIServiceOpenAPIAggregationControllerQueue1_longest_running_processor_microseconds|DiscoveryController_queue_latency|DiscoveryController_unfinished_work_seconds|crd_openapi_controller_depth|APIServiceOpenAPIAggregationControllerQueue1_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_unfinished_work_seconds|DiscoveryController_work_duration|autoregister_adds|crd_autoregistration_controller_queue_latency|crd_finalizer_retries|AvailableConditionController_unfinished_work_seconds|autoregister_longest_running_processor_microseconds|non_structural_schema_condition_controller_unfinished_work_seconds|APIServiceOpenAPIAggregationControllerQueue1_depth|AvailableConditionController_depth|DiscoveryController_retries|admission_quota_controller_depth|crdEstablishing_adds|APIServiceOpenAPIAggregationControllerQueue1_retries|crdEstablishing_queue_latency|non_structural_schema_condition_controller_longest_running_processor_microseconds|autoregister_work_duration|crd_openapi_controller_retries|APIServiceRegistrationController_work_duration|crdEstablishing_work_duration|crd_finalizer_adds|crd_finalizer_depth|crd_openapi_controller_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_work_duration|APIServiceRegistrationController_queue_latency|crd_autoregistration_controller_depth|AvailableConditionController_queue_latency|admission_quota_controller_queue_latency|crd_naming_condition_controller_work_duration|crd_openapi_controller_work_duration|DiscoveryController_depth|crd_naming_condition_controller_longest_running_processor_microseconds|APIServiceRegistrationController_depth|APIServiceRegistrationController_longest_running_processor_microseconds|crd_finalizer_unfinished_work_seconds|crdEstablishing_retries|admission_quota_controller_unfinished_work_seconds|non_structural_schema_condition_controller_adds|APIServiceRegistrationController_unfinished_work_seconds|admission_quota_controller_work_duration|autoregister_depth|autoregister_retries|kubeproxy_sync_proxy_rules_latency_microseconds|rest_client_request_latency_seconds|non_structural_schema_condition_controller_retries) + sourceLabels: + - __name__ + - action: drop + regex: etcd_(debugging|disk|request|server).* + sourceLabels: + - __name__ + - action: drop + regex: apiserver_admission_controller_admission_latencies_seconds_.* + sourceLabels: + - __name__ + - action: drop + regex: apiserver_admission_step_admission_latencies_seconds_.* + sourceLabels: + - __name__ + - action: drop + regex: apiserver_request_duration_seconds_bucket;(0.15|0.25|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2.5|3|3.5|4.5|6|7|8|9|15|25|30|50) + sourceLabels: + - __name__ + - le + port: https + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + serverName: kubernetes + jobLabel: component + namespaceSelector: + matchNames: + - default + selector: + matchLabels: + component: apiserver + provider: kubernetes diff --git a/monitoring/manifests/prometheus-serviceMonitorCoreDNS.yaml b/monitoring/manifests/prometheus-serviceMonitorCoreDNS.yaml new file mode 100644 index 0000000..633aa18 --- /dev/null +++ b/monitoring/manifests/prometheus-serviceMonitorCoreDNS.yaml @@ -0,0 +1,19 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: coredns + name: coredns + namespace: monitoring +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 15s + port: metrics + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kube-dns diff --git a/monitoring/manifests/prometheus-serviceMonitorKubeControllerManager.yaml b/monitoring/manifests/prometheus-serviceMonitorKubeControllerManager.yaml new file mode 100644 index 0000000..7f20fce --- /dev/null +++ b/monitoring/manifests/prometheus-serviceMonitorKubeControllerManager.yaml @@ -0,0 +1,55 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: kube-controller-manager + name: kube-controller-manager + namespace: monitoring +spec: + endpoints: + - interval: 30s + metricRelabelings: + - action: drop + regex: kubelet_(pod_worker_latency_microseconds|pod_start_latency_microseconds|cgroup_manager_latency_microseconds|pod_worker_start_latency_microseconds|pleg_relist_latency_microseconds|pleg_relist_interval_microseconds|runtime_operations|runtime_operations_latency_microseconds|runtime_operations_errors|eviction_stats_age_microseconds|device_plugin_registration_count|device_plugin_alloc_latency_microseconds|network_plugin_operations_latency_microseconds) + sourceLabels: + - __name__ + - action: drop + regex: scheduler_(e2e_scheduling_latency_microseconds|scheduling_algorithm_predicate_evaluation|scheduling_algorithm_priority_evaluation|scheduling_algorithm_preemption_evaluation|scheduling_algorithm_latency_microseconds|binding_latency_microseconds|scheduling_latency_seconds) + sourceLabels: + - __name__ + - action: drop + regex: apiserver_(request_count|request_latencies|request_latencies_summary|dropped_requests|storage_data_key_generation_latencies_microseconds|storage_transformation_failures_total|storage_transformation_latencies_microseconds|proxy_tunnel_sync_latency_secs) + sourceLabels: + - __name__ + - action: drop + regex: kubelet_docker_(operations|operations_latency_microseconds|operations_errors|operations_timeout) + sourceLabels: + - __name__ + - action: drop + regex: reflector_(items_per_list|items_per_watch|list_duration_seconds|lists_total|short_watches_total|watch_duration_seconds|watches_total) + sourceLabels: + - __name__ + - action: drop + regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary) + sourceLabels: + - __name__ + - action: drop + regex: transformation_(transformation_latencies_microseconds|failures_total) + sourceLabels: + - __name__ + - action: drop + regex: (admission_quota_controller_adds|crd_autoregistration_controller_work_duration|APIServiceOpenAPIAggregationControllerQueue1_adds|AvailableConditionController_retries|crd_openapi_controller_unfinished_work_seconds|APIServiceRegistrationController_retries|admission_quota_controller_longest_running_processor_microseconds|crdEstablishing_longest_running_processor_microseconds|crdEstablishing_unfinished_work_seconds|crd_openapi_controller_adds|crd_autoregistration_controller_retries|crd_finalizer_queue_latency|AvailableConditionController_work_duration|non_structural_schema_condition_controller_depth|crd_autoregistration_controller_unfinished_work_seconds|AvailableConditionController_adds|DiscoveryController_longest_running_processor_microseconds|autoregister_queue_latency|crd_autoregistration_controller_adds|non_structural_schema_condition_controller_work_duration|APIServiceRegistrationController_adds|crd_finalizer_work_duration|crd_naming_condition_controller_unfinished_work_seconds|crd_openapi_controller_longest_running_processor_microseconds|DiscoveryController_adds|crd_autoregistration_controller_longest_running_processor_microseconds|autoregister_unfinished_work_seconds|crd_naming_condition_controller_queue_latency|crd_naming_condition_controller_retries|non_structural_schema_condition_controller_queue_latency|crd_naming_condition_controller_depth|AvailableConditionController_longest_running_processor_microseconds|crdEstablishing_depth|crd_finalizer_longest_running_processor_microseconds|crd_naming_condition_controller_adds|APIServiceOpenAPIAggregationControllerQueue1_longest_running_processor_microseconds|DiscoveryController_queue_latency|DiscoveryController_unfinished_work_seconds|crd_openapi_controller_depth|APIServiceOpenAPIAggregationControllerQueue1_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_unfinished_work_seconds|DiscoveryController_work_duration|autoregister_adds|crd_autoregistration_controller_queue_latency|crd_finalizer_retries|AvailableConditionController_unfinished_work_seconds|autoregister_longest_running_processor_microseconds|non_structural_schema_condition_controller_unfinished_work_seconds|APIServiceOpenAPIAggregationControllerQueue1_depth|AvailableConditionController_depth|DiscoveryController_retries|admission_quota_controller_depth|crdEstablishing_adds|APIServiceOpenAPIAggregationControllerQueue1_retries|crdEstablishing_queue_latency|non_structural_schema_condition_controller_longest_running_processor_microseconds|autoregister_work_duration|crd_openapi_controller_retries|APIServiceRegistrationController_work_duration|crdEstablishing_work_duration|crd_finalizer_adds|crd_finalizer_depth|crd_openapi_controller_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_work_duration|APIServiceRegistrationController_queue_latency|crd_autoregistration_controller_depth|AvailableConditionController_queue_latency|admission_quota_controller_queue_latency|crd_naming_condition_controller_work_duration|crd_openapi_controller_work_duration|DiscoveryController_depth|crd_naming_condition_controller_longest_running_processor_microseconds|APIServiceRegistrationController_depth|APIServiceRegistrationController_longest_running_processor_microseconds|crd_finalizer_unfinished_work_seconds|crdEstablishing_retries|admission_quota_controller_unfinished_work_seconds|non_structural_schema_condition_controller_adds|APIServiceRegistrationController_unfinished_work_seconds|admission_quota_controller_work_duration|autoregister_depth|autoregister_retries|kubeproxy_sync_proxy_rules_latency_microseconds|rest_client_request_latency_seconds|non_structural_schema_condition_controller_retries) + sourceLabels: + - __name__ + - action: drop + regex: etcd_(debugging|disk|request|server).* + sourceLabels: + - __name__ + port: http-metrics + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kube-controller-manager diff --git a/monitoring/manifests/prometheus-serviceMonitorKubeScheduler.yaml b/monitoring/manifests/prometheus-serviceMonitorKubeScheduler.yaml new file mode 100644 index 0000000..f00db0e --- /dev/null +++ b/monitoring/manifests/prometheus-serviceMonitorKubeScheduler.yaml @@ -0,0 +1,18 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: kube-scheduler + name: kube-scheduler + namespace: monitoring +spec: + endpoints: + - interval: 30s + port: http-metrics + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kube-scheduler diff --git a/monitoring/manifests/prometheus-serviceMonitorKubelet.yaml b/monitoring/manifests/prometheus-serviceMonitorKubelet.yaml new file mode 100644 index 0000000..6ee73fd --- /dev/null +++ b/monitoring/manifests/prometheus-serviceMonitorKubelet.yaml @@ -0,0 +1,77 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: kubelet + name: kubelet + namespace: monitoring +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + honorLabels: true + interval: 30s + metricRelabelings: + - action: drop + regex: kubelet_(pod_worker_latency_microseconds|pod_start_latency_microseconds|cgroup_manager_latency_microseconds|pod_worker_start_latency_microseconds|pleg_relist_latency_microseconds|pleg_relist_interval_microseconds|runtime_operations|runtime_operations_latency_microseconds|runtime_operations_errors|eviction_stats_age_microseconds|device_plugin_registration_count|device_plugin_alloc_latency_microseconds|network_plugin_operations_latency_microseconds) + sourceLabels: + - __name__ + - action: drop + regex: scheduler_(e2e_scheduling_latency_microseconds|scheduling_algorithm_predicate_evaluation|scheduling_algorithm_priority_evaluation|scheduling_algorithm_preemption_evaluation|scheduling_algorithm_latency_microseconds|binding_latency_microseconds|scheduling_latency_seconds) + sourceLabels: + - __name__ + - action: drop + regex: apiserver_(request_count|request_latencies|request_latencies_summary|dropped_requests|storage_data_key_generation_latencies_microseconds|storage_transformation_failures_total|storage_transformation_latencies_microseconds|proxy_tunnel_sync_latency_secs) + sourceLabels: + - __name__ + - action: drop + regex: kubelet_docker_(operations|operations_latency_microseconds|operations_errors|operations_timeout) + sourceLabels: + - __name__ + - action: drop + regex: reflector_(items_per_list|items_per_watch|list_duration_seconds|lists_total|short_watches_total|watch_duration_seconds|watches_total) + sourceLabels: + - __name__ + - action: drop + regex: etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary) + sourceLabels: + - __name__ + - action: drop + regex: transformation_(transformation_latencies_microseconds|failures_total) + sourceLabels: + - __name__ + - action: drop + regex: (admission_quota_controller_adds|crd_autoregistration_controller_work_duration|APIServiceOpenAPIAggregationControllerQueue1_adds|AvailableConditionController_retries|crd_openapi_controller_unfinished_work_seconds|APIServiceRegistrationController_retries|admission_quota_controller_longest_running_processor_microseconds|crdEstablishing_longest_running_processor_microseconds|crdEstablishing_unfinished_work_seconds|crd_openapi_controller_adds|crd_autoregistration_controller_retries|crd_finalizer_queue_latency|AvailableConditionController_work_duration|non_structural_schema_condition_controller_depth|crd_autoregistration_controller_unfinished_work_seconds|AvailableConditionController_adds|DiscoveryController_longest_running_processor_microseconds|autoregister_queue_latency|crd_autoregistration_controller_adds|non_structural_schema_condition_controller_work_duration|APIServiceRegistrationController_adds|crd_finalizer_work_duration|crd_naming_condition_controller_unfinished_work_seconds|crd_openapi_controller_longest_running_processor_microseconds|DiscoveryController_adds|crd_autoregistration_controller_longest_running_processor_microseconds|autoregister_unfinished_work_seconds|crd_naming_condition_controller_queue_latency|crd_naming_condition_controller_retries|non_structural_schema_condition_controller_queue_latency|crd_naming_condition_controller_depth|AvailableConditionController_longest_running_processor_microseconds|crdEstablishing_depth|crd_finalizer_longest_running_processor_microseconds|crd_naming_condition_controller_adds|APIServiceOpenAPIAggregationControllerQueue1_longest_running_processor_microseconds|DiscoveryController_queue_latency|DiscoveryController_unfinished_work_seconds|crd_openapi_controller_depth|APIServiceOpenAPIAggregationControllerQueue1_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_unfinished_work_seconds|DiscoveryController_work_duration|autoregister_adds|crd_autoregistration_controller_queue_latency|crd_finalizer_retries|AvailableConditionController_unfinished_work_seconds|autoregister_longest_running_processor_microseconds|non_structural_schema_condition_controller_unfinished_work_seconds|APIServiceOpenAPIAggregationControllerQueue1_depth|AvailableConditionController_depth|DiscoveryController_retries|admission_quota_controller_depth|crdEstablishing_adds|APIServiceOpenAPIAggregationControllerQueue1_retries|crdEstablishing_queue_latency|non_structural_schema_condition_controller_longest_running_processor_microseconds|autoregister_work_duration|crd_openapi_controller_retries|APIServiceRegistrationController_work_duration|crdEstablishing_work_duration|crd_finalizer_adds|crd_finalizer_depth|crd_openapi_controller_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_work_duration|APIServiceRegistrationController_queue_latency|crd_autoregistration_controller_depth|AvailableConditionController_queue_latency|admission_quota_controller_queue_latency|crd_naming_condition_controller_work_duration|crd_openapi_controller_work_duration|DiscoveryController_depth|crd_naming_condition_controller_longest_running_processor_microseconds|APIServiceRegistrationController_depth|APIServiceRegistrationController_longest_running_processor_microseconds|crd_finalizer_unfinished_work_seconds|crdEstablishing_retries|admission_quota_controller_unfinished_work_seconds|non_structural_schema_condition_controller_adds|APIServiceRegistrationController_unfinished_work_seconds|admission_quota_controller_work_duration|autoregister_depth|autoregister_retries|kubeproxy_sync_proxy_rules_latency_microseconds|rest_client_request_latency_seconds|non_structural_schema_condition_controller_retries) + sourceLabels: + - __name__ + port: https-metrics + relabelings: + - sourceLabels: + - __metrics_path__ + targetLabel: metrics_path + scheme: https + tlsConfig: + insecureSkipVerify: true + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + honorLabels: true + interval: 30s + metricRelabelings: + - action: drop + regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s) + sourceLabels: + - __name__ + path: /metrics/cadvisor + port: https-metrics + relabelings: + - sourceLabels: + - __metrics_path__ + targetLabel: metrics_path + scheme: https + tlsConfig: + insecureSkipVerify: true + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kubelet diff --git a/monitoring/manifests/setup/0namespace-namespace.yaml b/monitoring/manifests/setup/0namespace-namespace.yaml new file mode 100644 index 0000000..d325236 --- /dev/null +++ b/monitoring/manifests/setup/0namespace-namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: monitoring diff --git a/monitoring/manifests/setup/prometheus-operator-0alertmanagerCustomResourceDefinition.yaml b/monitoring/manifests/setup/prometheus-operator-0alertmanagerCustomResourceDefinition.yaml new file mode 100644 index 0000000..43e0e1e --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-0alertmanagerCustomResourceDefinition.yaml @@ -0,0 +1,4490 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: alertmanagers.monitoring.coreos.com +spec: + additionalPrinterColumns: + - JSONPath: .spec.version + description: The version of Alertmanager + name: Version + type: string + - JSONPath: .spec.replicas + description: The desired replicas number of Alertmanagers + name: Replicas + type: integer + - JSONPath: .metadata.creationTimestamp + name: Age + type: date + group: monitoring.coreos.com + names: + kind: Alertmanager + listKind: AlertmanagerList + plural: alertmanagers + singular: alertmanager + scope: Namespaced + subresources: {} + validation: + openAPIV3Schema: + description: Alertmanager describes an Alertmanager cluster. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: 'Specification of the desired behavior of the Alertmanager + cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/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: If specified, the pod's scheduling constraints. + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the pod. + 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 node selector term, associated with the + corresponding weight. + 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: + - preference + - weight + 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 an update), the system may or may not try to + eventually evict the pod from its node. + 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: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + 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: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + 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: + additionalProperties: + type: string + 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: + - podAffinityTerm + - weight + 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 + matches 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. + 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: + additionalProperties: + type: string + 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: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some other + pod(s)). + 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: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + 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: + additionalProperties: + type: string + 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: + - podAffinityTerm + - weight + 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 + matches 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. + 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: + additionalProperties: + type: string + 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/. + items: + type: string + type: array + configSecret: + description: ConfigSecret is the name of a Kubernetes Secret in the + same namespace as the Alertmanager object, which contains configuration + for this Alertmanager instance. Defaults to 'alertmanager-' + The secret is mounted into /etc/alertmanager/config. + type: string + 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: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + 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.' + 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: '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.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + 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 + 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: The ConfigMap to select from + 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 + 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: The Secret to select from + 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 + 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: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + 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' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed to + the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. Other + management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + 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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 < x < 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 < x < 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: '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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: '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/' + 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. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + 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: 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. + 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: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. This field is alpha-level and it is + only honored by servers that enable the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 + 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: + - devicePath + - name + 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: + - mountPath + - name + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + 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: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + 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.' + 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: '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.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + 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 + 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: The ConfigMap to select from + 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 + 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: The Secret to select from + 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 + 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: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + 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' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed to + the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. Other + management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + 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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 < x < 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 < x < 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: '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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: '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/' + 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. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + 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: 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. + 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: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. This field is alpha-level and it is + only honored by servers that enable the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 + 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: + - devicePath + - name + 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: + - mountPath + - name + 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: + additionalProperties: + type: string + 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: 'Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata Labels and Annotations gets propagated to the prometheus + pods.' + 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: Define resources requests and limits for single Pods. + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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/. + items: + type: string + type: array + securityContext: + description: SecurityContext holds pod-level security attributes and + common container settings. This defaults to the default 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 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---- \n If 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: 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. + 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: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint of + the container process. Defaults to the user specified in image + metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. This + field is alpha-level and it is only honored by servers that + enable the WindowsRunAsUserName 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: Storage is the definition of how storage will be used by + the Alertmanager instances. + properties: + emptyDir: + description: 'EmptyDirVolumeSource to be used by the Prometheus + StatefulSets. If specified, used in place of any volumeClaimTemplate. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + 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' + type: string + type: object + volumeClaimTemplate: + description: A PVC spec to be used by the Prometheus StatefulSets. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + type: object + 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' + 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: 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. + 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: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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 query over volumes to consider for + binding. + 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: + additionalProperties: + type: string + 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: 'Status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + 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: + additionalProperties: + type: string + 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: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned + from one status to another. + 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: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + 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 using the matching + operator . + 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: + - mountPath + - name + 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: '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' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + 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 + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + 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://examples.k8s.io/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://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + 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 + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + 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: 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. + 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 + type: object + readOnly: + description: Specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + 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: DownwardAPI represents downward API about the pod + that should populate this volume + 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: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + 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: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + 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' + type: string + type: object + fc: + description: FC represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + 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. + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: + additionalProperties: + type: string + 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: '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.' + 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 + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> 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: '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' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: '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.' + 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: 'Glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/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://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + 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 + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + 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: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : 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: CHAP Secret for iSCSI target and initiator authentication + 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 + 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: + - iqn + - lun + - targetPortal + 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: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + 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: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + 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: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + 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: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + 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: Items for all in one resources secrets, configmaps, + and downward API + 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: information about the configMap data to + project + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + 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: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + 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: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + 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: Quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + 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: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + 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 + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + 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: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + 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 + 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 + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + 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: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + 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. + 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 + 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: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + 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: '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/sig-architecture/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: + - availableReplicas + - paused + - replicas + - unavailableReplicas + - updatedReplicas + type: object + required: + - spec + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/monitoring/manifests/setup/prometheus-operator-0podmonitorCustomResourceDefinition.yaml b/monitoring/manifests/setup/prometheus-operator-0podmonitorCustomResourceDefinition.yaml new file mode 100644 index 0000000..5af42d6 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-0podmonitorCustomResourceDefinition.yaml @@ -0,0 +1,265 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: podmonitors.monitoring.coreos.com +spec: + group: monitoring.coreos.com + names: + kind: PodMonitor + listKind: PodMonitorList + plural: podmonitors + singular: podmonitor + scope: Namespaced + validation: + openAPIV3Schema: + description: PodMonitor defines monitoring 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Specification of desired Pod selection for target discovery + by Prometheus. + properties: + jobLabel: + description: The label to use to retrieve the job name from. + type: string + namespaceSelector: + description: Selector to select which namespaces the Endpoints objects + are discovered from. + 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 + honorTimestamps: + description: HonorTimestamps controls whether Prometheus respects + the timestamps present in scraped data. + 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 + ``-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. Default 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: + additionalProperties: + items: + type: string + type: array + 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 + ``-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. Default 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: integer + - type: string + description: Name or number of the target port of the endpoint. + Mutually exclusive with port. + x-kubernetes-int-or-string: true + 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: Selector to select Pod 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: + additionalProperties: + type: string + 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 + required: + - spec + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/monitoring/manifests/setup/prometheus-operator-0prometheusCustomResourceDefinition.yaml b/monitoring/manifests/setup/prometheus-operator-0prometheusCustomResourceDefinition.yaml new file mode 100644 index 0000000..29effa2 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-0prometheusCustomResourceDefinition.yaml @@ -0,0 +1,5829 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: prometheuses.monitoring.coreos.com +spec: + additionalPrinterColumns: + - JSONPath: .spec.version + description: The version of Prometheus + name: Version + type: string + - JSONPath: .spec.replicas + description: The desired replicas number of Prometheuses + name: Replicas + type: integer + - JSONPath: .metadata.creationTimestamp + name: Age + type: date + group: monitoring.coreos.com + names: + kind: Prometheus + listKind: PrometheusList + plural: prometheuses + singular: prometheus + scope: Namespaced + subresources: {} + validation: + openAPIV3Schema: + description: Prometheus defines a Prometheus deployment. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: '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: 'AdditionalAlertManagerConfigs allows specifying a key + of a Secret containing additional Prometheus AlertManager configurations. + AlertManager configurations specified are appended to the configurations + generated by the Prometheus Operator. Job configurations specified + must have the form as specified in the official Prometheus documentation: + https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config. + As AlertManager configs are appended, the user is responsible to make + sure it is valid. Note that using this feature may expose the possibility + to break upgrades of Prometheus. It is advised to review Prometheus + release notes to ensure that no incompatible AlertManager configs + are going to break Prometheus after the upgrade.' + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + additionalAlertRelabelConfigs: + description: 'AdditionalAlertRelabelConfigs allows specifying a key + of a Secret containing additional Prometheus alert relabel configurations. + Alert relabel configurations specified are appended to the configurations + generated by the Prometheus Operator. Alert relabel configurations + specified must have the form as specified in the official Prometheus + documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs. + As alert relabel configs are appended, the user is responsible to + make sure it is valid. Note that using this feature may expose the + possibility to break upgrades of Prometheus. It is advised to review + Prometheus release notes to ensure that no incompatible alert relabel + configs are going to break Prometheus after the upgrade.' + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + additionalScrapeConfigs: + description: 'AdditionalScrapeConfigs allows specifying a key of a Secret + containing additional Prometheus scrape configurations. Scrape configurations + specified are appended to the configurations generated by the Prometheus + Operator. Job configurations specified must have the form as specified + in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. + As scrape configs are appended, the user is responsible to make sure + it is valid. Note that using this feature may expose the possibility + to break upgrades of Prometheus. It is advised to review Prometheus + release notes to ensure that no incompatible scrape configs are going + to break Prometheus after the upgrade.' + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + affinity: + description: If specified, the pod's scheduling constraints. + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the pod. + 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 node selector term, associated with the + corresponding weight. + 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: + - preference + - weight + 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 an update), the system may or may not try to + eventually evict the pod from its node. + 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: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + 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: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + 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: + additionalProperties: + type: string + 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: + - podAffinityTerm + - weight + 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 + matches 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. + 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: + additionalProperties: + type: string + 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: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some other + pod(s)). + 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: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + 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: + additionalProperties: + type: string + 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: + - podAffinityTerm + - weight + 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 + matches 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. + 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: + additionalProperties: + type: string + 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: Define details regarding alerting. + 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: + apiVersion: + description: Version of the Alertmanager API that Prometheus + uses to send alerts. It can be "v1" or "v2". + type: string + 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: integer + - type: string + description: Port the Alertmanager API is exposed on. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use when firing alerts. + type: string + tlsConfig: + description: TLS Config to use for alertmanager connection. + properties: + ca: + description: Stuct containing the CA cert to use for the + targets. + properties: + configMap: + description: ConfigMap containing data to use for + the targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the + targets. + 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 + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + cert: + description: Struct containing the client cert file for + the targets. + properties: + configMap: + description: ConfigMap containing data to use for + the targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the + targets. + 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 + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus + container for the targets. + type: string + keySecret: + description: Secret containing the client key file for + the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + required: + - name + - namespace + - port + type: object + type: array + required: + - alertmanagers + type: object + apiserverConfig: + description: APIServerConfig allows specifying a host and auth methods + to access apiserver. If left empty, Prometheus is assumed to run inside + of the cluster and will discover API servers automatically and use + the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. + properties: + basicAuth: + description: BasicAuth allow an endpoint to authenticate over basic + authentication + properties: + password: + description: The secret in the service monitor namespace that + contains the password for authentication. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + username: + description: The secret in the service monitor namespace that + contains the username for authentication. + 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 + 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: TLS Config to use for accessing apiserver. + properties: + ca: + description: Stuct containing the CA cert to use for the targets. + properties: + configMap: + description: ConfigMap containing data to use for the targets. + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + cert: + description: Struct containing the client cert file for the + targets. + properties: + configMap: + description: ConfigMap containing data to use for the targets. + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus container + for the targets. + type: string + keySecret: + description: Secret containing the client key file for the targets. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + required: + - host + type: object + arbitraryFSAccessThroughSMs: + description: ArbitraryFSAccessThroughSMs configures whether configuration + based on a service monitor can access arbitrary files on the file + system of the Prometheus container e.g. bearer token files. + properties: + deny: + type: boolean + 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/. + 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: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + 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.' + 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: '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.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + 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 + 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: The ConfigMap to select from + 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 + 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: The Secret to select from + 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 + 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: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + 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' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed to + the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. Other + management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + 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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 < x < 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 < x < 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: '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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: '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/' + 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. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + 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: 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. + 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: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. This field is alpha-level and it is + only honored by servers that enable the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 + 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: + - devicePath + - name + 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: + - mountPath + - name + 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 + disableCompaction: + description: Disable prometheus compaction. + type: boolean + 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 + enforcedNamespaceLabel: + description: EnforcedNamespaceLabel enforces adding a namespace label + of origin for each alert and metric that is user created. The label + value will always be the namespace of the object that is being created. + type: string + evaluationInterval: + description: Interval between consecutive evaluations. + type: string + externalLabels: + additionalProperties: + type: string + 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 + ignoreNamespaceSelectors: + description: IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector + settings from the podmonitor and servicemonitor configs, and they + will only discover endpoints within their current namespace. Defaults + to false. + type: boolean + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + 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: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + 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.' + 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: '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.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + 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 + 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: The ConfigMap to select from + 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 + 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: The Secret to select from + 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 + 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: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + 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' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed to + the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. Other + management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + 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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 < x < 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 < x < 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: '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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: '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/' + 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. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + 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: 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. + 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: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. This field is alpha-level and it is + only honored by servers that enable the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 + 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: + - devicePath + - name + 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: + - mountPath + - name + 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: + additionalProperties: + type: string + description: Define which Nodes the Pods are scheduled on. + type: object + overrideHonorLabels: + description: OverrideHonorLabels if set to true overrides all user configured + honor_labels. If HonorLabels is set in ServiceMonitor or PodMonitor + to true, this overrides honor_labels to false. + type: boolean + overrideHonorTimestamps: + description: OverrideHonorTimestamps allows to globally enforce honoring + timestamps in all scrape configs. + type: boolean + paused: + description: When a Prometheus deployment is paused, no actions except + for deletion will be performed on the underlying objects. + type: boolean + podMetadata: + description: 'Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata Labels and Annotations gets propagated to the prometheus + pods.' + type: object + podMonitorNamespaceSelector: + description: Namespaces to be selected for PodMonitor discovery. If + nil, only check own namespace. + 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: + additionalProperties: + type: string + 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: '*Experimental* PodMonitors to be selected for target discovery.' + 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: + additionalProperties: + type: string + 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 for the URL. + properties: + password: + description: The secret in the service monitor namespace that + contains the password for authentication. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + username: + description: The secret in the service monitor namespace that + contains the username for authentication. + 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 + 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: + additionalProperties: + type: string + 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: TLS Config to use for remote read. + properties: + ca: + description: Stuct containing the CA cert to use for the targets. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + cert: + description: Struct containing the client cert file for the + targets. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus + container for the targets. + type: string + keySecret: + description: Secret containing the client key file for the + targets. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + 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 for the URL. + properties: + password: + description: The secret in the service monitor namespace that + contains the password for authentication. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + username: + description: The secret in the service monitor namespace that + contains the username for authentication. + 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 + 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 tuning of the remote write queue + parameters. + 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. + 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. + type: integer + maxSamplesPerSend: + description: MaxSamplesPerSend is the maximum number of samples + per send. + type: integer + maxShards: + description: MaxShards is the maximum number of shards, i.e. + amount of concurrency. + 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. + type: integer + type: object + remoteTimeout: + description: Timeout for requests to the remote write endpoint. + type: string + tlsConfig: + description: TLS Config to use for remote write. + properties: + ca: + description: Stuct containing the CA cert to use for the targets. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + cert: + description: Struct containing the client cert file for the + targets. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus + container for the targets. + type: string + keySecret: + description: Secret containing the client key file for the + targets. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + 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 + ``-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. Default 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: Define resources requests and limits for single Pods. + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: Namespaces to be selected for PrometheusRules discovery. + If unspecified, only the same namespace as the Prometheus object is + in is used. + 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: + additionalProperties: + type: string + 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 selector to select which PrometheusRules to mount for + loading alerting rules from. Until (excluding) Prometheus Operator + v0.24.0 Prometheus Operator will migrate any legacy rule ConfigMaps + to PrometheusRule custom resources selected by RuleSelector. Make + sure it does not match any config maps that you do not want to be + migrated. + 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: + additionalProperties: + type: string + 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/. + items: + type: string + type: array + securityContext: + description: SecurityContext holds pod-level security attributes and + common container settings. This defaults to the default 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 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---- \n If 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: 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. + 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: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint of + the container process. Defaults to the user specified in image + metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. This + field is alpha-level and it is only honored by servers that + enable the WindowsRunAsUserName 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: Namespaces to be selected for ServiceMonitor discovery. + If nil, only check own namespace. + 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: + additionalProperties: + type: string + 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: ServiceMonitors to be selected for target discovery. + 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: + additionalProperties: + type: string + 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: Storage spec to specify how storage shall be used. + properties: + emptyDir: + description: 'EmptyDirVolumeSource to be used by the Prometheus + StatefulSets. If specified, used in place of any volumeClaimTemplate. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + 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' + type: string + type: object + volumeClaimTemplate: + description: A PVC spec to be used by the Prometheus StatefulSets. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + type: object + 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' + 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: 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. + 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: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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 query over volumes to consider for + binding. + 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: + additionalProperties: + type: string + 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: 'Status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + 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: + additionalProperties: + type: string + 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: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned + from one status to another. + 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: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + 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: "Thanos configuration allows configuring various aspects + of a Prometheus server in a Thanos environment. \n This section is + experimental, it may change significantly without deprecation notice + in any release. \n This is experimental and may change significantly + without backward compatibility in any release." + 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 + listenLocal: + description: ListenLocal makes the Thanos sidecar listen on loopback, + so that it does not bind against the Pod IP. + type: boolean + objectStorageConfig: + description: ObjectStorageConfig configures object storage in Thanos. + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + resources: + description: Resources defines the resource requirements for the + Thanos sidecar. If not provided, no requests/limits will be set + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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 + tracingConfig: + description: TracingConfig configures tracing in Thanos. This is + an experimental feature, it may change in any upcoming release + in a breaking way. + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + 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 using the matching + operator . + 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: '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' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + 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 + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + 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://examples.k8s.io/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://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + 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 + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + 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: 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. + 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 + type: object + readOnly: + description: Specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + 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: DownwardAPI represents downward API about the pod + that should populate this volume + 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: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + 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: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + 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' + type: string + type: object + fc: + description: FC represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + 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. + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: + additionalProperties: + type: string + 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: '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.' + 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 + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> 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: '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' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: '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.' + 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: 'Glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/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://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + 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 + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + 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: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : 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: CHAP Secret for iSCSI target and initiator authentication + 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 + 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: + - iqn + - lun + - targetPortal + 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: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + 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: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + 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: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + 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: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + 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: Items for all in one resources secrets, configmaps, + and downward API + 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: information about the configMap data to + project + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + 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: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + 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: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + 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: Quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + 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: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + 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 + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + 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: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + 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 + 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 + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + 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: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + 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. + 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 + 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: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + 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 >= 2.11.0. + type: boolean + type: object + status: + description: '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/sig-architecture/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: + - availableReplicas + - paused + - replicas + - unavailableReplicas + - updatedReplicas + type: object + required: + - spec + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/monitoring/manifests/setup/prometheus-operator-0prometheusruleCustomResourceDefinition.yaml b/monitoring/manifests/setup/prometheus-operator-0prometheusruleCustomResourceDefinition.yaml new file mode 100644 index 0000000..2a903bb --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-0prometheusruleCustomResourceDefinition.yaml @@ -0,0 +1,95 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: prometheusrules.monitoring.coreos.com +spec: + group: monitoring.coreos.com + names: + kind: PrometheusRule + listKind: PrometheusRuleList + plural: prometheusrules + singular: prometheusrule + scope: Namespaced + validation: + openAPIV3Schema: + description: PrometheusRule defines alerting rules for a Prometheus instance + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Specification of desired alerting rule definitions for Prometheus. + properties: + groups: + description: Content of Prometheus rule file + items: + description: 'RuleGroup is a list of sequentially evaluated recording + and alerting rules. Note: PartialResponseStrategy is only used by + ThanosRuler and will be ignored by Prometheus instances. Valid + values for this field are ''warn'' or ''abort''. More info: https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response' + properties: + interval: + type: string + name: + type: string + partial_response_strategy: + type: string + rules: + items: + description: Rule describes an alerting or recording rule. + properties: + alert: + type: string + annotations: + additionalProperties: + type: string + type: object + expr: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + for: + type: string + labels: + additionalProperties: + type: string + type: object + record: + type: string + required: + - expr + type: object + type: array + required: + - name + - rules + type: object + type: array + type: object + required: + - spec + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/monitoring/manifests/setup/prometheus-operator-0servicemonitorCustomResourceDefinition.yaml b/monitoring/manifests/setup/prometheus-operator-0servicemonitorCustomResourceDefinition.yaml new file mode 100644 index 0000000..3410ec3 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-0servicemonitorCustomResourceDefinition.yaml @@ -0,0 +1,463 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: servicemonitors.monitoring.coreos.com +spec: + group: monitoring.coreos.com + names: + kind: ServiceMonitor + listKind: ServiceMonitorList + plural: servicemonitors + singular: servicemonitor + scope: Namespaced + validation: + openAPIV3Schema: + description: ServiceMonitor defines monitoring for a set of services. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Specification of desired Service selection for target discovery + by Prometheus. + 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: The secret in the service monitor namespace that + contains the password for authentication. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + username: + description: The secret in the service monitor namespace that + contains the username for authentication. + 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 + 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 + bearerTokenSecret: + description: Secret to mount to read bearer token for scraping + targets. The secret needs to be in the same namespace as the + service monitor and accessible by the Prometheus Operator. + 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 + optional: + description: Specify whether the Secret or its key must be + defined + type: boolean + required: + - key + type: object + honorLabels: + description: HonorLabels chooses the metric's labels on collisions + with target labels. + type: boolean + honorTimestamps: + description: HonorTimestamps controls whether Prometheus respects + the timestamps present in scraped data. + 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 + ``-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. Default 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: + additionalProperties: + items: + type: string + type: array + 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 + ``-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. Default 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: integer + - type: string + description: Name or number of the target port of the endpoint. + Mutually exclusive with port. + x-kubernetes-int-or-string: true + tlsConfig: + description: TLS configuration to use when scraping the endpoint + properties: + ca: + description: Stuct containing the CA cert to use for the targets. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + cert: + description: Struct containing the client cert file for the + targets. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + secret: + description: Secret containing data to use for the targets. + 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 + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus + container for the targets. + type: string + keySecret: + description: Secret containing the client key file for the + targets. + 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 + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + 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: Selector to select which namespaces the Endpoints objects + are discovered from. + 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: Selector to select Endpoints 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: + additionalProperties: + type: string + 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 + required: + - spec + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/monitoring/manifests/setup/prometheus-operator-0thanosrulerCustomResourceDefinition.yaml b/monitoring/manifests/setup/prometheus-operator-0thanosrulerCustomResourceDefinition.yaml new file mode 100644 index 0000000..7d66f73 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-0thanosrulerCustomResourceDefinition.yaml @@ -0,0 +1,3818 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: thanosrulers.monitoring.coreos.com +spec: + group: monitoring.coreos.com + names: + kind: ThanosRuler + listKind: ThanosRulerList + plural: thanosrulers + singular: thanosruler + scope: Namespaced + validation: + openAPIV3Schema: + description: ThanosRuler defines a ThanosRuler deployment. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: 'Specification of the desired behavior of the ThanosRuler cluster. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + alertDropLabels: + description: AlertDropLabels configure the label names which should + be dropped in ThanosRuler alerts. If `labels` field is not provided, + `thanos_ruler_replica` will be dropped in alerts by default. + items: + type: string + type: array + alertmanagersConfig: + description: Define configuration for connecting to alertmanager. Only + available with thanos v0.10.0 and higher. Maps to the `alertmanagers.config` + arg. + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + alertmanagersUrl: + description: Define URL to send alerts to alertmanager. For Thanos + v0.10.0 and higher, AlertManagersConfig should be used instead. Maps + to the `alertmanagers.url` arg. + type: string + containers: + description: 'Containers allows injecting additional containers or modifying + operator generated containers. This can be used to allow adding an + authentication proxy to a ThanosRuler 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: `thanos-ruler` and `rules-configmap-reloader`. 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: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + 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.' + 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: '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.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + 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 + 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: The ConfigMap to select from + 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 + 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: The Secret to select from + 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 + 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: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + 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' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed to + the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. Other + management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + 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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 < x < 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 < x < 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: '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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: '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/' + 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. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + 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: 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. + 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: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. This field is alpha-level and it is + only honored by servers that enable the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 + 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: + - devicePath + - name + 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: + - mountPath + - name + 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 + enforcedNamespaceLabel: + description: EnforcedNamespaceLabel enforces adding a namespace label + of origin for each alert and metric that is user created. The label + value will always be the namespace of the object that is being created. + type: string + evaluationInterval: + description: Interval between consecutive evaluations. + type: string + image: + description: Thanos container image URL. + type: string + imagePullSecrets: + description: An optional list of references to secrets in the same namespace + to use for pulling thanos 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + 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 ThanosRuler 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: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + 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.' + 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: '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.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + 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 + 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: The ConfigMap to select from + 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 + 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: The Secret to select from + 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 + 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: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + 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' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The reason for termination is passed to + the handler. The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period. Other + management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + 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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 < x < 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 < x < 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: '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' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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: '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/' + 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. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + 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: 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. + 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: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + 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 + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. This field is alpha-level and it is + only honored by servers that enable the WindowsRunAsUserName + feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. This is an alpha feature enabled by the StartupProbe + feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. + Exec specifies the action to take. + 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: HTTPGet specifies the http request to perform. + 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: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP + port. TCP hooks not yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + 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. + x-kubernetes-int-or-string: true + 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 + 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: + - devicePath + - name + 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: + - mountPath + - name + 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 + labels: + additionalProperties: + type: string + description: Labels configure the external label pairs to ThanosRuler. + If not provided, default replica label `thanos_ruler_replica` will + be added as a label and be dropped in alerts. + type: object + listenLocal: + description: ListenLocal makes the Thanos ruler listen on loopback, + so that it does not bind against the Pod IP. + type: boolean + logFormat: + description: Log format for ThanosRuler to be configured with. + type: string + logLevel: + description: Log level for ThanosRuler to be configured with. + type: string + objectStorageConfig: + description: ObjectStorageConfig configures object storage in Thanos. + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + paused: + description: When a ThanosRuler deployment is paused, no actions except + for deletion will be performed on the underlying objects. + type: boolean + podMetadata: + description: 'Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata Labels and Annotations gets propagated to the prometheus + pods.' + type: object + portName: + description: Port name used for the pods and governing service. This + defaults to web + type: string + queryEndpoints: + description: QueryEndpoints defines Thanos querier endpoints from which + to query metrics. Maps to the --query flag of thanos ruler. + items: + type: string + type: array + replicas: + description: Number of thanos ruler instances to deploy. + format: int32 + type: integer + resources: + description: Resources defines the resource requirements for the Thanos + sidecar. If not provided, no requests/limits will be set + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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 ThanosRuler 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 + ruleNamespaceSelector: + description: Namespaces to be selected for Rules discovery. If unspecified, + only the same namespace as the ThanosRuler object is in is used. + 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: + additionalProperties: + type: string + 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 to select which PrometheusRules to mount + for alerting and recording. + 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: + additionalProperties: + type: string + 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 + storage: + description: Storage spec to specify how storage shall be used. + properties: + emptyDir: + description: 'EmptyDirVolumeSource to be used by the Prometheus + StatefulSets. If specified, used in place of any volumeClaimTemplate. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + 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' + type: string + type: object + volumeClaimTemplate: + description: A PVC spec to be used by the Prometheus StatefulSets. + 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + type: object + 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' + 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: 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. + 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: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + type: string + 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: + additionalProperties: + type: string + 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 query over volumes to consider for + binding. + 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: + additionalProperties: + type: string + 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: 'Status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + 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: + additionalProperties: + type: string + 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: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned + from one status to another. + 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: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + type: object + type: array + phase: + description: Phase represents the current phase of PersistentVolumeClaim. + type: string + type: object + type: object + type: object + tracingConfig: + description: TracingConfig configures tracing in Thanos. This is an + experimental feature, it may change in any upcoming release in a breaking + way. + 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 + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + 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: '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' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + 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 + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + 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://examples.k8s.io/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://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + 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 + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + 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 + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + 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: 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. + 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 + type: object + readOnly: + description: Specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + 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: DownwardAPI represents downward API about the pod + that should populate this volume + 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: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + 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: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + 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' + type: string + type: object + fc: + description: FC represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + 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. + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: + additionalProperties: + type: string + 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: '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.' + 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 + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> 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: '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' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + 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: '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.' + 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: 'Glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/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://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + 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 + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + 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: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : 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: CHAP Secret for iSCSI target and initiator authentication + 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 + 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: + - iqn + - lun + - targetPortal + 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: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + 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: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + 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: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + 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: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + 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: Items for all in one resources secrets, configmaps, + and downward API + 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: information about the configMap data to + project + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + 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: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + 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: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + 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" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + 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 + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + 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: Quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + 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: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + 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 + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + 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 + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + 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: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + 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 + 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 + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + 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: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + 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. + 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 + 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: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + 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 + required: + - queryEndpoints + type: object + status: + description: 'Most recent observed status of the ThanosRuler cluster. Read-only. + Not included when requesting from the apiserver, only from the ThanosRuler + Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + properties: + availableReplicas: + description: Total number of available pods (ready for at least minReadySeconds) + targeted by this ThanosRuler deployment. + format: int32 + type: integer + paused: + description: Represents whether any actions on the underlying managed + objects are being performed. Only delete actions will be performed. + type: boolean + replicas: + description: Total number of non-terminated pods targeted by this ThanosRuler + deployment (their labels match the selector). + format: int32 + type: integer + unavailableReplicas: + description: Total number of unavailable pods targeted by this ThanosRuler + deployment. + format: int32 + type: integer + updatedReplicas: + description: Total number of non-terminated pods targeted by this ThanosRuler + deployment that have the desired version spec. + format: int32 + type: integer + required: + - availableReplicas + - paused + - replicas + - unavailableReplicas + - updatedReplicas + type: object + required: + - spec + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/monitoring/manifests/setup/prometheus-operator-clusterRole.yaml b/monitoring/manifests/setup/prometheus-operator-clusterRole.yaml new file mode 100644 index 0000000..82c4de9 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-clusterRole.yaml @@ -0,0 +1,89 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + name: prometheus-operator +rules: +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - create +- apiGroups: + - apiextensions.k8s.io + resourceNames: + - alertmanagers.monitoring.coreos.com + - podmonitors.monitoring.coreos.com + - prometheuses.monitoring.coreos.com + - prometheusrules.monitoring.coreos.com + - servicemonitors.monitoring.coreos.com + - thanosrulers.monitoring.coreos.com + resources: + - customresourcedefinitions + verbs: + - get + - update +- apiGroups: + - monitoring.coreos.com + resources: + - alertmanagers + - alertmanagers/finalizers + - prometheuses + - prometheuses/finalizers + - thanosrulers + - thanosrulers/finalizers + - servicemonitors + - podmonitors + - prometheusrules + verbs: + - '*' +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - '*' +- apiGroups: + - "" + resources: + - configmaps + - secrets + verbs: + - '*' +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - delete +- apiGroups: + - "" + resources: + - services + - services/finalizers + - endpoints + verbs: + - get + - create + - update + - delete +- apiGroups: + - "" + resources: + - nodes + verbs: + - list + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch diff --git a/monitoring/manifests/setup/prometheus-operator-clusterRoleBinding.yaml b/monitoring/manifests/setup/prometheus-operator-clusterRoleBinding.yaml new file mode 100644 index 0000000..61a7bb3 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-clusterRoleBinding.yaml @@ -0,0 +1,16 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + name: prometheus-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-operator +subjects: +- kind: ServiceAccount + name: prometheus-operator + namespace: monitoring diff --git a/monitoring/manifests/setup/prometheus-operator-deployment.yaml b/monitoring/manifests/setup/prometheus-operator-deployment.yaml new file mode 100644 index 0000000..b70592f --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + name: prometheus-operator + namespace: monitoring +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + template: + metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + spec: + containers: + - args: + - --kubelet-service=kube-system/kubelet + - --logtostderr=true + - --config-reloader-image=jimmidyson/configmap-reload:v0.3.0 + - --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.36.0 + image: quay.io/coreos/prometheus-operator:v0.36.0 + name: prometheus-operator + ports: + - containerPort: 8080 + name: http + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi + securityContext: + allowPrivilegeEscalation: false + nodeSelector: + beta.kubernetes.io/os: linux + securityContext: + runAsNonRoot: true + runAsUser: 65534 + serviceAccountName: prometheus-operator diff --git a/monitoring/manifests/setup/prometheus-operator-service.yaml b/monitoring/manifests/setup/prometheus-operator-service.yaml new file mode 100644 index 0000000..53b5d72 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + name: prometheus-operator + namespace: monitoring +spec: + clusterIP: None + ports: + - name: http + port: 8080 + targetPort: http + selector: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator diff --git a/monitoring/manifests/setup/prometheus-operator-serviceAccount.yaml b/monitoring/manifests/setup/prometheus-operator-serviceAccount.yaml new file mode 100644 index 0000000..cd91827 --- /dev/null +++ b/monitoring/manifests/setup/prometheus-operator-serviceAccount.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: controller + app.kubernetes.io/name: prometheus-operator + app.kubernetes.io/version: v0.36.0 + name: prometheus-operator + namespace: monitoring diff --git a/monitoring/monitoring.jsonnet b/monitoring/monitoring.jsonnet new file mode 100644 index 0000000..5ba97cb --- /dev/null +++ b/monitoring/monitoring.jsonnet @@ -0,0 +1,28 @@ +local kp = + (import 'kube-prometheus/kube-prometheus.libsonnet') + + // Uncomment the following imports to enable its patches + // (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet') + + { + _config+:: { + namespace: 'monitoring', + }, + }; + +{ ['setup/0namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } + +{ + ['setup/prometheus-operator-' + name]: kp.prometheusOperator[name] + for name in std.filter((function(name) name != 'serviceMonitor'), std.objectFields(kp.prometheusOperator)) +} + +// serviceMonitor is separated so that it can be created after the CRDs are ready +{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } + +{ ['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) } + +{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } + +{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } + diff --git a/monitoring/vendor/etcd-mixin/README.md b/monitoring/vendor/etcd-mixin/README.md new file mode 100644 index 0000000..224066f --- /dev/null +++ b/monitoring/vendor/etcd-mixin/README.md @@ -0,0 +1,25 @@ +# 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/monitoring/vendor/etcd-mixin/mixin.libsonnet b/monitoring/vendor/etcd-mixin/mixin.libsonnet new file mode 100644 index 0000000..3d0c4b3 --- /dev/null +++ b/monitoring/vendor/etcd-mixin/mixin.libsonnet @@ -0,0 +1,1293 @@ +{ + _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: ||| + increase((max by (job) (etcd_server_leader_changes_seen_total{%(etcd_selector)s}) or 0*absent(etcd_server_leader_changes_seen_total{%(etcd_selector)s}))[15m:1m]) >= 3 + ||| % $._config, + 'for': '5m', + labels: { + severity: 'warning', + }, + annotations: { + message: 'etcd cluster "{{ $labels.job }}": {{ $value }} leader changes within the last 15 minutes. Frequent elections may be a sign of insufficient resources, high network latency, or disruptions by other components and should be investigated.', + }, + }, + { + 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/monitoring/vendor/etcd-mixin/test.yaml b/monitoring/vendor/etcd-mixin/test.yaml new file mode 100644 index 0000000..56ee613 --- /dev/null +++ b/monitoring/vendor/etcd-mixin/test.yaml @@ -0,0 +1,115 @@ +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).' + - interval: 1m + input_series: + - series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}' + values: '0 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0' + - series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}' + values: '0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0' + - series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}' + values: '0 0 0 0 0 0 0 0' + alert_rule_test: + - eval_time: 10m + alertname: etcdHighNumberOfLeaderChanges + exp_alerts: + - exp_labels: + job: etcd + severity: warning + exp_annotations: + message: 'etcd cluster "etcd": 3 leader changes within the last 15 minutes. Frequent elections may be a sign of insufficient resources, high network latency, or disruptions by other components and should be investigated.' + - interval: 1m + input_series: + - series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.0"}' + values: '0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0' + - series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.1"}' + values: '0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0' + - series: 'etcd_server_leader_changes_seen_total{job="etcd",instance="10.10.10.2"}' + values: '0 0 0 0 0 0 0 0' + alert_rule_test: + - eval_time: 10m + alertname: etcdHighNumberOfLeaderChanges + exp_alerts: + diff --git a/monitoring/vendor/grafana-builder/grafana.libsonnet b/monitoring/vendor/grafana-builder/grafana.libsonnet new file mode 100644 index 0000000..eca9cba --- /dev/null +++ b/monitoring/vendor/grafana-builder/grafana.libsonnet @@ -0,0 +1,418 @@ +{ + 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: 'default', + value: 'default', + }, + 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/monitoring/vendor/grafana/configs/dashboard-sources/dashboards.libsonnet b/monitoring/vendor/grafana/configs/dashboard-sources/dashboards.libsonnet new file mode 100644 index 0000000..1240bb7 --- /dev/null +++ b/monitoring/vendor/grafana/configs/dashboard-sources/dashboards.libsonnet @@ -0,0 +1,14 @@ +{ + apiVersion: 1, + providers: [ + { + name: '0', + orgId: 1, + folder: '', + type: 'file', + options: { + path: '/grafana-dashboard-definitions/0', + }, + }, + ], +} diff --git a/monitoring/vendor/grafana/grafana.libsonnet b/monitoring/vendor/grafana/grafana.libsonnet new file mode 100644 index 0000000..e4c3c3a --- /dev/null +++ b/monitoring/vendor/grafana/grafana.libsonnet @@ -0,0 +1,182 @@ +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + _config+:: { + namespace: 'default', + + versions+:: { + grafana: '6.4.3', + }, + + imageRepos+:: { + grafana: 'grafana/grafana', + }, + + prometheus+:: { + name: 'k8s', + serviceName: 'prometheus-' + $._config.prometheus.name, + }, + + grafana+:: { + dashboards: {}, + rawDashboards: {}, + datasources: [{ + name: 'prometheus', + type: 'prometheus', + access: 'proxy', + orgId: 1, + url: 'http://' + $._config.prometheus.serviceName + '.' + $._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.encodeUTF8(std.manifestIni($._config.grafana.config))) } + + if $._config.grafana.ldap != null then { 'ldap.toml': std.base64(std.encodeUTF8($._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) + ] + if std.length($._config.grafana.rawDashboards) > 0 then + [ + local dashboardName = 'grafana-dashboard-' + std.strReplace(name, '.json', ''); + configMap.new(dashboardName, { [name]: $._config.grafana.rawDashboards[name] }) + + configMap.mixin.metadata.withNamespace($._config.namespace) + + for name in std.objectFields($._config.grafana.rawDashboards) + ] else [], + 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.encodeUTF8(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) + ] + + [ + local dashboardName = std.strReplace(name, '.json', ''); + containerVolumeMount.new('grafana-dashboard-' + dashboardName, '/grafana-dashboard-definitions/0/' + dashboardName) + for name in std.objectFields($._config.grafana.rawDashboards) + ] + + + 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) + ] + + [ + local dashboardName = 'grafana-dashboard-' + std.strReplace(name, '.json', ''); + volume.withName(dashboardName) + + volume.mixin.configMap.withName(dashboardName) + for name in std.objectFields($._config.grafana.rawDashboards) + ] + + 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/monitoring/vendor/grafana/jsonnetfile.json b/monitoring/vendor/grafana/jsonnetfile.json new file mode 100644 index 0000000..52c8ba3 --- /dev/null +++ b/monitoring/vendor/grafana/jsonnetfile.json @@ -0,0 +1,24 @@ +{ + "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/monitoring/vendor/grafonnet/alert_condition.libsonnet b/monitoring/vendor/grafonnet/alert_condition.libsonnet new file mode 100644 index 0000000..d70a1d3 --- /dev/null +++ b/monitoring/vendor/grafonnet/alert_condition.libsonnet @@ -0,0 +1,44 @@ +{ + /** + * 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/monitoring/vendor/grafonnet/annotation.libsonnet b/monitoring/vendor/grafonnet/annotation.libsonnet new file mode 100644 index 0000000..653211e --- /dev/null +++ b/monitoring/vendor/grafonnet/annotation.libsonnet @@ -0,0 +1,35 @@ +{ + 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/monitoring/vendor/grafonnet/cloudwatch.libsonnet b/monitoring/vendor/grafonnet/cloudwatch.libsonnet new file mode 100644 index 0000000..6312eda --- /dev/null +++ b/monitoring/vendor/grafonnet/cloudwatch.libsonnet @@ -0,0 +1,39 @@ +{ + /** + * 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/monitoring/vendor/grafonnet/dashboard.libsonnet b/monitoring/vendor/grafonnet/dashboard.libsonnet new file mode 100644 index 0000000..0583c72 --- /dev/null +++ b/monitoring/vendor/grafonnet/dashboard.libsonnet @@ -0,0 +1,147 @@ +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, + addAnnotations(annotations):: self { + _annotations+:: annotations, + }, + addAnnotation(a):: self.addAnnotations([a]), + addTemplates(templates):: self { + templates+: templates, + }, + addTemplate(t):: self.addTemplates([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/monitoring/vendor/grafonnet/elasticsearch.libsonnet b/monitoring/vendor/grafonnet/elasticsearch.libsonnet new file mode 100644 index 0000000..65158d0 --- /dev/null +++ b/monitoring/vendor/grafonnet/elasticsearch.libsonnet @@ -0,0 +1,38 @@ +{ + target( + query, + timeField, + 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, + }, + }], + 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/monitoring/vendor/grafonnet/gauge.libsonnet b/monitoring/vendor/grafonnet/gauge.libsonnet new file mode 100644 index 0000000..396090c --- /dev/null +++ b/monitoring/vendor/grafonnet/gauge.libsonnet @@ -0,0 +1,32 @@ +{ + new( + title, + datasource=null, + calc='mean', + description='', + height=null, + transparent=null, + ):: + { + [if description != '' then 'description']: description, + [if height != null then 'height']: height, + [if transparent != null then 'transparent']: transparent, + title: title, + type: 'gauge', + datasource: datasource, + options: { + fieldOptions: { + calcs: [ + calc, + ], + }, + }, + _nextTarget:: 0, + addTarget(target):: self { + local nextTarget = super._nextTarget, + _nextTarget: nextTarget + 1, + targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }], + }, + }, + +} diff --git a/monitoring/vendor/grafonnet/grafana.libsonnet b/monitoring/vendor/grafonnet/grafana.libsonnet new file mode 100644 index 0000000..8c17a32 --- /dev/null +++ b/monitoring/vendor/grafonnet/grafana.libsonnet @@ -0,0 +1,22 @@ +{ + 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', + gauge:: import 'gauge.libsonnet', +} diff --git a/monitoring/vendor/grafonnet/graph_panel.libsonnet b/monitoring/vendor/grafonnet/graph_panel.libsonnet new file mode 100644 index 0000000..3b92f5a --- /dev/null +++ b/monitoring/vendor/grafonnet/graph_panel.libsonnet @@ -0,0 +1,248 @@ +{ + /** + * 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 labelY1 Label of the first Y axe + * @param labelY2 Label of the second Y axe + * @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 x_axis_buckets restricts the x axis to this amount of buckets + * @param x_axis_min restricts the x axis to display from this value if supplied + * @param x_axis_max restricts the x axis to display up to this value if supplied + * @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 + * @param shared_tooltip Boolean Allow to group or spit tooltips on mouseover within a chart + * @param percentage Boolean (defaut: false) show as percentages + * @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, + labelY1=null, + labelY2=null, + x_axis_mode='time', + x_axis_values='total', + x_axis_buckets=null, + x_axis_min=null, + x_axis_max=null, + 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', + shared_tooltip=true, + percentage=false, + time_from=null, + time_shift=null, + ):: { + 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, label=labelY1), + self.yaxe(if formatY2 != null then formatY2 else format, min, max, decimals=decimals, logBase=logBase2Y, label=labelY2), + ], + xaxis: { + show: show_xaxis, + mode: x_axis_mode, + name: null, + values: if x_axis_mode == 'series' then [x_axis_values] else [], + buckets: if x_axis_mode == 'histogram' then [x_axis_buckets] else null, + [if x_axis_min != null then 'min']: x_axis_min, + [if x_axis_max != null then 'max']: x_axis_max, + }, + lines: lines, + fill: fill, + linewidth: linewidth, + dashes: dashes, + dashLength: 10, + spaceLength: 10, + points: points, + pointradius: pointradius, + bars: bars, + stack: stack, + percentage: percentage, + 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: shared_tooltip, + sort: if sort == 'decreasing' then 2 else if sort == 'increasing' then 1 else sort, + }, + timeFrom: time_from, + timeShift: time_shift, + [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), + addSeriesOverride(override):: self { + seriesOverrides+: [override], + }, + resetYaxes():: self { + yaxes: [], + }, + addYaxis( + format='short', + min=null, + max=null, + label=null, + show=true, + logBase=1, + decimals=null, + ):: self { + 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/monitoring/vendor/grafonnet/graphite.libsonnet b/monitoring/vendor/grafonnet/graphite.libsonnet new file mode 100644 index 0000000..15e20eb --- /dev/null +++ b/monitoring/vendor/grafonnet/graphite.libsonnet @@ -0,0 +1,27 @@ +{ + /** + * 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/monitoring/vendor/grafonnet/heatmap_panel.libsonnet b/monitoring/vendor/grafonnet/heatmap_panel.libsonnet new file mode 100644 index 0000000..bf38cda --- /dev/null +++ b/monitoring/vendor/grafonnet/heatmap_panel.libsonnet @@ -0,0 +1,137 @@ +{ + /* + * 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/monitoring/vendor/grafonnet/influxdb.libsonnet b/monitoring/vendor/grafonnet/influxdb.libsonnet new file mode 100644 index 0000000..8e0451f --- /dev/null +++ b/monitoring/vendor/grafonnet/influxdb.libsonnet @@ -0,0 +1,27 @@ +{ + /** + * 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/monitoring/vendor/grafonnet/link.libsonnet b/monitoring/vendor/grafonnet/link.libsonnet new file mode 100644 index 0000000..97db18a --- /dev/null +++ b/monitoring/vendor/grafonnet/link.libsonnet @@ -0,0 +1,24 @@ +{ + 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/monitoring/vendor/grafonnet/pie_chart_panel.libsonnet b/monitoring/vendor/grafonnet/pie_chart_panel.libsonnet new file mode 100644 index 0000000..1c41588 --- /dev/null +++ b/monitoring/vendor/grafonnet/pie_chart_panel.libsonnet @@ -0,0 +1,54 @@ +{ + /** + * 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', + valueName='current', + showLegend=true, + showLegendPercentage=true, + legendType='Right side', + ):: { + type: 'grafana-piechart-panel', + [if description != null then 'description']: description, + 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, + valueName: valueName, + datasource: datasource, + legend: { + show: showLegend, + values: true, + percentage: showLegendPercentage, + }, + legendType: legendType, + 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/monitoring/vendor/grafonnet/prometheus.libsonnet b/monitoring/vendor/grafonnet/prometheus.libsonnet new file mode 100644 index 0000000..f3e866f --- /dev/null +++ b/monitoring/vendor/grafonnet/prometheus.libsonnet @@ -0,0 +1,21 @@ +{ + target( + expr, + format='time_series', + intervalFactor=2, + legendFormat='', + datasource=null, + interval=null, + instant=null, + hide=null, + ):: { + [if hide != null then 'hide']: hide, + [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/monitoring/vendor/grafonnet/row.libsonnet b/monitoring/vendor/grafonnet/row.libsonnet new file mode 100644 index 0000000..f5eb6c7 --- /dev/null +++ b/monitoring/vendor/grafonnet/row.libsonnet @@ -0,0 +1,32 @@ +{ + 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/monitoring/vendor/grafonnet/singlestat.libsonnet b/monitoring/vendor/grafonnet/singlestat.libsonnet new file mode 100644 index 0000000..8092006 --- /dev/null +++ b/monitoring/vendor/grafonnet/singlestat.libsonnet @@ -0,0 +1,133 @@ +{ + 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, + timeFrom=null, + links=[], + tableColumn='', + maxPerRow=null, + ):: + { + [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: links, + [if decimals != null then 'decimals']: decimals, + maxDataPoints: 100, + interval: interval, + cacheTimeout: null, + format: format, + prefix: prefix, + postfix: postfix, + nullText: null, + valueMaps: valueMaps, + [if maxPerRow != null then 'maxPerRow']: maxPerRow, + 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, + [if timeFrom != null then 'timeFrom']: timeFrom, + 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: 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/monitoring/vendor/grafonnet/sql.libsonnet b/monitoring/vendor/grafonnet/sql.libsonnet new file mode 100644 index 0000000..22229f6 --- /dev/null +++ b/monitoring/vendor/grafonnet/sql.libsonnet @@ -0,0 +1,11 @@ +{ + target( + rawSql, + datasource=null, + format='time_series', + ):: { + [if datasource != null then 'datasource']: datasource, + format: format, + rawSql: rawSql, + }, +} diff --git a/monitoring/vendor/grafonnet/table_panel.libsonnet b/monitoring/vendor/grafonnet/table_panel.libsonnet new file mode 100644 index 0000000..e20e904 --- /dev/null +++ b/monitoring/vendor/grafonnet/table_panel.libsonnet @@ -0,0 +1,108 @@ +{ + /** + * 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 height Height 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 Columns for the panel + * @param sort Sorting instruction for the panel + * @param transform allow table manipulation to present data as desired + * @param transparent Boolean (default: false) If set to true the panel will be transparent + * @return A json that represents a table panel + */ + new( + title, + description=null, + span=null, + min_span=null, + height=null, + datasource=null, + styles=[], + transform=null, + transparent=false, + columns=[], + sort=null, + time_from=null, + time_shift=null, + ):: { + type: 'table', + title: title, + [if span != null then 'span']: span, + [if min_span != null then 'minSpan']: min_span, + [if height != null then 'height']: height, + datasource: datasource, + targets: [ + ], + styles: styles, + columns: columns, + timeFrom: time_from, + timeShift: time_shift, + [if sort != null then 'sort']: sort, + [if description != null then 'description']: description, + [if transform != null then 'transform']: transform, + [if transparent == true then 'transparent']: transparent, + + _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_], + }, + hideColumn(field):: self { + styles+: [{ + alias: field, + pattern: field, + type: 'hidden', + }], + }, + }, +} diff --git a/monitoring/vendor/grafonnet/template.libsonnet b/monitoring/vendor/grafonnet/template.libsonnet new file mode 100644 index 0000000..ff8c33f --- /dev/null +++ b/monitoring/vendor/grafonnet/template.libsonnet @@ -0,0 +1,134 @@ +{ + 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={}, + multi=false, + allValues=null, + includeAll=false, + hide='', + ):: + { + allValue: allValues, + 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: includeAll, + label: label, + refresh: $.refresh(refresh), + multi: multi, + name: name, + query: query, + type: 'custom', + }, +} diff --git a/monitoring/vendor/grafonnet/text.libsonnet b/monitoring/vendor/grafonnet/text.libsonnet new file mode 100644 index 0000000..259e59b --- /dev/null +++ b/monitoring/vendor/grafonnet/text.libsonnet @@ -0,0 +1,21 @@ +{ + new( + title='', + span=null, + mode='markdown', + content='', + transparent=null, + description=null, + datasource=null, + ):: + { + [if transparent != null then 'transparent']: transparent, + title: title, + [if span != null then 'span']: span, + type: 'text', + mode: mode, + content: content, + [if description != null then 'description']: description, + datasource: datasource, + }, +} diff --git a/monitoring/vendor/grafonnet/timepicker.libsonnet b/monitoring/vendor/grafonnet/timepicker.libsonnet new file mode 100644 index 0000000..0d51d2e --- /dev/null +++ b/monitoring/vendor/grafonnet/timepicker.libsonnet @@ -0,0 +1,30 @@ +{ + 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/monitoring/vendor/ksonnet/.editorconfig b/monitoring/vendor/ksonnet/.editorconfig new file mode 100644 index 0000000..4d10581 --- /dev/null +++ b/monitoring/vendor/ksonnet/.editorconfig @@ -0,0 +1,5 @@ +root = true + +[*.jsonnet] +indent_size = 2 +indent_style = space \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/.gitignore b/monitoring/vendor/ksonnet/.gitignore new file mode 100644 index 0000000..853cb95 --- /dev/null +++ b/monitoring/vendor/ksonnet/.gitignore @@ -0,0 +1,41 @@ +# 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/monitoring/vendor/ksonnet/.travis.yml b/monitoring/vendor/ksonnet/.travis.yml new file mode 100644 index 0000000..363db7d --- /dev/null +++ b/monitoring/vendor/ksonnet/.travis.yml @@ -0,0 +1,27 @@ +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/monitoring/vendor/ksonnet/CODE-OF-CONDUCT.md b/monitoring/vendor/ksonnet/CODE-OF-CONDUCT.md new file mode 100644 index 0000000..a24610c --- /dev/null +++ b/monitoring/vendor/ksonnet/CODE-OF-CONDUCT.md @@ -0,0 +1,38 @@ +## 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/monitoring/vendor/ksonnet/CONTRIBUTING.md b/monitoring/vendor/ksonnet/CONTRIBUTING.md new file mode 100644 index 0000000..5106018 --- /dev/null +++ b/monitoring/vendor/ksonnet/CONTRIBUTING.md @@ -0,0 +1,58 @@ +## 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/monitoring/vendor/ksonnet/Dockerfile b/monitoring/vendor/ksonnet/Dockerfile new file mode 100644 index 0000000..b2fbd2b --- /dev/null +++ b/monitoring/vendor/ksonnet/Dockerfile @@ -0,0 +1,63 @@ +# 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/monitoring/vendor/ksonnet/LICENSE b/monitoring/vendor/ksonnet/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/monitoring/vendor/ksonnet/LICENSE @@ -0,0 +1,201 @@ + 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/monitoring/vendor/ksonnet/README.md b/monitoring/vendor/ksonnet/README.md new file mode 100644 index 0000000..32f6eee --- /dev/null +++ b/monitoring/vendor/ksonnet/README.md @@ -0,0 +1,221 @@ +# 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/monitoring/vendor/ksonnet/ROADMAP.md b/monitoring/vendor/ksonnet/ROADMAP.md new file mode 100644 index 0000000..d16407e --- /dev/null +++ b/monitoring/vendor/ksonnet/ROADMAP.md @@ -0,0 +1,26 @@ +# 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/monitoring/vendor/ksonnet/docs/TODO.md b/monitoring/vendor/ksonnet/docs/TODO.md new file mode 100644 index 0000000..14856f6 --- /dev/null +++ b/monitoring/vendor/ksonnet/docs/TODO.md @@ -0,0 +1,20 @@ +# 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/monitoring/vendor/ksonnet/docs/TUTORIAL.md b/monitoring/vendor/ksonnet/docs/TUTORIAL.md new file mode 100644 index 0000000..6503c89 --- /dev/null +++ b/monitoring/vendor/ksonnet/docs/TUTORIAL.md @@ -0,0 +1,299 @@ +# 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/monitoring/vendor/ksonnet/docs/images/kube-demo.gif b/monitoring/vendor/ksonnet/docs/images/kube-demo.gif new file mode 100644 index 0000000..2a1225d Binary files /dev/null and b/monitoring/vendor/ksonnet/docs/images/kube-demo.gif differ diff --git a/monitoring/vendor/ksonnet/docs/jsonnetIntro.md b/monitoring/vendor/ksonnet/docs/jsonnetIntro.md new file mode 100644 index 0000000..3eb675b --- /dev/null +++ b/monitoring/vendor/ksonnet/docs/jsonnetIntro.md @@ -0,0 +1,215 @@ +# 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/monitoring/vendor/ksonnet/examples/readme/hello-nginx.jsonnet b/monitoring/vendor/ksonnet/examples/readme/hello-nginx.jsonnet new file mode 100644 index 0000000..9ed242b --- /dev/null +++ b/monitoring/vendor/ksonnet/examples/readme/hello-nginx.jsonnet @@ -0,0 +1,19 @@ +// 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/monitoring/vendor/ksonnet/ksonnet-gen/Gopkg.toml b/monitoring/vendor/ksonnet/ksonnet-gen/Gopkg.toml new file mode 100644 index 0000000..cab822c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/Gopkg.toml @@ -0,0 +1,27 @@ +[[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/monitoring/vendor/ksonnet/ksonnet-gen/README.md b/monitoring/vendor/ksonnet/ksonnet-gen/README.md new file mode 100644 index 0000000..7ee0077 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/README.md @@ -0,0 +1,19 @@ +# 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/monitoring/vendor/ksonnet/ksonnet-gen/astext/astext.go b/monitoring/vendor/ksonnet/ksonnet-gen/astext/astext.go new file mode 100644 index 0000000..bedb29e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/astext/astext.go @@ -0,0 +1,62 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/astext/astext_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/astext/astext_test.go new file mode 100644 index 0000000..3f98e7b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/astext/astext_test.go @@ -0,0 +1,107 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/astext/extensions.go b/monitoring/vendor/ksonnet/ksonnet-gen/astext/extensions.go new file mode 100644 index 0000000..0b5eb43 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/astext/extensions.go @@ -0,0 +1,8 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite.go b/monitoring/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite.go new file mode 100644 index 0000000..4e53a31 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite.go @@ -0,0 +1,123 @@ +// 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/monitoring/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite_test.go new file mode 100644 index 0000000..f417785 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite_test.go @@ -0,0 +1,122 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/api_object.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/api_object.go new file mode 100644 index 0000000..6e1c773 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/api_object.go @@ -0,0 +1,99 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/api_object_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/api_object_test.go new file mode 100644 index 0000000..e2d91a5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/api_object_test.go @@ -0,0 +1,86 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/buffer.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/buffer.go new file mode 100644 index 0000000..15dc6cc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/buffer.go @@ -0,0 +1,58 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/catalog.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/catalog.go new file mode 100644 index 0000000..de81258 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/catalog.go @@ -0,0 +1,336 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/catalog_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/catalog_test.go new file mode 100644 index 0000000..ed894ac --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/catalog_test.go @@ -0,0 +1,258 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/component.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/component.go new file mode 100644 index 0000000..123aa18 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/component.go @@ -0,0 +1,77 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/component_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/component_test.go new file mode 100644 index 0000000..fb45349 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/component_test.go @@ -0,0 +1,58 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/constructors.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/constructors.go new file mode 100644 index 0000000..fb496ec --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/constructors.go @@ -0,0 +1,187 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/constructors_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/constructors_test.go new file mode 100644 index 0000000..859f407 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/constructors_test.go @@ -0,0 +1,172 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/custom_constructor.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/custom_constructor.go new file mode 100644 index 0000000..638f5c3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/custom_constructor.go @@ -0,0 +1,215 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/description.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/description.go new file mode 100644 index 0000000..6c3dfda --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/description.go @@ -0,0 +1,97 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/description_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/description_test.go new file mode 100644 index 0000000..2df69d0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/description_test.go @@ -0,0 +1,103 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document.go new file mode 100644 index 0000000..4818085 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document.go @@ -0,0 +1,188 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document_integration_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document_integration_test.go new file mode 100644 index 0000000..297db48 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document_integration_test.go @@ -0,0 +1,98 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document_test.go new file mode 100644 index 0000000..4e60d1d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/document_test.go @@ -0,0 +1,211 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/emit.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/emit.go new file mode 100644 index 0000000..987b711 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/emit.go @@ -0,0 +1,1110 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/extension.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/extension.go new file mode 100644 index 0000000..63f471a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/extension.go @@ -0,0 +1,286 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/extension_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/extension_test.go new file mode 100644 index 0000000..7757508 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/extension_test.go @@ -0,0 +1,20 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/field.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/field.go new file mode 100644 index 0000000..7d8ce3f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/field.go @@ -0,0 +1,76 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/field_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/field_test.go new file mode 100644 index 0000000..dc7d962 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/field_test.go @@ -0,0 +1,35 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/group.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/group.go new file mode 100644 index 0000000..07d4427 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/group.go @@ -0,0 +1,64 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/group_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/group_test.go new file mode 100644 index 0000000..cebfbcf --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/group_test.go @@ -0,0 +1,46 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/ksonnet.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/ksonnet.go new file mode 100644 index 0000000..677ed0a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/ksonnet.go @@ -0,0 +1,84 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/object.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/object.go new file mode 100644 index 0000000..471b656 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/object.go @@ -0,0 +1,94 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/object_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/object_test.go new file mode 100644 index 0000000..c07a123 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/object_test.go @@ -0,0 +1,24 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/paths.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/paths.go new file mode 100644 index 0000000..5e48576 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/paths.go @@ -0,0 +1,75 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/paths_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/paths_test.go new file mode 100644 index 0000000..4350947 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/paths_test.go @@ -0,0 +1,24 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/properties.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/properties.go new file mode 100644 index 0000000..37fed84 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/properties.go @@ -0,0 +1,95 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/properties_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/properties_test.go new file mode 100644 index 0000000..379c28c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/properties_test.go @@ -0,0 +1,182 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/renderer.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/renderer.go new file mode 100644 index 0000000..b08d237 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/renderer.go @@ -0,0 +1,366 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/renderer_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/renderer_test.go new file mode 100644 index 0000000..31f0517 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/renderer_test.go @@ -0,0 +1,429 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/strings.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/strings.go new file mode 100644 index 0000000..0891d38 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/strings.go @@ -0,0 +1,103 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/strings_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/strings_test.go new file mode 100644 index 0000000..2961c22 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/strings_test.go @@ -0,0 +1,167 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.json b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.json new file mode 100644 index 0000000..f4350fb --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.json @@ -0,0 +1,36 @@ +{ + "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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.libsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.libsonnet new file mode 100644 index 0000000..a53ae9c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.libsonnet @@ -0,0 +1,66 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/constructor.libsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/constructor.libsonnet new file mode 100644 index 0000000..947ce77 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/constructor.libsonnet @@ -0,0 +1,3 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/generated_k.libsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/generated_k.libsonnet new file mode 100644 index 0000000..42dcd6b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/generated_k.libsonnet @@ -0,0 +1,111 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_definition.json b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_definition.json new file mode 100644 index 0000000..90eba75 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_definition.json @@ -0,0 +1,12 @@ +{ + "swagger": "2.0", + "info": { + "version": "v1.8.0" + }, + "paths": { + "/invalid": {} + }, + "definitions": { + "invalid": {} + } +} \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_ref.json b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_ref.json new file mode 100644 index 0000000..90ab854 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_ref.json @@ -0,0 +1,24 @@ +{ + "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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/k.libsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/k.libsonnet new file mode 100644 index 0000000..42dcd6b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/k.libsonnet @@ -0,0 +1,111 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/swagger-1.8.json b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/swagger-1.8.json new file mode 100644 index 0000000..389eaaa --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/swagger-1.8.json @@ -0,0 +1,73741 @@ +{ + "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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/type.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/type.go new file mode 100644 index 0000000..96c0620 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/type.go @@ -0,0 +1,74 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/type_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/type_test.go new file mode 100644 index 0000000..607ff63 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/type_test.go @@ -0,0 +1,47 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/util.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/util.go new file mode 100644 index 0000000..06cb414 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/util.go @@ -0,0 +1,27 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/version.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/version.go new file mode 100644 index 0000000..8c2809a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/version.go @@ -0,0 +1,78 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/version_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/version_test.go new file mode 100644 index 0000000..4a60f9b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/ksonnet/version_test.go @@ -0,0 +1,73 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/importer.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/importer.go new file mode 100644 index 0000000..c03c99f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/importer.go @@ -0,0 +1,41 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/importer_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/importer_test.go new file mode 100644 index 0000000..b60a4db --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/importer_test.go @@ -0,0 +1,66 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/new.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/new.go new file mode 100644 index 0000000..00824d5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/new.go @@ -0,0 +1,90 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/parsing.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/parsing.go new file mode 100644 index 0000000..53e9519 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/parsing.go @@ -0,0 +1,201 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/parsing_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/parsing_test.go new file mode 100644 index 0000000..8c5e816 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/parsing_test.go @@ -0,0 +1,382 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/swagger.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/swagger.go new file mode 100644 index 0000000..74f6b9c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/swagger.go @@ -0,0 +1,165 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/testdata/deployment.json b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/testdata/deployment.json new file mode 100644 index 0000000..54fe609 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/testdata/deployment.json @@ -0,0 +1,678 @@ +{ + "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/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/testdata/invalid.json b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/testdata/invalid.json new file mode 100644 index 0000000..9716234 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubespec/testdata/invalid.json @@ -0,0 +1 @@ +////// invalid \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/blacklist.jq b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/blacklist.jq new file mode 100755 index 0000000..99bcca7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/blacklist.jq @@ -0,0 +1,103 @@ +#!/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/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/data.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/data.go new file mode 100644 index 0000000..f6c0699 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/data.go @@ -0,0 +1,951 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/version.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/version.go new file mode 100644 index 0000000..4887ec1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/version.go @@ -0,0 +1,242 @@ +// 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/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/version_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/version_test.go new file mode 100644 index 0000000..2c06717 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/kubeversion/version_test.go @@ -0,0 +1,29 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/main.go b/monitoring/vendor/ksonnet/ksonnet-gen/main.go new file mode 100644 index 0000000..4fe54cc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/main.go @@ -0,0 +1,88 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker.go b/monitoring/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker.go new file mode 100644 index 0000000..8440734 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker.go @@ -0,0 +1,974 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker_test.go new file mode 100644 index 0000000..be5dc04 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker_test.go @@ -0,0 +1,1345 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/doc.go b/monitoring/vendor/ksonnet/ksonnet-gen/printer/doc.go new file mode 100644 index 0000000..8053704 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/doc.go @@ -0,0 +1,2 @@ +// Package printer implements printing of jsonnet AST nodes. +package printer diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/printer.go b/monitoring/vendor/ksonnet/ksonnet-gen/printer/printer.go new file mode 100644 index 0000000..b4d05ae --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/printer.go @@ -0,0 +1,1075 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/printer_test.go b/monitoring/vendor/ksonnet/ksonnet-gen/printer/printer_test.go new file mode 100644 index 0000000..529b57e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/printer_test.go @@ -0,0 +1,1273 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_brace b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_brace new file mode 100644 index 0000000..41ccfea --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_brace @@ -0,0 +1 @@ +params {} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_index b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_index new file mode 100644 index 0000000..0202f1b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_index @@ -0,0 +1 @@ +alpha.beta.charlie('arg1') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_multiple_arguments b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_multiple_arguments new file mode 100644 index 0000000..a7cfeac --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_multiple_arguments @@ -0,0 +1 @@ +self(a, b) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_number b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_number new file mode 100644 index 0000000..894118b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_number @@ -0,0 +1 @@ +function() 1 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/array b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/array new file mode 100644 index 0000000..d1f7466 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/array @@ -0,0 +1 @@ +[foo, self, 'string'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/array_comp b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/array_comp new file mode 100644 index 0000000..1846495 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/array_comp @@ -0,0 +1,7 @@ +[ + { + kind: kind, + qty: 4 / 3, + } + for kind in ['Honey Syrup', 'Lemon Juice', 'Farmers Gin'] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/block_string b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/block_string new file mode 100644 index 0000000..7bd9901 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/block_string @@ -0,0 +1,3 @@ +||| +text +||| \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/boolean b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/boolean new file mode 100644 index 0000000..bce8434 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/boolean @@ -0,0 +1,4 @@ +{ + isTrue: true, + isFalse: false, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/chained_apply b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/chained_apply new file mode 100644 index 0000000..f1553a6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/chained_apply @@ -0,0 +1 @@ +di.withFoo(foo).withBar(bar) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional new file mode 100644 index 0000000..e838956 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional @@ -0,0 +1 @@ +if std.type(foo) == 'array' then { foo: foo } else { foo: [foo] } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional_no_false b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional_no_false new file mode 100644 index 0000000..ae12fc7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional_no_false @@ -0,0 +1 @@ +if std.type(foo) == 'array' then { foo: foo } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/declarations b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/declarations new file mode 100644 index 0000000..05746a9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/declarations @@ -0,0 +1,5 @@ +local a = import 'a'; +local b = 'b'; +local c = deployment.new(); + +{} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/dollar b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/dollar new file mode 100644 index 0000000..857f13a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/dollar @@ -0,0 +1 @@ +$ diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/field_id_keywords b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/field_id_keywords new file mode 100644 index 0000000..3101b4a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/field_id_keywords @@ -0,0 +1,7 @@ +{ + 'error': 'value', + 'local': 'value', + unquoteme: 'value', + 'but-not-me': 'value', + 'nor:me': 'value', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/field_with_string_key b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/field_with_string_key new file mode 100644 index 0000000..d322b6f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/field_with_string_key @@ -0,0 +1,3 @@ +{ + key:: value, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function new file mode 100644 index 0000000..f5de701 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function @@ -0,0 +1 @@ +function() {} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_args b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_args new file mode 100644 index 0000000..d8dba98 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_args @@ -0,0 +1,3 @@ +{ + foo(one, two):: myVar + 2, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_no_args b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_no_args new file mode 100644 index 0000000..0f5e915 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_no_args @@ -0,0 +1,3 @@ +{ + foo():: 1 + 2, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_ast b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_ast new file mode 100644 index 0000000..5060b5b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_ast @@ -0,0 +1,4 @@ +{ + alpha(one, two, opt1=1):: myVar + 2, + beta(one, two, opt1={ foo: 1 }):: myVar + 2, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_astext b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_astext new file mode 100644 index 0000000..5060b5b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_astext @@ -0,0 +1,4 @@ +{ + alpha(one, two, opt1=1):: myVar + 2, + beta(one, two, opt1={ foo: 1 }):: myVar + 2, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/importstr b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/importstr new file mode 100644 index 0000000..8f63322 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/importstr @@ -0,0 +1 @@ +importstr 'file.txt' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index new file mode 100644 index 0000000..d91ecf3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index @@ -0,0 +1,3 @@ +{ + foo:: foo.bar.baz, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name new file mode 100644 index 0000000..5466411 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name @@ -0,0 +1,3 @@ +{ + foo:: foo['bar-dashed']['baz-dashed'], +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name_2 b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name_2 new file mode 100644 index 0000000..c170e61 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name_2 @@ -0,0 +1 @@ +std.extVar('__ksonnet/params').components['my-service'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_with_index b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_with_index new file mode 100644 index 0000000..d91ecf3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/index_with_index @@ -0,0 +1,3 @@ +{ + foo:: foo.bar.baz, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal new file mode 100644 index 0000000..d35c236 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal @@ -0,0 +1,3 @@ +{ + foo: 'value', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_newline b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_newline new file mode 100644 index 0000000..68505e1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_newline @@ -0,0 +1,3 @@ +{ + foo: 'value1\nvalue2', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_single_quote b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_single_quote new file mode 100644 index 0000000..ecc4494 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_single_quote @@ -0,0 +1,3 @@ +{ + foo: 'value1', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local new file mode 100644 index 0000000..4ea0879 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local @@ -0,0 +1,3 @@ +{ + local bar = {}, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_function_with_args b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_function_with_args new file mode 100644 index 0000000..cc4d97c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_function_with_args @@ -0,0 +1,3 @@ +{ + local foo(one, two) = myVar + 2, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_function b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_function new file mode 100644 index 0000000..a00d3bf --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_function @@ -0,0 +1,3 @@ +local foo() = 'a'; + +{} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_multiline_function b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_multiline_function new file mode 100644 index 0000000..54e5ce9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_multiline_function @@ -0,0 +1,7 @@ +local foo() = + local a = { a: 'a' }; + local b = { b: 'b' }; + + a + b; + +{} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/multi_line_comments b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/multi_line_comments new file mode 100644 index 0000000..59738d5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/multi_line_comments @@ -0,0 +1,7 @@ +{ + // line 1 + // + // line 3 + // line 4 + local bar = {}, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/nil_node b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/nil_node new file mode 100644 index 0000000..e69de29 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/null b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/null new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/null @@ -0,0 +1 @@ +null diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object @@ -0,0 +1 @@ +{} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_comp b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_comp new file mode 100644 index 0000000..6e618c2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_comp @@ -0,0 +1,6 @@ +{ + field: { + [x]: envParams.components[x] + globals + for x in std.objectFields(envParams.components) + }, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_trailing_comma b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_trailing_comma new file mode 100644 index 0000000..25695ed --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_trailing_comma @@ -0,0 +1,4 @@ +{ + // a comment + foo: 'value', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_comment b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_comment new file mode 100644 index 0000000..25695ed --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_comment @@ -0,0 +1,4 @@ +{ + // a comment + foo: 'value', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_local b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_local new file mode 100644 index 0000000..e21bea4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_local @@ -0,0 +1,6 @@ +{ + fn():: + local foo = 'a'; + + {}, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin new file mode 100644 index 0000000..000dcce --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin @@ -0,0 +1,3 @@ +{ + foo+:: {}, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin_with_string_index b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin_with_string_index new file mode 100644 index 0000000..614f7a5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin_with_string_index @@ -0,0 +1,3 @@ +{ + id+: {}, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_hidden_field b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_hidden_field new file mode 100644 index 0000000..1075e22 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_hidden_field @@ -0,0 +1,4 @@ +{ + foo:: {}, + bar:: {}, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_nested_object b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_nested_object new file mode 100644 index 0000000..92a724f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_nested_object @@ -0,0 +1,5 @@ +{ + foo:: { + bar:: {}, + }, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/self_apply b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/self_apply new file mode 100644 index 0000000..144c227 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/self_apply @@ -0,0 +1 @@ +self() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/super_index b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/super_index new file mode 100644 index 0000000..0d5ee48 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/super_index @@ -0,0 +1 @@ +super.metadata diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/trimmed_whitespace_in_tests b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/trimmed_whitespace_in_tests new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/trimmed_whitespace_in_tests @@ -0,0 +1 @@ +{} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array.jsonnet new file mode 100644 index 0000000..5b27fe9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array.jsonnet @@ -0,0 +1 @@ +[1, 2, 1 + 2] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index1.jsonnet new file mode 100644 index 0000000..b509eb3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index1.jsonnet @@ -0,0 +1 @@ +[1][0] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index2.jsonnet new file mode 100644 index 0000000..0fc4793 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index2.jsonnet @@ -0,0 +1 @@ +[1, 2, 3][0] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index3.jsonnet new file mode 100644 index 0000000..a0ce51a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index3.jsonnet @@ -0,0 +1 @@ +[1, 2, 3][1] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index4.jsonnet new file mode 100644 index 0000000..776d19c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index4.jsonnet @@ -0,0 +1 @@ +[1, 2, 3][2] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds.jsonnet new file mode 100644 index 0000000..2b235c9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds.jsonnet @@ -0,0 +1 @@ +[][0] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds2.jsonnet new file mode 100644 index 0000000..3f47fc0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds2.jsonnet @@ -0,0 +1 @@ +[1, 2, 3][3] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds3.jsonnet new file mode 100644 index 0000000..89e0ae3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds3.jsonnet @@ -0,0 +1 @@ +[][-1] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds4.jsonnet new file mode 100644 index 0000000..8f44aa8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds4.jsonnet @@ -0,0 +1 @@ +[1, 2, 3][42] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_plus_bad.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_plus_bad.jsonnet new file mode 100644 index 0000000..8eb05bc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_plus_bad.jsonnet @@ -0,0 +1 @@ +[] + 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp.jsonnet new file mode 100644 index 0000000..f69358c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp.jsonnet @@ -0,0 +1,4 @@ +[ + x + for x in [] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp2.jsonnet new file mode 100644 index 0000000..2a19b04 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp2.jsonnet @@ -0,0 +1,4 @@ +[ + x + for x in [1, 2, 3] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp3.jsonnet new file mode 100644 index 0000000..47cd166 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp3.jsonnet @@ -0,0 +1,5 @@ +[ + [var, var2] + for var in [1, 2, 3] + for var2 in ['a', 'b', 'c'] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp4.jsonnet new file mode 100644 index 0000000..16302b2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp4.jsonnet @@ -0,0 +1,5 @@ +[ + y + for x in [1, 2, 3] + for y in [x + 1] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp5.jsonnet new file mode 100644 index 0000000..dcecb81 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp5.jsonnet @@ -0,0 +1,5 @@ +[ + y + for y in [x + 1] + for x in [1, 2, 3] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp6.jsonnet new file mode 100644 index 0000000..b9bc844 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp6.jsonnet @@ -0,0 +1,6 @@ +[ + [x, y, z] + for x in [1] + for y in [2] + for z in [3] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp7.jsonnet new file mode 100644 index 0000000..3b031a5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp7.jsonnet @@ -0,0 +1,15 @@ +[ + [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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if.jsonnet new file mode 100644 index 0000000..d3f4f8e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if.jsonnet @@ -0,0 +1,5 @@ +[ + x + for x in [1, 2, 3, 4, 5] + if x > 3 +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if2.jsonnet new file mode 100644 index 0000000..8530184 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if2.jsonnet @@ -0,0 +1,7 @@ +[ + [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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if3.jsonnet new file mode 100644 index 0000000..765ac83 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if3.jsonnet @@ -0,0 +1,7 @@ +[ + [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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if4.jsonnet new file mode 100644 index 0000000..47c61c8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if4.jsonnet @@ -0,0 +1,6 @@ +[ + [x, y] + for x in [1, 2, 3, 4, 5] + if y == 3 + for y in [1, 2, 3, 4, 5] +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if5.jsonnet new file mode 100644 index 0000000..b6495fd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if5.jsonnet @@ -0,0 +1,5 @@ +[ + x + for x in [] + if error 'x' +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if6.jsonnet new file mode 100644 index 0000000..600bb92 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if6.jsonnet @@ -0,0 +1,5 @@ +[ + x + for x in [1] + if error 'x' +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if7.jsonnet new file mode 100644 index 0000000..373dc1b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if7.jsonnet @@ -0,0 +1,5 @@ +[ + x + for x in [1, 2, 3] + if 42 +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert.jsonnet new file mode 100644 index 0000000..2fff0f6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert.jsonnet @@ -0,0 +1 @@ +assert true; true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert2.jsonnet new file mode 100644 index 0000000..c74d1ac --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert2.jsonnet @@ -0,0 +1 @@ +assert 42 == 42; true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert3.jsonnet new file mode 100644 index 0000000..98aeb87 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert3.jsonnet @@ -0,0 +1 @@ +assert 42 != 42; 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal.jsonnet new file mode 100644 index 0000000..07576bc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal.jsonnet @@ -0,0 +1 @@ +std.assertEqual([], []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal2.jsonnet new file mode 100644 index 0000000..78e26f9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal2.jsonnet @@ -0,0 +1 @@ +std.assertEqual({}, {}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal3.jsonnet new file mode 100644 index 0000000..a925f41 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal3.jsonnet @@ -0,0 +1 @@ +std.assertEqual({ x:: 42 }, {}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed.jsonnet new file mode 100644 index 0000000..222c9e7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed.jsonnet @@ -0,0 +1 @@ +assert false; true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed_custom.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed_custom.jsonnet new file mode 100644 index 0000000..c498025 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed_custom.jsonnet @@ -0,0 +1 @@ +assert false : 'Custom Message'; true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot.jsonnet new file mode 100644 index 0000000..819b12f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot.jsonnet @@ -0,0 +1 @@ +~12345 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot2.jsonnet new file mode 100644 index 0000000..fa7859a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot2.jsonnet @@ -0,0 +1 @@ +~'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and.jsonnet new file mode 100644 index 0000000..511a60e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and.jsonnet @@ -0,0 +1 @@ +0 & 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and2.jsonnet new file mode 100644 index 0000000..b29db89 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and2.jsonnet @@ -0,0 +1 @@ +1337 & 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and3.jsonnet new file mode 100644 index 0000000..99ae8b7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and3.jsonnet @@ -0,0 +1 @@ +1e30 & 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and4.jsonnet new file mode 100644 index 0000000..80b31fc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and4.jsonnet @@ -0,0 +1 @@ +1 & error 'x' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and5.jsonnet new file mode 100644 index 0000000..867238c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and5.jsonnet @@ -0,0 +1 @@ +-1337 & 1337 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and6.jsonnet new file mode 100644 index 0000000..9fdb778 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and6.jsonnet @@ -0,0 +1 @@ +-42 & 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or.jsonnet new file mode 100644 index 0000000..eda3ff2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or.jsonnet @@ -0,0 +1 @@ +0 | 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or10.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or10.jsonnet new file mode 100644 index 0000000..7616a3e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or10.jsonnet @@ -0,0 +1 @@ +'xxx' | 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or2.jsonnet new file mode 100644 index 0000000..84dd1b0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or2.jsonnet @@ -0,0 +1 @@ +0 | 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or3.jsonnet new file mode 100644 index 0000000..2562de3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or3.jsonnet @@ -0,0 +1 @@ +42 | 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or4.jsonnet new file mode 100644 index 0000000..dec8fdd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or4.jsonnet @@ -0,0 +1 @@ +42 | 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or5.jsonnet new file mode 100644 index 0000000..15098c3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or5.jsonnet @@ -0,0 +1 @@ +1337 | 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or6.jsonnet new file mode 100644 index 0000000..ea9bdc1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or6.jsonnet @@ -0,0 +1 @@ +1 | 2 | 3 | 4 | 5 | 6 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or7.jsonnet new file mode 100644 index 0000000..6d8b5b0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or7.jsonnet @@ -0,0 +1 @@ +1 | 2 | 4 | 8 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or8.jsonnet new file mode 100644 index 0000000..0fd3517 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or8.jsonnet @@ -0,0 +1 @@ +-42 | 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or9.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or9.jsonnet new file mode 100644 index 0000000..bc2b087 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or9.jsonnet @@ -0,0 +1 @@ +(1 << 62) | 1 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift.jsonnet new file mode 100644 index 0000000..8af5091 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift.jsonnet @@ -0,0 +1 @@ +1 << 10 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift2.jsonnet new file mode 100644 index 0000000..8890877 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift2.jsonnet @@ -0,0 +1 @@ +1024 >> 10 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift3.jsonnet new file mode 100644 index 0000000..158b495 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift3.jsonnet @@ -0,0 +1 @@ +1 << 20 >> 20 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift4.jsonnet new file mode 100644 index 0000000..4fd246e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift4.jsonnet @@ -0,0 +1 @@ +10000 >> (-10) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor.jsonnet new file mode 100644 index 0000000..52d04ab --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor.jsonnet @@ -0,0 +1 @@ +0 ^ 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor2.jsonnet new file mode 100644 index 0000000..175330e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor2.jsonnet @@ -0,0 +1 @@ +0 ^ 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor3.jsonnet new file mode 100644 index 0000000..c08870b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor3.jsonnet @@ -0,0 +1 @@ +42 ^ 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor4.jsonnet new file mode 100644 index 0000000..a21e409 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor4.jsonnet @@ -0,0 +1 @@ +42 ^ 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor5.jsonnet new file mode 100644 index 0000000..89e3412 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor5.jsonnet @@ -0,0 +1 @@ +42 ^ 7 ^ 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor6.jsonnet new file mode 100644 index 0000000..9ee21a3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor6.jsonnet @@ -0,0 +1 @@ +1 ^ 1 ^ 1 ^ 1 ^ 1 ^ 1 ^ 1 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor7.jsonnet new file mode 100644 index 0000000..9cf3ee8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor7.jsonnet @@ -0,0 +1 @@ +1 ^ error 'x' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor8.jsonnet new file mode 100644 index 0000000..3626a2a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor8.jsonnet @@ -0,0 +1 @@ +42 ^ 1 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor9.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor9.jsonnet new file mode 100644 index 0000000..0418b00 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor9.jsonnet @@ -0,0 +1 @@ +42 ^ 2 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/boolean_literal.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/boolean_literal.jsonnet new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/boolean_literal.jsonnet @@ -0,0 +1 @@ +true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar.jsonnet new file mode 100644 index 0000000..53d6f35 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar.jsonnet @@ -0,0 +1 @@ +std.char(65) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar2.jsonnet new file mode 100644 index 0000000..fa8113f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar2.jsonnet @@ -0,0 +1 @@ +std.char(0) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar3.jsonnet new file mode 100644 index 0000000..e506045 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar3.jsonnet @@ -0,0 +1 @@ +std.char(-1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar4.jsonnet new file mode 100644 index 0000000..fa98a4a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar4.jsonnet @@ -0,0 +1 @@ +std.char(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar5.jsonnet new file mode 100644 index 0000000..a4d6544 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar5.jsonnet @@ -0,0 +1 @@ +std.char(1114112) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar6.jsonnet new file mode 100644 index 0000000..6f5d8ce --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar6.jsonnet @@ -0,0 +1 @@ +std.char(1114111) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar7.jsonnet new file mode 100644 index 0000000..d40fe6a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar7.jsonnet @@ -0,0 +1 @@ +std.char('xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsEx.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsEx.jsonnet new file mode 100644 index 0000000..8aec348 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsEx.jsonnet @@ -0,0 +1,5 @@ +std.objectFieldsEx({ + x: 1, + y:: 1, + z::: 2, +}, false) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsExWithHidden.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsExWithHidden.jsonnet new file mode 100644 index 0000000..9e6a26a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsExWithHidden.jsonnet @@ -0,0 +1,5 @@ +std.objectFieldsEx({ + x: 1, + y:: 1, + z::: 2, +}, true) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectHasEx.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectHasEx.jsonnet new file mode 100644 index 0000000..d1a6731 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectHasEx.jsonnet @@ -0,0 +1 @@ +std.objectHasEx({ x: 1, y:: 1, z::: 2 }, 'x', false) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_acos.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_acos.jsonnet new file mode 100644 index 0000000..eefc2fd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_acos.jsonnet @@ -0,0 +1 @@ +std.acos(1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_asin.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_asin.jsonnet new file mode 100644 index 0000000..2ae81b0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_asin.jsonnet @@ -0,0 +1 @@ +std.asin(1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_atan.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_atan.jsonnet new file mode 100644 index 0000000..36c2013 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_atan.jsonnet @@ -0,0 +1 @@ +std.atan(1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_ceil.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_ceil.jsonnet new file mode 100644 index 0000000..435394a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_ceil.jsonnet @@ -0,0 +1 @@ +std.ceil(2.5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_cos.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_cos.jsonnet new file mode 100644 index 0000000..f926cd3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_cos.jsonnet @@ -0,0 +1 @@ +std.cos(1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp.jsonnet new file mode 100644 index 0000000..a7a400c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp.jsonnet @@ -0,0 +1 @@ +std.exp(12) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp2.jsonnet new file mode 100644 index 0000000..591751a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp2.jsonnet @@ -0,0 +1 @@ +std.exp(0) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp3.jsonnet new file mode 100644 index 0000000..55dc2f5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp3.jsonnet @@ -0,0 +1 @@ +std.exp(1000) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp4.jsonnet new file mode 100644 index 0000000..8fa22f3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp4.jsonnet @@ -0,0 +1 @@ +std.exp(100) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp5.jsonnet new file mode 100644 index 0000000..66c08f0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp5.jsonnet @@ -0,0 +1 @@ +std.exp(100000000000000000000) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp6.jsonnet new file mode 100644 index 0000000..0e8618f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp6.jsonnet @@ -0,0 +1 @@ +std.exp(-2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp7.jsonnet new file mode 100644 index 0000000..c4ea68f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp7.jsonnet @@ -0,0 +1 @@ +std.exp(-100000000000000000) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp8.jsonnet new file mode 100644 index 0000000..b479fa4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp8.jsonnet @@ -0,0 +1 @@ +std.exp(3.14) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_floor.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_floor.jsonnet new file mode 100644 index 0000000..24d8f61 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_floor.jsonnet @@ -0,0 +1 @@ +std.floor(2.5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log.jsonnet new file mode 100644 index 0000000..594799c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log.jsonnet @@ -0,0 +1 @@ +std.log(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log2.jsonnet new file mode 100644 index 0000000..4a96b4a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log2.jsonnet @@ -0,0 +1 @@ +std.log(std.exp(100)) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log3.jsonnet new file mode 100644 index 0000000..0c0dbfe --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log3.jsonnet @@ -0,0 +1 @@ +std.log(100000000000000000000000000000000000) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log4.jsonnet new file mode 100644 index 0000000..e49e01d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log4.jsonnet @@ -0,0 +1 @@ +std.log(3.14) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log5.jsonnet new file mode 100644 index 0000000..e34a1e2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log5.jsonnet @@ -0,0 +1 @@ +std.log(0) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log6.jsonnet new file mode 100644 index 0000000..dd1a7fa --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log6.jsonnet @@ -0,0 +1 @@ +std.log(0.0000000000000001) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log7.jsonnet new file mode 100644 index 0000000..dc099a3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log7.jsonnet @@ -0,0 +1 @@ +std.log(-1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log8.jsonnet new file mode 100644 index 0000000..8b94301 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log8.jsonnet @@ -0,0 +1 @@ +std.log(-1000000000000) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sin.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sin.jsonnet new file mode 100644 index 0000000..41e5366 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sin.jsonnet @@ -0,0 +1 @@ +std.sin(1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt.jsonnet new file mode 100644 index 0000000..0e6d28d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt.jsonnet @@ -0,0 +1 @@ +std.sqrt(4) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt2.jsonnet new file mode 100644 index 0000000..82c8c26 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt2.jsonnet @@ -0,0 +1 @@ +std.sqrt('cookie') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_tan.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_tan.jsonnet new file mode 100644 index 0000000..c45322d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_tan.jsonnet @@ -0,0 +1 @@ +std.tan(1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div1.jsonnet new file mode 100644 index 0000000..ceeb607 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div1.jsonnet @@ -0,0 +1 @@ +2 / 2 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div2.jsonnet new file mode 100644 index 0000000..b26c20d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div2.jsonnet @@ -0,0 +1 @@ +1337 / 2 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div3.jsonnet new file mode 100644 index 0000000..bfed3ec --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div3.jsonnet @@ -0,0 +1 @@ +1 / 1e30 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div4.jsonnet new file mode 100644 index 0000000..0cf1901 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div4.jsonnet @@ -0,0 +1 @@ +1 / (1e-160) / (1e-160) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_array.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_array.jsonnet new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_array.jsonnet @@ -0,0 +1 @@ +[] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_object.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_object.jsonnet new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_object.jsonnet @@ -0,0 +1 @@ +{} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/equals.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/equals.jsonnet new file mode 100644 index 0000000..dc52ba1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/equals.jsonnet @@ -0,0 +1 @@ +42 == 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error.jsonnet new file mode 100644 index 0000000..779ed4d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error.jsonnet @@ -0,0 +1 @@ +error '42' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_from_array.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_from_array.jsonnet new file mode 100644 index 0000000..43540ff --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_from_array.jsonnet @@ -0,0 +1 @@ +[error 'xxx'][0] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_function_fail.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_function_fail.jsonnet new file mode 100644 index 0000000..ddaf708 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_function_fail.jsonnet @@ -0,0 +1 @@ +error (function(x) 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/escaped_fields.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/escaped_fields.jsonnet new file mode 100644 index 0000000..9c32a22 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/escaped_fields.jsonnet @@ -0,0 +1,8 @@ +{ + '"': null, + "'": null, + ||| + 1234 + 1234 + |||: null, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_code.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_code.jsonnet new file mode 100644 index 0000000..ab2d314 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_code.jsonnet @@ -0,0 +1 @@ +std.extVar('codeVar') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_error.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_error.jsonnet new file mode 100644 index 0000000..09c093a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_error.jsonnet @@ -0,0 +1 @@ +std.extVar('errorVar') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_hermetic.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_hermetic.jsonnet new file mode 100644 index 0000000..a7204b2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_hermetic.jsonnet @@ -0,0 +1,3 @@ +local x = 42; + +std.extVar('UndeclaredX') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_mutually_recursive.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_mutually_recursive.jsonnet new file mode 100644 index 0000000..daf270e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_mutually_recursive.jsonnet @@ -0,0 +1 @@ +std.extVar('mutuallyRecursiveVar1') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_not_a_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_not_a_string.jsonnet new file mode 100644 index 0000000..19130d5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_not_a_string.jsonnet @@ -0,0 +1 @@ +std.extVar(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_self_recursive.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_self_recursive.jsonnet new file mode 100644 index 0000000..a0d6c0c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_self_recursive.jsonnet @@ -0,0 +1 @@ +std.extVar('selfRecursiveVar') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_static_error.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_static_error.jsonnet new file mode 100644 index 0000000..fe3ce63 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_static_error.jsonnet @@ -0,0 +1 @@ +std.extVar('staticErrorVar') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_string.jsonnet new file mode 100644 index 0000000..4d9bfaa --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_string.jsonnet @@ -0,0 +1 @@ +std.extVar('stringVar') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_unknown.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_unknown.jsonnet new file mode 100644 index 0000000..b7d9a65 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_unknown.jsonnet @@ -0,0 +1 @@ +std.extVar('UNKNOWN') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_call.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_call.jsonnet new file mode 100644 index 0000000..f3f7f97 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_call.jsonnet @@ -0,0 +1 @@ +(function() 42)() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_capturing.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_capturing.jsonnet new file mode 100644 index 0000000..ee46a52 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_capturing.jsonnet @@ -0,0 +1,3 @@ +local y = 17; + +(function(x) y)(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_in_object.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_in_object.jsonnet new file mode 100644 index 0000000..9dba8db --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_in_object.jsonnet @@ -0,0 +1,3 @@ +local r = { f: function(x) 42 }; + +r.f(null) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_manifested.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_manifested.jsonnet new file mode 100644 index 0000000..8e3fa6e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_manifested.jsonnet @@ -0,0 +1,3 @@ +{ + f(x): 3, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_no_params.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_no_params.jsonnet new file mode 100644 index 0000000..6394907 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_no_params.jsonnet @@ -0,0 +1 @@ +function() 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_plus_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_plus_string.jsonnet new file mode 100644 index 0000000..e97c01e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_plus_string.jsonnet @@ -0,0 +1 @@ +(function() 42) + 'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_too_many_params.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_too_many_params.jsonnet new file mode 100644 index 0000000..1285c2e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_too_many_params.jsonnet @@ -0,0 +1 @@ +function(x) 3 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_with_argument.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_with_argument.jsonnet new file mode 100644 index 0000000..81c9897 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_with_argument.jsonnet @@ -0,0 +1 @@ +(function(x) x)(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greater.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greater.jsonnet new file mode 100644 index 0000000..0d409b3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greater.jsonnet @@ -0,0 +1 @@ +if 1 > 2 then error 'x' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq.jsonnet new file mode 100644 index 0000000..9a13cfe --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq.jsonnet @@ -0,0 +1 @@ +if 1 >= 2 then error 'x' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq2.jsonnet new file mode 100644 index 0000000..b78ccb6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq2.jsonnet @@ -0,0 +1 @@ +if 1 >= 1 then 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/argcapture_builtin_call.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/argcapture_builtin_call.jsonnet new file mode 100644 index 0000000..d6de5d4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/argcapture_builtin_call.jsonnet @@ -0,0 +1 @@ +local r = { f(x): local a = x; std.length(a) }; r.f([1, 2, 3]) \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal5.jsonnet new file mode 100644 index 0000000..00cab54 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal5.jsonnet @@ -0,0 +1 @@ +std.assertEqual("\n ", "\n") diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal6.jsonnet new file mode 100644 index 0000000..f1086db --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal6.jsonnet @@ -0,0 +1 @@ +std.assertEqual("\u001b[31m", "") diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/call_number.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/call_number.jsonnet new file mode 100644 index 0000000..140831e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/call_number.jsonnet @@ -0,0 +1 @@ +42() \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/double_thunk.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/double_thunk.jsonnet new file mode 100644 index 0000000..f2a6767 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/double_thunk.jsonnet @@ -0,0 +1 @@ +local x = local y = error "xxx"; y; x diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/escaped_single_quote.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/escaped_single_quote.jsonnet new file mode 100644 index 0000000..eb16fcd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/escaped_single_quote.jsonnet @@ -0,0 +1 @@ +"\\'" \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/false.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/false.jsonnet new file mode 100644 index 0000000..c508d53 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/false.jsonnet @@ -0,0 +1 @@ +false diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/fieldname_not_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/fieldname_not_string.jsonnet new file mode 100644 index 0000000..300cfe8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/fieldname_not_string.jsonnet @@ -0,0 +1 @@ +{ [1234]: 42 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/filled_thunk.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/filled_thunk.jsonnet new file mode 100644 index 0000000..a3c823e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/filled_thunk.jsonnet @@ -0,0 +1 @@ +local x = [1, 2, 3]; x[1] + x[1] \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/method_call.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/method_call.jsonnet new file mode 100644 index 0000000..f9fae83 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/method_call.jsonnet @@ -0,0 +1 @@ +local r = {f(a): 42};r.f(null) \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/missing_super.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/missing_super.jsonnet new file mode 100644 index 0000000..f46bc40 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/missing_super.jsonnet @@ -0,0 +1 @@ +{ x: super.x } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import.jsonnet new file mode 100644 index 0000000..99fefa3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import.jsonnet @@ -0,0 +1 @@ +importstr 'no chance a file with this name exists' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import_crazy.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import_crazy.jsonnet new file mode 100644 index 0000000..fe6f680 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import_crazy.jsonnet @@ -0,0 +1 @@ +importstr "ąęółńśćźż \" \' \n\n\t\t" diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/proto_object_comp.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/proto_object_comp.jsonnet new file mode 100644 index 0000000..dcbab62 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/proto_object_comp.jsonnet @@ -0,0 +1 @@ +[{[v]: v} for v in ["x", "y", "z"]] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/self.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/self.jsonnet new file mode 100644 index 0000000..d7874d3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/self.jsonnet @@ -0,0 +1 @@ +{x: self.y, y: 42}.x \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/stackbug-regression-test.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/stackbug-regression-test.jsonnet new file mode 100644 index 0000000..88518f4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/stackbug-regression-test.jsonnet @@ -0,0 +1 @@ +local xxx=0; xxx==0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/static_error_eof.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/static_error_eof.jsonnet new file mode 100644 index 0000000..1167177 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/static_error_eof.jsonnet @@ -0,0 +1 @@ +local x = 5 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.codepoint2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.codepoint2.jsonnet new file mode 100644 index 0000000..eb6a95c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.codepoint2.jsonnet @@ -0,0 +1 @@ +std.codepoint("\u0000") diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.toString7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.toString7.jsonnet new file mode 100644 index 0000000..1c81da7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.toString7.jsonnet @@ -0,0 +1,5 @@ +std.toString([{ + a: [42, 42, { + }], + ["b"]: 1337 +}, 42, "text", 42]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/string2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/string2.jsonnet new file mode 100644 index 0000000..9458e0f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/string2.jsonnet @@ -0,0 +1 @@ +"\"xxx\"" diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/too_many_arguments.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/too_many_arguments.jsonnet new file mode 100644 index 0000000..52c30d7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/too_many_arguments.jsonnet @@ -0,0 +1 @@ +(function(x, y, z) 42)(1, 2, 3, 4) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode.jsonnet new file mode 100644 index 0000000..d514a5d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode.jsonnet @@ -0,0 +1 @@ +"\u263A" \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode2.jsonnet new file mode 100644 index 0000000..2402faf --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode2.jsonnet @@ -0,0 +1 @@ +"\u263a" \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable.jsonnet new file mode 100644 index 0000000..a235b8e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable.jsonnet @@ -0,0 +1,3 @@ +local x = 2; + +x \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable_not_visible.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable_not_visible.jsonnet new file mode 100644 index 0000000..8fe6a91 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable_not_visible.jsonnet @@ -0,0 +1,3 @@ +local x1 = local nested = 42; + +nested, x2 = nested; x2 \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/verbatim_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/verbatim_string.jsonnet new file mode 100644 index 0000000..ed3f2d6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/verbatim_string.jsonnet @@ -0,0 +1 @@ +@"blah ☺" \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthen_false.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthen_false.jsonnet new file mode 100644 index 0000000..ab65dca --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthen_false.jsonnet @@ -0,0 +1 @@ +if true then 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_false.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_false.jsonnet new file mode 100644 index 0000000..5accc94 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_false.jsonnet @@ -0,0 +1 @@ +if false then error 'no way' else 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_true.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_true.jsonnet new file mode 100644 index 0000000..9a71ac1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_true.jsonnet @@ -0,0 +1 @@ +if true then 42 else error 'no way' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import.jsonnet new file mode 100644 index 0000000..530136a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import.jsonnet @@ -0,0 +1 @@ +import 'true.jsonnet' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import2.jsonnet new file mode 100644 index 0000000..046d5d0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import2.jsonnet @@ -0,0 +1 @@ +import 'false.jsonnet' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import3.jsonnet new file mode 100644 index 0000000..a7fde33 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import3.jsonnet @@ -0,0 +1 @@ +importstr 'true.jsonnet' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import4.jsonnet new file mode 100644 index 0000000..c9b733c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import4.jsonnet @@ -0,0 +1 @@ +importstr 'false.jsonnet' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import_various_literals.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import_various_literals.jsonnet new file mode 100644 index 0000000..2eb6d62 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import_various_literals.jsonnet @@ -0,0 +1,6 @@ +[ + import 'true.jsonnet', + import 'true.jsonnet', + import @"true.jsonnet", + import @'true.jsonnet', +] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in.jsonnet new file mode 100644 index 0000000..e1b6095 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in.jsonnet @@ -0,0 +1 @@ +'x' in { x: 42 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in2.jsonnet new file mode 100644 index 0000000..97911db --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in2.jsonnet @@ -0,0 +1 @@ +'x' in {} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in3.jsonnet new file mode 100644 index 0000000..0cb2f62 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in3.jsonnet @@ -0,0 +1 @@ +'x' in { x: 42, y: 42 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in4.jsonnet new file mode 100644 index 0000000..f16a7d9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in4.jsonnet @@ -0,0 +1 @@ +'x' in { assert false } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper.jsonnet new file mode 100644 index 0000000..f70c711 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper.jsonnet @@ -0,0 +1,5 @@ +{ + x: 42, +} { + assert 'x' in super, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper2.jsonnet new file mode 100644 index 0000000..3ba8a45 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper2.jsonnet @@ -0,0 +1 @@ +{} { x: 'x' in super } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper4.jsonnet new file mode 100644 index 0000000..c9b290b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper4.jsonnet @@ -0,0 +1 @@ + 'x' in super diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy.jsonnet new file mode 100644 index 0000000..d064e91 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy.jsonnet @@ -0,0 +1,3 @@ +local x = { x: error 'blah' }, f(x) = 42, z = x.x; + +f(x.x) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator1.jsonnet new file mode 100644 index 0000000..335fd53 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator1.jsonnet @@ -0,0 +1 @@ +false && error "shouldn't happen" diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator2.jsonnet new file mode 100644 index 0000000..e29a0ab --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator2.jsonnet @@ -0,0 +1 @@ +true && error 'should happen' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/less.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/less.jsonnet new file mode 100644 index 0000000..11c033b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/less.jsonnet @@ -0,0 +1 @@ +if 2 < 1 then error 'x' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq.jsonnet new file mode 100644 index 0000000..88b38b9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq.jsonnet @@ -0,0 +1 @@ +if 2 <= 1 then error 'x' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq2.jsonnet new file mode 100644 index 0000000..66a142a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq2.jsonnet @@ -0,0 +1 @@ +if 2 <= 2 then 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local1.jsonnet new file mode 100644 index 0000000..8ef469a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local1.jsonnet @@ -0,0 +1,16 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local_within_nested_object.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local_within_nested_object.jsonnet new file mode 100644 index 0000000..e1b069e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local_within_nested_object.jsonnet @@ -0,0 +1,3 @@ +local a = 42; + +{ x: { x: a } }.x.x diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo.jsonnet new file mode 100644 index 0000000..3bd870c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo.jsonnet @@ -0,0 +1 @@ +std.modulo(16, 3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo2.jsonnet new file mode 100644 index 0000000..9e2b2a7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo2.jsonnet @@ -0,0 +1 @@ +std.modulo(42, 3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo3.jsonnet new file mode 100644 index 0000000..d13f02e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo3.jsonnet @@ -0,0 +1 @@ +std.modulo(16, -3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo4.jsonnet new file mode 100644 index 0000000..5b033ef --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo4.jsonnet @@ -0,0 +1 @@ +std.modulo(-16, 3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo5.jsonnet new file mode 100644 index 0000000..35ffcae --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo5.jsonnet @@ -0,0 +1 @@ +std.modulo(-16, -3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo6.jsonnet new file mode 100644 index 0000000..71addd9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo6.jsonnet @@ -0,0 +1 @@ +std.modulo(15.5, 1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo7.jsonnet new file mode 100644 index 0000000..b777d53 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo7.jsonnet @@ -0,0 +1 @@ +std.modulo(42, 2.5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult.jsonnet new file mode 100644 index 0000000..e784f3e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult.jsonnet @@ -0,0 +1 @@ +2 * 2 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult2.jsonnet new file mode 100644 index 0000000..4991791 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult2.jsonnet @@ -0,0 +1 @@ +2 * (-2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult3.jsonnet new file mode 100644 index 0000000..302c692 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult3.jsonnet @@ -0,0 +1 @@ +42 * 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native1.jsonnet new file mode 100644 index 0000000..8bbfe13 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native1.jsonnet @@ -0,0 +1 @@ +std.native('jsonToString')('test') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native2.jsonnet new file mode 100644 index 0000000..f81cffa --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native2.jsonnet @@ -0,0 +1 @@ +std.native('jsonToString')({}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native4.jsonnet new file mode 100644 index 0000000..1309fd1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native4.jsonnet @@ -0,0 +1 @@ +std.native('jsonToString')(error 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native5.jsonnet new file mode 100644 index 0000000..9137da7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native5.jsonnet @@ -0,0 +1 @@ +std.native('jsonToString')(function() 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native6.jsonnet new file mode 100644 index 0000000..c6de08b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native6.jsonnet @@ -0,0 +1 @@ +std.native('jsonToString')(x={}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native7.jsonnet new file mode 100644 index 0000000..9222e5d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native7.jsonnet @@ -0,0 +1 @@ +std.native('jsonToString')(y={}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_error.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_error.jsonnet new file mode 100644 index 0000000..06f84f0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_error.jsonnet @@ -0,0 +1 @@ +std.native('nativeError')() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_nonexistent.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_nonexistent.jsonnet new file mode 100644 index 0000000..ea40397 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_nonexistent.jsonnet @@ -0,0 +1 @@ +std.native('blah') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_divided_by_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_divided_by_string.jsonnet new file mode 100644 index 0000000..942c9df --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_divided_by_string.jsonnet @@ -0,0 +1 @@ +42 / 'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_times_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_times_string.jsonnet new file mode 100644 index 0000000..d82e3b2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_times_string.jsonnet @@ -0,0 +1 @@ +42 * 'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/numeric_literal.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/numeric_literal.jsonnet new file mode 100644 index 0000000..29d6383 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/numeric_literal.jsonnet @@ -0,0 +1 @@ +100 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object.jsonnet new file mode 100644 index 0000000..81043b3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object.jsonnet @@ -0,0 +1 @@ +{ x: 1 + 1 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object2.jsonnet new file mode 100644 index 0000000..bf9a061 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object2.jsonnet @@ -0,0 +1,15 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object3.jsonnet new file mode 100644 index 0000000..8bf5f87 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object3.jsonnet @@ -0,0 +1,9 @@ +local params = import '../../components/params.libsonnet'; + +params { + components+: { + guestbook+: { + name: 'guestbook-dev', + }, + }, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp.jsonnet new file mode 100644 index 0000000..13d8e4b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp.jsonnet @@ -0,0 +1,4 @@ +{ + [x]: 42 + for x in ['a', 'b', 'c'] +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_binary.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_binary.jsonnet new file mode 100644 index 0000000..5462d73 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_binary.jsonnet @@ -0,0 +1,9 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_dollar.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_dollar.jsonnet new file mode 100644 index 0000000..083653e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_dollar.jsonnet @@ -0,0 +1,4 @@ +{ + [x]: if x == 'a' then 42 else $.a + 1 + for x in ['a', 'b', 'c'] +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_elem.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_elem.jsonnet new file mode 100644 index 0000000..fd550e4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_elem.jsonnet @@ -0,0 +1,4 @@ +{ + ['x']: error 'xxx' + for x in [1] +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_index.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_index.jsonnet new file mode 100644 index 0000000..be35a95 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_index.jsonnet @@ -0,0 +1,4 @@ +{ + [error 'xxx']: 42 + for x in [1] +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_if.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_if.jsonnet new file mode 100644 index 0000000..fdc7500 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_if.jsonnet @@ -0,0 +1,5 @@ +{ + [x]: 42 + for x in ['a', 'b', 'bb', 'c'] + if x[0] == 'b' +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_int_index.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_int_index.jsonnet new file mode 100644 index 0000000..706d7d2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_int_index.jsonnet @@ -0,0 +1,4 @@ +{ + [x]: x + for x in [1, 2, 3] +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_local.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_local.jsonnet new file mode 100644 index 0000000..012ef33 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_local.jsonnet @@ -0,0 +1,11 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_super.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_super.jsonnet new file mode 100644 index 0000000..5f9100c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_super.jsonnet @@ -0,0 +1,10 @@ +{ 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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_field1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_field1.jsonnet new file mode 100644 index 0000000..269860a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_field1.jsonnet @@ -0,0 +1,5 @@ +local command = 'command'; + +{ + [if command != 'null' then 'command']: [command], +} \ No newline at end of file diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_hidden.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_hidden.jsonnet new file mode 100644 index 0000000..7384ead --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_hidden.jsonnet @@ -0,0 +1,23 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local.jsonnet new file mode 100644 index 0000000..2a0ef95 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local.jsonnet @@ -0,0 +1 @@ +{ local foo(bar) = bar, baz: foo(42) } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local_self_super.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local_self_super.jsonnet new file mode 100644 index 0000000..c5e687b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local_self_super.jsonnet @@ -0,0 +1 @@ +{ 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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_plus_bad.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_plus_bad.jsonnet new file mode 100644 index 0000000..eb5f316 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_plus_bad.jsonnet @@ -0,0 +1 @@ +{} + 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum.jsonnet new file mode 100644 index 0000000..aa158b1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum.jsonnet @@ -0,0 +1 @@ +{} + {} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum2.jsonnet new file mode 100644 index 0000000..921ef3e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum2.jsonnet @@ -0,0 +1 @@ +{ a: 1 } + { a: 2 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum3.jsonnet new file mode 100644 index 0000000..2c34c41 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum3.jsonnet @@ -0,0 +1 @@ +{ a: 1 } + { b: 2 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super.jsonnet new file mode 100644 index 0000000..640b946 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super.jsonnet @@ -0,0 +1 @@ +{ a: 1 } + { a: 2, b: super.a } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_deep.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_deep.jsonnet new file mode 100644 index 0000000..8c7cb50 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_deep.jsonnet @@ -0,0 +1 @@ +{ a: 1 } + {} + { a: 2, b: super.a } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_within.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_within.jsonnet new file mode 100644 index 0000000..46b20f9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_within.jsonnet @@ -0,0 +1 @@ +{ a: 42, d: 1 } + { c: super.d, d: 42 } + { a: 2, b: super.c, d: 42 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args.jsonnet new file mode 100644 index 0000000..11daa92 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args.jsonnet @@ -0,0 +1,3 @@ +local foo(x=42) = x; + +foo() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args10.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args10.jsonnet new file mode 100644 index 0000000..98cd4fb --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args10.jsonnet @@ -0,0 +1 @@ +(function(x, y) x)(y=1, x=2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args11.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args11.jsonnet new file mode 100644 index 0000000..f5de182 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args11.jsonnet @@ -0,0 +1 @@ +(function(x, y) 42)(42, x=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args12.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args12.jsonnet new file mode 100644 index 0000000..1f576ba --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args12.jsonnet @@ -0,0 +1 @@ +(function(x=42, y=42) 42)(y=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args13.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args13.jsonnet new file mode 100644 index 0000000..0a08516 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args13.jsonnet @@ -0,0 +1 @@ +(function(x, y) 42)(x=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args14.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args14.jsonnet new file mode 100644 index 0000000..ed03b9d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args14.jsonnet @@ -0,0 +1 @@ +(function(a=b, b=a) 42)() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args15.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args15.jsonnet new file mode 100644 index 0000000..e5d071d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args15.jsonnet @@ -0,0 +1 @@ +{ g: 42, f(a=self.g): a }.f() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args16.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args16.jsonnet new file mode 100644 index 0000000..88c02a2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args16.jsonnet @@ -0,0 +1 @@ +(function(x=17) x)(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args17.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args17.jsonnet new file mode 100644 index 0000000..403afd3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args17.jsonnet @@ -0,0 +1 @@ +(function(x, y=42) x + y)(y=1, x=2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args18.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args18.jsonnet new file mode 100644 index 0000000..d828007 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args18.jsonnet @@ -0,0 +1 @@ +(function(a1=1, a2=a1 + 1, a3=a2 + 1, a4=a3 + 1) [a1, a2, a3, a4])(a1=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args19.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args19.jsonnet new file mode 100644 index 0000000..e952e81 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args19.jsonnet @@ -0,0 +1 @@ +(function(a1=a2 + 1, a2=a3 + 1, a3=a4 + 1, a4=1) [a1, a2, a3, a4])(a4=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args2.jsonnet new file mode 100644 index 0000000..7acac87 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args2.jsonnet @@ -0,0 +1,9 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args20.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args20.jsonnet new file mode 100644 index 0000000..6395976 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args20.jsonnet @@ -0,0 +1 @@ +(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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args21.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args21.jsonnet new file mode 100644 index 0000000..5c95c88 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args21.jsonnet @@ -0,0 +1,3 @@ +local foo(x=2, z=x) = x; + +foo() diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args22.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args22.jsonnet new file mode 100644 index 0000000..917e8d9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args22.jsonnet @@ -0,0 +1,5 @@ +local foo(x) = local bar(y=x) = [x, y]; + +bar; + +[foo(42)(), foo(42)(17)] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args3.jsonnet new file mode 100644 index 0000000..42d4c03 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args3.jsonnet @@ -0,0 +1,8 @@ +local x = 1; +local foo(x=2, y=3, z=x) = { + x: x, + y: y, + z: z, +}; + +foo(y=x) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args4.jsonnet new file mode 100644 index 0000000..3dbff13 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args4.jsonnet @@ -0,0 +1,9 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args5.jsonnet new file mode 100644 index 0000000..56cf926 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args5.jsonnet @@ -0,0 +1,3 @@ +local foo(x, y=x) = y; + +foo(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args6.jsonnet new file mode 100644 index 0000000..2c58191 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args6.jsonnet @@ -0,0 +1,3 @@ +local foo(x, y=x) = y; + +foo(x=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args7.jsonnet new file mode 100644 index 0000000..11a93a9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args7.jsonnet @@ -0,0 +1,3 @@ +local foo(x) = x; + +foo(x=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args8.jsonnet new file mode 100644 index 0000000..7eb4de2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args8.jsonnet @@ -0,0 +1,3 @@ +local foo(x=42) = x; + +foo(y=17) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args9.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args9.jsonnet new file mode 100644 index 0000000..0db2a36 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args9.jsonnet @@ -0,0 +1 @@ +(function(x) x)(42, x=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or.jsonnet new file mode 100644 index 0000000..06eb8b0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or.jsonnet @@ -0,0 +1 @@ +false || false diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or2.jsonnet new file mode 100644 index 0000000..84ffdd6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or2.jsonnet @@ -0,0 +1 @@ +false || true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or3.jsonnet new file mode 100644 index 0000000..23b33a9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or3.jsonnet @@ -0,0 +1 @@ +true || error 'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or4.jsonnet new file mode 100644 index 0000000..39e6a48 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or4.jsonnet @@ -0,0 +1 @@ +false || error 'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or5.jsonnet new file mode 100644 index 0000000..788838a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or5.jsonnet @@ -0,0 +1 @@ +'xxx' || true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or6.jsonnet new file mode 100644 index 0000000..6a5f6f5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or6.jsonnet @@ -0,0 +1 @@ +false || 'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_float.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_float.jsonnet new file mode 100644 index 0000000..1402203 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_float.jsonnet @@ -0,0 +1 @@ +'%f' % 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str.jsonnet new file mode 100644 index 0000000..7155b31 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str.jsonnet @@ -0,0 +1 @@ +'x %s' % ['y'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str2.jsonnet new file mode 100644 index 0000000..f3a8abe --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str2.jsonnet @@ -0,0 +1 @@ +'x %s' % 'y' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str3.jsonnet new file mode 100644 index 0000000..578014d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str3.jsonnet @@ -0,0 +1 @@ +'x %s %s' % ['y', 'z'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str4.jsonnet new file mode 100644 index 0000000..7c87222 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str4.jsonnet @@ -0,0 +1 @@ +'x %s' % ['y', 'z'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str5.jsonnet new file mode 100644 index 0000000..965445a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str5.jsonnet @@ -0,0 +1 @@ +'x %s %s' % ['y'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str6.jsonnet new file mode 100644 index 0000000..20be358 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str6.jsonnet @@ -0,0 +1 @@ +'x %s %s' % 'y' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str7.jsonnet new file mode 100644 index 0000000..d3745e4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str7.jsonnet @@ -0,0 +1 @@ +'x %d' % ['y'] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str8.jsonnet new file mode 100644 index 0000000..0f790aa --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str8.jsonnet @@ -0,0 +1 @@ +'x %(a)s %(b)s' % { a: 'y', b: 'z' } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int.jsonnet new file mode 100644 index 0000000..ca415dc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int.jsonnet @@ -0,0 +1 @@ +42 % 5 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int2.jsonnet new file mode 100644 index 0000000..72eff8b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int2.jsonnet @@ -0,0 +1 @@ +42 % -5 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int3.jsonnet new file mode 100644 index 0000000..dccbe2e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int3.jsonnet @@ -0,0 +1 @@ +-42 % 5 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int4.jsonnet new file mode 100644 index 0000000..4c3bbc2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int4.jsonnet @@ -0,0 +1 @@ +-42 % -5 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int5.jsonnet new file mode 100644 index 0000000..bb46fb9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int5.jsonnet @@ -0,0 +1 @@ +42 % 0 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int6.jsonnet new file mode 100644 index 0000000..98a7800 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int6.jsonnet @@ -0,0 +1 @@ +0 % 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus.jsonnet new file mode 100644 index 0000000..e0ef584 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus.jsonnet @@ -0,0 +1 @@ +1 + 2 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus2.jsonnet new file mode 100644 index 0000000..4b73091 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus2.jsonnet @@ -0,0 +1 @@ +'a' + 'b' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus3.jsonnet new file mode 100644 index 0000000..a7dfcb8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus3.jsonnet @@ -0,0 +1 @@ +[1, 2, 3] + [4, 5, 6] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus4.jsonnet new file mode 100644 index 0000000..0a74eea --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus4.jsonnet @@ -0,0 +1 @@ +{ a: 1, b: 2 } + { a: 3, c: 4 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus5.jsonnet new file mode 100644 index 0000000..28ba667 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus5.jsonnet @@ -0,0 +1 @@ +42 + function() 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus6.jsonnet new file mode 100644 index 0000000..439d3a1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus6.jsonnet @@ -0,0 +1 @@ +'a' + 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus7.jsonnet new file mode 100644 index 0000000..75fb0c4 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus7.jsonnet @@ -0,0 +1 @@ +42 + 'a' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus9.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus9.jsonnet new file mode 100644 index 0000000..27f7d91 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus9.jsonnet @@ -0,0 +1 @@ +'a' + [1, 2, 3] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow.jsonnet new file mode 100644 index 0000000..7948176 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow.jsonnet @@ -0,0 +1 @@ +std.pow(2, 10) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow2.jsonnet new file mode 100644 index 0000000..50e61a6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow2.jsonnet @@ -0,0 +1 @@ +std.pow(10, 2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow3.jsonnet new file mode 100644 index 0000000..8789993 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow3.jsonnet @@ -0,0 +1 @@ +std.pow(-1, 3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow4.jsonnet new file mode 100644 index 0000000..99a08d3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow4.jsonnet @@ -0,0 +1 @@ +std.pow(-1, 0.2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow5.jsonnet new file mode 100644 index 0000000..d1230be --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow5.jsonnet @@ -0,0 +1 @@ +std.pow(2, 0.2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow8.jsonnet new file mode 100644 index 0000000..c98f205 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow8.jsonnet @@ -0,0 +1 @@ +std.pow('xxx', 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow9.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow9.jsonnet new file mode 100644 index 0000000..fe98159 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow9.jsonnet @@ -0,0 +1 @@ +std.pow(42, 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_local.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_local.jsonnet new file mode 100644 index 0000000..e0d62fd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_local.jsonnet @@ -0,0 +1,3 @@ +local f(x) = if x == 0 then 0 else 1 + f(x - 1); + +f(5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_thunk.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_thunk.jsonnet new file mode 100644 index 0000000..2235fc6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_thunk.jsonnet @@ -0,0 +1,4 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith1.jsonnet new file mode 100644 index 0000000..184afeb --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith1.jsonnet @@ -0,0 +1 @@ +3 + 3 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith2.jsonnet new file mode 100644 index 0000000..6bb5e4d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith2.jsonnet @@ -0,0 +1 @@ +3 + 3 + 3 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith3.jsonnet new file mode 100644 index 0000000..f3ef555 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith3.jsonnet @@ -0,0 +1 @@ +(3 + 3) + (3 + 3) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string.jsonnet new file mode 100644 index 0000000..7e72b5a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string.jsonnet @@ -0,0 +1 @@ +'aaa' + 'bbb' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string2.jsonnet new file mode 100644 index 0000000..574b446 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string2.jsonnet @@ -0,0 +1 @@ +'aaa' + '' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string3.jsonnet new file mode 100644 index 0000000..cebf632 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string3.jsonnet @@ -0,0 +1 @@ +'' + 'bbb' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string_empty.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string_empty.jsonnet new file mode 100644 index 0000000..15f82f0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string_empty.jsonnet @@ -0,0 +1 @@ +'' + '' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice.jsonnet new file mode 100644 index 0000000..699e707 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice.jsonnet @@ -0,0 +1 @@ +[1, 2, 3, 4][1:4:2] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice3.jsonnet new file mode 100644 index 0000000..a469f66 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice3.jsonnet @@ -0,0 +1 @@ +[1, 2, 3, 4][1:2] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice4.jsonnet new file mode 100644 index 0000000..45c2c25 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice4.jsonnet @@ -0,0 +1 @@ +[1, 2, 3, 4][:3] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice5.jsonnet new file mode 100644 index 0000000..e9b24f1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice5.jsonnet @@ -0,0 +1 @@ +[1, 2, 3, 4][1:] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice7.jsonnet new file mode 100644 index 0000000..4d3a0de --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice7.jsonnet @@ -0,0 +1 @@ +[1, 2, 3, 4][::2] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint.jsonnet new file mode 100644 index 0000000..1bd78d7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint.jsonnet @@ -0,0 +1 @@ +std.codepoint('A') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint3.jsonnet new file mode 100644 index 0000000..0588d89 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint3.jsonnet @@ -0,0 +1 @@ +std.codepoint('aa') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint4.jsonnet new file mode 100644 index 0000000..0413f4a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint4.jsonnet @@ -0,0 +1 @@ +std.codepoint('ą') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint5.jsonnet new file mode 100644 index 0000000..a8b721d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint5.jsonnet @@ -0,0 +1 @@ +std.codepoint('台') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint6.jsonnet new file mode 100644 index 0000000..3002c4a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint6.jsonnet @@ -0,0 +1 @@ +std.codepoint('') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint7.jsonnet new file mode 100644 index 0000000..1844830 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint7.jsonnet @@ -0,0 +1 @@ +std.codepoint('ą') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint8.jsonnet new file mode 100644 index 0000000..37c614d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint8.jsonnet @@ -0,0 +1 @@ +std.codepoint(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent.jsonnet new file mode 100644 index 0000000..9f67739 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent.jsonnet @@ -0,0 +1 @@ +std.exponent(0) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent2.jsonnet new file mode 100644 index 0000000..87223e6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent2.jsonnet @@ -0,0 +1 @@ +std.exponent(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent3.jsonnet new file mode 100644 index 0000000..b235166 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent3.jsonnet @@ -0,0 +1 @@ +std.exponent(1e30) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent4.jsonnet new file mode 100644 index 0000000..17a1f3e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent4.jsonnet @@ -0,0 +1 @@ +std.exponent(1 << 30) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent5.jsonnet new file mode 100644 index 0000000..01188d9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent5.jsonnet @@ -0,0 +1 @@ +std.exponent(42 << 30) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent6.jsonnet new file mode 100644 index 0000000..3b1b19a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent6.jsonnet @@ -0,0 +1 @@ +std.exponent(42 / (1 << 30)) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent7.jsonnet new file mode 100644 index 0000000..b5257fd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent7.jsonnet @@ -0,0 +1 @@ +std.exponent(-42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter.jsonnet new file mode 100644 index 0000000..024ab41 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter.jsonnet @@ -0,0 +1 @@ +std.filter(function(n) std.mod(n, 2) == 1, [1, 2, 3, 4, 5]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter2.jsonnet new file mode 100644 index 0000000..73ee794 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter2.jsonnet @@ -0,0 +1 @@ +std.filter(error 'x', []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter3.jsonnet new file mode 100644 index 0000000..9042c9c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter3.jsonnet @@ -0,0 +1 @@ +std.filter(function(n) error 'xxx', []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter4.jsonnet new file mode 100644 index 0000000..2cfdc4f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter4.jsonnet @@ -0,0 +1 @@ +std.filter(42, []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter5.jsonnet new file mode 100644 index 0000000..1b2ab0d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter5.jsonnet @@ -0,0 +1 @@ +std.filter(function(n) 42, 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter6.jsonnet new file mode 100644 index 0000000..ed53516 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter6.jsonnet @@ -0,0 +1 @@ +std.filter(42, '42') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter7.jsonnet new file mode 100644 index 0000000..2813f14 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter7.jsonnet @@ -0,0 +1 @@ +std.filter(function(n) false, [error 'xxx']) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter8.jsonnet new file mode 100644 index 0000000..b6d0245 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter8.jsonnet @@ -0,0 +1 @@ +std.filter([42], function(i) 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter_swapped_args.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter_swapped_args.jsonnet new file mode 100644 index 0000000..d421a7f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter_swapped_args.jsonnet @@ -0,0 +1 @@ +std.filter([1, 2, 3], function(n) true) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap.jsonnet new file mode 100644 index 0000000..b35cfb3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap.jsonnet @@ -0,0 +1 @@ +std.flatMap(function(x) [], [1, 2, 3]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap2.jsonnet new file mode 100644 index 0000000..c124480 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap2.jsonnet @@ -0,0 +1 @@ +std.flatMap(function(x) [1, 2, 3], ['a', 2, 3, 4, 5]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap3.jsonnet new file mode 100644 index 0000000..7dd6f9f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap3.jsonnet @@ -0,0 +1 @@ +std.flatMap(function(x) error 'never happens', []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap4.jsonnet new file mode 100644 index 0000000..34a40fb --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap4.jsonnet @@ -0,0 +1 @@ +std.flatMap(function(x) [x, x], [1, 2, 3, 4, 5]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap5.jsonnet new file mode 100644 index 0000000..665c8cc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap5.jsonnet @@ -0,0 +1,3 @@ +local failWith(x) = error x; + +std.type(std.flatMap(failWith, ['a', 'b', 'c'])) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join.jsonnet new file mode 100644 index 0000000..ca3fc66 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join.jsonnet @@ -0,0 +1 @@ +std.join([], []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join2.jsonnet new file mode 100644 index 0000000..dd401c2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join2.jsonnet @@ -0,0 +1 @@ +std.join([42], []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join3.jsonnet new file mode 100644 index 0000000..1965840 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join3.jsonnet @@ -0,0 +1 @@ +std.join([42], [[1]]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join4.jsonnet new file mode 100644 index 0000000..471d721 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join4.jsonnet @@ -0,0 +1 @@ +std.join([42], [[1], [2]]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join5.jsonnet new file mode 100644 index 0000000..c83e34e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join5.jsonnet @@ -0,0 +1 @@ +std.join([42], [[1], [2], [3]]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join6.jsonnet new file mode 100644 index 0000000..decde21 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join6.jsonnet @@ -0,0 +1 @@ +std.join('xxx', ['aa', 'bb']) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join7.jsonnet new file mode 100644 index 0000000..4c196b5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join7.jsonnet @@ -0,0 +1 @@ +std.join('aa', [[1], [2]]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join8.jsonnet new file mode 100644 index 0000000..892e312 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join8.jsonnet @@ -0,0 +1 @@ +std.join([3, 4], [[1, 2], '56']) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.jsonnet new file mode 100644 index 0000000..cd135ab --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.jsonnet @@ -0,0 +1 @@ +std.length('x') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray.jsonnet new file mode 100644 index 0000000..92d2c4d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray.jsonnet @@ -0,0 +1 @@ +std.makeArray(5, function(x) 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed.jsonnet new file mode 100644 index 0000000..95e1f7a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed.jsonnet @@ -0,0 +1 @@ +std.makeArray(sz=5, func=function(i) i) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed2.jsonnet new file mode 100644 index 0000000..bb5acb7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed2.jsonnet @@ -0,0 +1 @@ +std.makeArray(func=function(i) i, sz=5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed3.jsonnet new file mode 100644 index 0000000..e327cb9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed3.jsonnet @@ -0,0 +1 @@ +std.makeArray(blahblah=5, blahblahblah=function(i) i) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed4.jsonnet new file mode 100644 index 0000000..aabecf3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed4.jsonnet @@ -0,0 +1 @@ +std.makeArray(3, func=function(i) i) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad.jsonnet new file mode 100644 index 0000000..42a5c4f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad.jsonnet @@ -0,0 +1 @@ +std.makeArray('xxx', function(i) i) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad2.jsonnet new file mode 100644 index 0000000..0797545 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad2.jsonnet @@ -0,0 +1 @@ +std.makeArray(42, 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger.jsonnet new file mode 100644 index 0000000..c046e67 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger.jsonnet @@ -0,0 +1 @@ +std.makeArray(2.5, function(i) i) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger_big.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger_big.jsonnet new file mode 100644 index 0000000..9bd2ba3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger_big.jsonnet @@ -0,0 +1 @@ +std.makeArray(1e100, error "shouldn't happen") diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive.jsonnet new file mode 100644 index 0000000..18716a2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive.jsonnet @@ -0,0 +1,3 @@ +local arr = [0] + std.makeArray(2000, function(i) arr[i] + 1); + +arr diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive_evalutation_order_matters.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive_evalutation_order_matters.jsonnet new file mode 100644 index 0000000..0db7fb5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive_evalutation_order_matters.jsonnet @@ -0,0 +1,3 @@ +local arr = [0] + std.makeArray(2000, function(i) arr[i] + 1); + +arr[500] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa.jsonnet new file mode 100644 index 0000000..e4c1cb0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa.jsonnet @@ -0,0 +1 @@ +std.mantissa(0) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa2.jsonnet new file mode 100644 index 0000000..8e741ee --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa2.jsonnet @@ -0,0 +1 @@ +std.mantissa(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa3.jsonnet new file mode 100644 index 0000000..de02a0a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa3.jsonnet @@ -0,0 +1 @@ +std.mantissa(0.42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa4.jsonnet new file mode 100644 index 0000000..428706b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa4.jsonnet @@ -0,0 +1 @@ +std.mantissa(1e100) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa5.jsonnet new file mode 100644 index 0000000..55ac1c7 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa5.jsonnet @@ -0,0 +1 @@ +std.mantissa(42 << 30) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa6.jsonnet new file mode 100644 index 0000000..fd5eb96 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa6.jsonnet @@ -0,0 +1 @@ +std.mantissa(42 / (1 << 30)) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa7.jsonnet new file mode 100644 index 0000000..3dafcd2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa7.jsonnet @@ -0,0 +1 @@ +std.mantissa(-42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5.jsonnet new file mode 100644 index 0000000..8968358 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5.jsonnet @@ -0,0 +1 @@ +std.md5('xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_2.jsonnet new file mode 100644 index 0000000..1a8acbc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_2.jsonnet @@ -0,0 +1 @@ +std.md5('') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_3.jsonnet new file mode 100644 index 0000000..7403529 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_3.jsonnet @@ -0,0 +1 @@ +std.md5('a') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_4.jsonnet new file mode 100644 index 0000000..3cb3c73 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_4.jsonnet @@ -0,0 +1 @@ +std.md5('message digest') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_5.jsonnet new file mode 100644 index 0000000..c6ff90d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_5.jsonnet @@ -0,0 +1 @@ +std.md5('ą') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_6.jsonnet new file mode 100644 index 0000000..2542a47 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_6.jsonnet @@ -0,0 +1 @@ +std.md5(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_int.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_int.jsonnet new file mode 100644 index 0000000..01a3999 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_int.jsonnet @@ -0,0 +1 @@ +std.mod(42, 5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_string.jsonnet new file mode 100644 index 0000000..1e40839 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_string.jsonnet @@ -0,0 +1 @@ +std.mod('abcd %s %03d', ['xxx', 42]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo.jsonnet new file mode 100644 index 0000000..3b8c4d9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo.jsonnet @@ -0,0 +1 @@ +std.modulo(42, 5) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo2.jsonnet new file mode 100644 index 0000000..defcd28 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo2.jsonnet @@ -0,0 +1 @@ +std.modulo('xxx', 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo3.jsonnet new file mode 100644 index 0000000..defcd28 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo3.jsonnet @@ -0,0 +1 @@ +std.modulo('xxx', 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals.jsonnet new file mode 100644 index 0000000..90d187d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(1, 1) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals10.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals10.jsonnet new file mode 100644 index 0000000..ece4bd9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals10.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(error 'x', 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals11.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals11.jsonnet new file mode 100644 index 0000000..3d369b6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals11.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(3.14, 3.14) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals12.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals12.jsonnet new file mode 100644 index 0000000..13d0129 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals12.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(3.14, 3.15) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals13.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals13.jsonnet new file mode 100644 index 0000000..f6468c1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals13.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals([], []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals14.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals14.jsonnet new file mode 100644 index 0000000..928250c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals14.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(42, {}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals15.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals15.jsonnet new file mode 100644 index 0000000..6753165 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals15.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals({}, 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals16.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals16.jsonnet new file mode 100644 index 0000000..5fa0076 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals16.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals([], 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals17.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals17.jsonnet new file mode 100644 index 0000000..a7095f1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals17.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(42, []) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals18.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals18.jsonnet new file mode 100644 index 0000000..b80fa3d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals18.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(null, null) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals19.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals19.jsonnet new file mode 100644 index 0000000..2e38df9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals19.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(true, true) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals2.jsonnet new file mode 100644 index 0000000..7b7cc1c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals2.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(1, 2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals20.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals20.jsonnet new file mode 100644 index 0000000..200a472 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals20.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(true, 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals21.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals21.jsonnet new file mode 100644 index 0000000..9336e0c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals21.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals('xxx', 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals3.jsonnet new file mode 100644 index 0000000..97324cb --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals3.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals('xxx', 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals4.jsonnet new file mode 100644 index 0000000..47f0c9f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals4.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals('xxx', 'xxy') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals5.jsonnet new file mode 100644 index 0000000..28238a3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals5.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(1, 'x') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals6.jsonnet new file mode 100644 index 0000000..092e8eb --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals6.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals({}, {}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals7.jsonnet new file mode 100644 index 0000000..62a486f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals7.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(function() 42, function() 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals8.jsonnet new file mode 100644 index 0000000..7c51d25 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals8.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(42, function() 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals9.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals9.jsonnet new file mode 100644 index 0000000..194131b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals9.jsonnet @@ -0,0 +1 @@ +std.primitiveEquals(42, error 'x') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.slice.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.slice.jsonnet new file mode 100644 index 0000000..c071f34 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.slice.jsonnet @@ -0,0 +1 @@ +std.slice([1, 2, 3, 4], 1, 4, 2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile.jsonnet new file mode 100644 index 0000000..f413f6e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile.jsonnet @@ -0,0 +1 @@ +std.thisFile diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile2.jsonnet new file mode 100644 index 0000000..8530290 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile2.jsonnet @@ -0,0 +1 @@ +import 'std.thisFile.jsonnet' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString.jsonnet new file mode 100644 index 0000000..011485d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString.jsonnet @@ -0,0 +1 @@ +std.toString('xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString2.jsonnet new file mode 100644 index 0000000..0490c86 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString2.jsonnet @@ -0,0 +1 @@ +std.toString(2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString3.jsonnet new file mode 100644 index 0000000..01a535e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString3.jsonnet @@ -0,0 +1 @@ +std.toString({}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString4.jsonnet new file mode 100644 index 0000000..81ec321 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString4.jsonnet @@ -0,0 +1 @@ +std.toString([]) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString5.jsonnet new file mode 100644 index 0000000..403f26f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString5.jsonnet @@ -0,0 +1 @@ +std.toString(error 'x') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString6.jsonnet new file mode 100644 index 0000000..86693cf --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString6.jsonnet @@ -0,0 +1 @@ +std.toString({ x: [{ y: [] }] }) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString8.jsonnet new file mode 100644 index 0000000..5dec3a1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString8.jsonnet @@ -0,0 +1 @@ +std.toString(a=42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_in_local.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_in_local.jsonnet new file mode 100644 index 0000000..cbb4fc1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_in_local.jsonnet @@ -0,0 +1,3 @@ +local x = std.length('x'); + +x diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_substr.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_substr.jsonnet new file mode 100644 index 0000000..47ff844 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_substr.jsonnet @@ -0,0 +1 @@ +std.substr('abcd', 1, 2) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace.jsonnet new file mode 100644 index 0000000..0a60023 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace.jsonnet @@ -0,0 +1,4 @@ +local n = 10000; +local text = std.join('', std.makeArray(n, function(x) 'ab')); + +std.strReplace(text, 'a', 'b') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace2.jsonnet new file mode 100644 index 0000000..975e37d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace2.jsonnet @@ -0,0 +1 @@ +std.strReplace('test test test', 'test', '__') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace3.jsonnet new file mode 100644 index 0000000..20fe5c3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace3.jsonnet @@ -0,0 +1 @@ +std.strReplace('test', '', 'blah') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string.jsonnet new file mode 100644 index 0000000..8c88a1e --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string.jsonnet @@ -0,0 +1 @@ +'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison1.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison1.jsonnet new file mode 100644 index 0000000..39a32e3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison1.jsonnet @@ -0,0 +1 @@ +'a' < 'b' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison2.jsonnet new file mode 100644 index 0000000..64cbf8c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison2.jsonnet @@ -0,0 +1 @@ +'a' > 'b' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison3.jsonnet new file mode 100644 index 0000000..354572f --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison3.jsonnet @@ -0,0 +1 @@ +'a' == 'b' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison4.jsonnet new file mode 100644 index 0000000..1422e47 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison4.jsonnet @@ -0,0 +1 @@ +'a' < 'aa' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison5.jsonnet new file mode 100644 index 0000000..d55be31 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison5.jsonnet @@ -0,0 +1 @@ +'aa' < 'a' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison6.jsonnet new file mode 100644 index 0000000..1fbfbf1 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison6.jsonnet @@ -0,0 +1 @@ +'ą' < 'ć' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison7.jsonnet new file mode 100644 index 0000000..dedc374 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison7.jsonnet @@ -0,0 +1 @@ +'ą' < 'z' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_divided_by_number.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_divided_by_number.jsonnet new file mode 100644 index 0000000..d6e6fb2 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_divided_by_number.jsonnet @@ -0,0 +1 @@ +'xxx' / 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index.jsonnet new file mode 100644 index 0000000..20d8b0b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index.jsonnet @@ -0,0 +1 @@ +'abcd'[0] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index2.jsonnet new file mode 100644 index 0000000..a8fd483 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index2.jsonnet @@ -0,0 +1 @@ +'abcd'[3] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_negative.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_negative.jsonnet new file mode 100644 index 0000000..f35590c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_negative.jsonnet @@ -0,0 +1 @@ +'abcd'[-1] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_out_of_bounds.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_out_of_bounds.jsonnet new file mode 100644 index 0000000..a7a0dca --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_out_of_bounds.jsonnet @@ -0,0 +1 @@ +'abcd'[4] diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_minus_number.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_minus_number.jsonnet new file mode 100644 index 0000000..b7b4ff5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_minus_number.jsonnet @@ -0,0 +1 @@ +'x' - 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_plus_function.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_plus_function.jsonnet new file mode 100644 index 0000000..4f3c42a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_plus_function.jsonnet @@ -0,0 +1 @@ +'xxx' + (function() 42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_times_number.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_times_number.jsonnet new file mode 100644 index 0000000..a08a2e6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_times_number.jsonnet @@ -0,0 +1 @@ +'x' * 42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_to_bool.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_to_bool.jsonnet new file mode 100644 index 0000000..4a97103 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_to_bool.jsonnet @@ -0,0 +1,3 @@ +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/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar.jsonnet new file mode 100644 index 0000000..1c1bd4c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar.jsonnet @@ -0,0 +1 @@ +{ x: { a: 1 } } { x+: { b: 2 } } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar2.jsonnet new file mode 100644 index 0000000..75a7be3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar2.jsonnet @@ -0,0 +1 @@ +{ x: +1 } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar3.jsonnet new file mode 100644 index 0000000..56c7884 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar3.jsonnet @@ -0,0 +1 @@ +{ assert self.x } { x+: true } diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar5.jsonnet new file mode 100644 index 0000000..44d9f78 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar5.jsonnet @@ -0,0 +1 @@ +({} { x+: function(x) x }).x(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar6.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar6.jsonnet new file mode 100644 index 0000000..d50ee1c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar6.jsonnet @@ -0,0 +1,5 @@ +{ + x: 'hello, ', +} { + x+: 'world', +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar7.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar7.jsonnet new file mode 100644 index 0000000..d5030ea --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar7.jsonnet @@ -0,0 +1,5 @@ +{ + x: [1, 2, 3], +} { + x+: [4, 5, 6], +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar8.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar8.jsonnet new file mode 100644 index 0000000..55d46df --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar8.jsonnet @@ -0,0 +1,5 @@ +{ + assert self.x, +} { + x+: false, +} diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict.jsonnet new file mode 100644 index 0000000..352c575 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict.jsonnet @@ -0,0 +1,3 @@ +local arr = [function(x) x] + std.makeArray(600, function(i) (function(x) arr[i](x + 1) tailstrict)); + +arr[600](42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict2.jsonnet new file mode 100644 index 0000000..b7eda2c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict2.jsonnet @@ -0,0 +1,3 @@ +local e(x) = (error x); + +(function(x) e(x))('xxx') tailstrict diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict3.jsonnet new file mode 100644 index 0000000..23906b8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict3.jsonnet @@ -0,0 +1,3 @@ +local foo(x, y=error 'xxx') = x; + +foo(42) tailstrict diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict4.jsonnet new file mode 100644 index 0000000..421fe3b --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict4.jsonnet @@ -0,0 +1,3 @@ +local foo(x, y=error 'xxx') = x; + +foo(42, y=5) tailstrict diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict5.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict5.jsonnet new file mode 100644 index 0000000..7b1b599 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict5.jsonnet @@ -0,0 +1,3 @@ +local sum(x, v) = if x <= 0 then v else sum(x - 1, x + v) tailstrict; + +sum(1000, 0) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/true.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/true.jsonnet new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/true.jsonnet @@ -0,0 +1 @@ +true diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_array.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_array.jsonnet new file mode 100644 index 0000000..25a8772 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_array.jsonnet @@ -0,0 +1 @@ +std.type([error 'x']) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_builtin_function.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_builtin_function.jsonnet new file mode 100644 index 0000000..bafe1a0 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_builtin_function.jsonnet @@ -0,0 +1 @@ +std.type(std.type) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_error.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_error.jsonnet new file mode 100644 index 0000000..cb2d0cc --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_error.jsonnet @@ -0,0 +1 @@ +std.type(error 'xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_function.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_function.jsonnet new file mode 100644 index 0000000..b3a4417 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_function.jsonnet @@ -0,0 +1 @@ +std.type(function() {}) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_number.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_number.jsonnet new file mode 100644 index 0000000..5e2a2a6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_number.jsonnet @@ -0,0 +1 @@ +std.type(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_object.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_object.jsonnet new file mode 100644 index 0000000..3d07e6c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_object.jsonnet @@ -0,0 +1 @@ +std.type({ x: error 'x' }) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_string.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_string.jsonnet new file mode 100644 index 0000000..609e90c --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_string.jsonnet @@ -0,0 +1 @@ +std.type('xxx') diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus.jsonnet new file mode 100644 index 0000000..6a0e60d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus.jsonnet @@ -0,0 +1 @@ +-42 diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus2.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus2.jsonnet new file mode 100644 index 0000000..ef0d12a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus2.jsonnet @@ -0,0 +1 @@ +-(-42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus3.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus3.jsonnet new file mode 100644 index 0000000..9181679 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus3.jsonnet @@ -0,0 +1 @@ +-(42) diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus4.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus4.jsonnet new file mode 100644 index 0000000..668f8fe --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus4.jsonnet @@ -0,0 +1 @@ +-'xxx' diff --git a/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/use_object.jsonnet b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/use_object.jsonnet new file mode 100644 index 0000000..cf34ae9 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/use_object.jsonnet @@ -0,0 +1 @@ +{ a: 1 }.a diff --git a/monitoring/vendor/ksonnet/ksonnet.alpha.1/core.libsonnet b/monitoring/vendor/ksonnet/ksonnet.alpha.1/core.libsonnet new file mode 100644 index 0000000..e0924f3 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.alpha.1/core.libsonnet @@ -0,0 +1,995 @@ +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/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/assert.libsonnet b/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/assert.libsonnet new file mode 100644 index 0000000..f865498 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/assert.libsonnet @@ -0,0 +1,25 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/base.libsonnet b/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/base.libsonnet new file mode 100644 index 0000000..3684dfa --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/base.libsonnet @@ -0,0 +1,15 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/meta.libsonnet b/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/meta.libsonnet new file mode 100644 index 0000000..dd98c44 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.alpha.1/internal/meta.libsonnet @@ -0,0 +1,11 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet.alpha.1/util.libsonnet b/monitoring/vendor/ksonnet/ksonnet.alpha.1/util.libsonnet new file mode 100644 index 0000000..3f449f5 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.alpha.1/util.libsonnet @@ -0,0 +1,103 @@ +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/monitoring/vendor/ksonnet/ksonnet.beta.1/apps.v1beta1.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.1/apps.v1beta1.libsonnet new file mode 100644 index 0000000..175414a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.1/apps.v1beta1.libsonnet @@ -0,0 +1,2398 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet.beta.1/core.v1.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.1/core.v1.libsonnet new file mode 100644 index 0000000..fb88d69 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.1/core.v1.libsonnet @@ -0,0 +1,4036 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet.beta.1/extensions.v1beta1.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.1/extensions.v1beta1.libsonnet new file mode 100644 index 0000000..cdaab98 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.1/extensions.v1beta1.libsonnet @@ -0,0 +1,3049 @@ +{ + 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/monitoring/vendor/ksonnet/ksonnet.beta.1/k.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.1/k.libsonnet new file mode 100644 index 0000000..06d74bd --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.1/k.libsonnet @@ -0,0 +1,72 @@ +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/monitoring/vendor/ksonnet/ksonnet.beta.1/util.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.1/util.libsonnet new file mode 100644 index 0000000..bb41e14 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.1/util.libsonnet @@ -0,0 +1,28 @@ +{ + // 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/monitoring/vendor/ksonnet/ksonnet.beta.2/k.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.2/k.libsonnet new file mode 100644 index 0000000..f1d40f8 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.2/k.libsonnet @@ -0,0 +1,80 @@ +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/monitoring/vendor/ksonnet/ksonnet.beta.2/k8s.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.2/k8s.libsonnet new file mode 100644 index 0000000..b36ee17 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.2/k8s.libsonnet @@ -0,0 +1,17127 @@ +// 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/monitoring/vendor/ksonnet/ksonnet.beta.3/k.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.3/k.libsonnet new file mode 100644 index 0000000..702cdf6 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.3/k.libsonnet @@ -0,0 +1,80 @@ +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/monitoring/vendor/ksonnet/ksonnet.beta.3/k8s.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.3/k8s.libsonnet new file mode 100644 index 0000000..9d6038d --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.3/k8s.libsonnet @@ -0,0 +1,25123 @@ +// 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/monitoring/vendor/ksonnet/ksonnet.beta.4/k.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.4/k.libsonnet new file mode 100644 index 0000000..c50661a --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.4/k.libsonnet @@ -0,0 +1,123 @@ +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/monitoring/vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet b/monitoring/vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet new file mode 100644 index 0000000..2400f87 --- /dev/null +++ b/monitoring/vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet @@ -0,0 +1,30584 @@ +{ + __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/monitoring/vendor/ksonnet/scripts/install_jsonnet.sh b/monitoring/vendor/ksonnet/scripts/install_jsonnet.sh new file mode 100644 index 0000000..703a114 --- /dev/null +++ b/monitoring/vendor/ksonnet/scripts/install_jsonnet.sh @@ -0,0 +1,12 @@ +#!/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/monitoring/vendor/ksonnet/tests/ctors-1.8.golden.json b/monitoring/vendor/ksonnet/tests/ctors-1.8.golden.json new file mode 100644 index 0000000..73d3fdf --- /dev/null +++ b/monitoring/vendor/ksonnet/tests/ctors-1.8.golden.json @@ -0,0 +1,646 @@ +{ + "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/monitoring/vendor/ksonnet/tests/ctors-1.8.jsonnet b/monitoring/vendor/ksonnet/tests/ctors-1.8.jsonnet new file mode 100644 index 0000000..3a43d62 --- /dev/null +++ b/monitoring/vendor/ksonnet/tests/ctors-1.8.jsonnet @@ -0,0 +1,175 @@ +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/monitoring/vendor/kube-prometheus/.gitignore b/monitoring/vendor/kube-prometheus/.gitignore new file mode 100644 index 0000000..52a75ec --- /dev/null +++ b/monitoring/vendor/kube-prometheus/.gitignore @@ -0,0 +1,2 @@ +jsonnetfile.lock.json +vendor/ diff --git a/monitoring/vendor/kube-prometheus/alertmanager/alertmanager.libsonnet b/monitoring/vendor/kube-prometheus/alertmanager/alertmanager.libsonnet new file mode 100644 index 0000000..bdbe57a --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alertmanager/alertmanager.libsonnet @@ -0,0 +1,155 @@ +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + _config+:: { + namespace: 'default', + + versions+:: { + alertmanager: 'v0.20.0', + }, + + imageRepos+:: { + alertmanager: 'quay.io/prometheus/alertmanager', + }, + + alertmanager+:: { + name: 'main', + config: { + global: { + resolve_timeout: '5m', + }, + inhibit_rules: [{ + source_match: { + severity: 'critical', + }, + target_match_re: { + severity: 'warning|info', + }, + equal: ['alertname'], + }, { + source_match: { + severity: 'warning', + }, + target_match_re: { + severity: 'info', + }, + equal: ['alertname'], + }], + route: { + group_by: ['namespace'], + group_wait: '30s', + group_interval: '5m', + repeat_interval: '12h', + receiver: 'Default', + routes: [ + { + receiver: 'Watchdog', + match: { + alertname: 'Watchdog', + }, + }, + { + receiver: 'Critical', + match: { + severity: 'critical', + }, + }, + ], + }, + receivers: [ + { + name: 'Default', + }, + { + name: 'Watchdog', + }, + { + name: 'Critical', + }, + ], + }, + replicas: 3, + }, + }, + + alertmanager+:: { + secret: + local secret = k.core.v1.secret; + + if std.type($._config.alertmanager.config) == 'object' then + secret.new('alertmanager-' + $._config.alertmanager.name, {}) + .withStringData({ 'alertmanager.yaml': 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/monitoring/vendor/kube-prometheus/alerts/alertmanager.libsonnet b/monitoring/vendor/kube-prometheus/alerts/alertmanager.libsonnet new file mode 100644 index 0000000..bda69d0 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alerts/alertmanager.libsonnet @@ -0,0 +1,52 @@ +{ + 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/monitoring/vendor/kube-prometheus/alerts/alerts.libsonnet b/monitoring/vendor/kube-prometheus/alerts/alerts.libsonnet new file mode 100644 index 0000000..3521aa8 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alerts/alerts.libsonnet @@ -0,0 +1,4 @@ +(import 'alertmanager.libsonnet') + +(import 'general.libsonnet') + +(import 'node.libsonnet') + +(import 'prometheus-operator.libsonnet') diff --git a/monitoring/vendor/kube-prometheus/alerts/general.libsonnet b/monitoring/vendor/kube-prometheus/alerts/general.libsonnet new file mode 100644 index 0000000..16f3e39 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alerts/general.libsonnet @@ -0,0 +1,38 @@ +{ + prometheusAlerts+:: { + groups+: [ + { + name: 'general.rules', + rules: [ + { + alert: 'TargetDown', + annotations: { + message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service }} targets in {{ $labels.namespace }} namespace 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/monitoring/vendor/kube-prometheus/alerts/node.libsonnet b/monitoring/vendor/kube-prometheus/alerts/node.libsonnet new file mode 100644 index 0000000..2346ecf --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alerts/node.libsonnet @@ -0,0 +1,42 @@ +{ + 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/monitoring/vendor/kube-prometheus/alerts/prometheus-operator.libsonnet b/monitoring/vendor/kube-prometheus/alerts/prometheus-operator.libsonnet new file mode 100644 index 0000000..a430c50 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alerts/prometheus-operator.libsonnet @@ -0,0 +1,37 @@ +{ + 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/monitoring/vendor/kube-prometheus/alerts/tests.yaml b/monitoring/vendor/kube-prometheus/alerts/tests.yaml new file mode 100644 index 0000000..532bb89 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/alerts/tests.yaml @@ -0,0 +1,157 @@ +# 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/monitoring/vendor/kube-prometheus/dropping-deprecated-metrics-relabelings.libsonnet b/monitoring/vendor/kube-prometheus/dropping-deprecated-metrics-relabelings.libsonnet new file mode 100644 index 0000000..d83368c --- /dev/null +++ b/monitoring/vendor/kube-prometheus/dropping-deprecated-metrics-relabelings.libsonnet @@ -0,0 +1,50 @@ +[ + // Drop all kubelet metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'kubelet_(pod_worker_latency_microseconds|pod_start_latency_microseconds|cgroup_manager_latency_microseconds|pod_worker_start_latency_microseconds|pleg_relist_latency_microseconds|pleg_relist_interval_microseconds|runtime_operations|runtime_operations_latency_microseconds|runtime_operations_errors|eviction_stats_age_microseconds|device_plugin_registration_count|device_plugin_alloc_latency_microseconds|network_plugin_operations_latency_microseconds)', + action: 'drop', + }, + // Drop all scheduler metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'scheduler_(e2e_scheduling_latency_microseconds|scheduling_algorithm_predicate_evaluation|scheduling_algorithm_priority_evaluation|scheduling_algorithm_preemption_evaluation|scheduling_algorithm_latency_microseconds|binding_latency_microseconds|scheduling_latency_seconds)', + action: 'drop', + }, + // Drop all apiserver metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'apiserver_(request_count|request_latencies|request_latencies_summary|dropped_requests|storage_data_key_generation_latencies_microseconds|storage_transformation_failures_total|storage_transformation_latencies_microseconds|proxy_tunnel_sync_latency_secs)', + action: 'drop', + }, + // Drop all docker metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'kubelet_docker_(operations|operations_latency_microseconds|operations_errors|operations_timeout)', + action: 'drop', + }, + // Drop all reflector metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'reflector_(items_per_list|items_per_watch|list_duration_seconds|lists_total|short_watches_total|watch_duration_seconds|watches_total)', + action: 'drop', + }, + // Drop all etcd metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'etcd_(helper_cache_hit_count|helper_cache_miss_count|helper_cache_entry_count|request_cache_get_latencies_summary|request_cache_add_latencies_summary|request_latencies_summary)', + action: 'drop', + }, + // Drop all transformation metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: 'transformation_(transformation_latencies_microseconds|failures_total)', + action: 'drop', + }, + // Drop all other metrics which are deprecated in kubernetes. + { + sourceLabels: ['__name__'], + regex: '(admission_quota_controller_adds|crd_autoregistration_controller_work_duration|APIServiceOpenAPIAggregationControllerQueue1_adds|AvailableConditionController_retries|crd_openapi_controller_unfinished_work_seconds|APIServiceRegistrationController_retries|admission_quota_controller_longest_running_processor_microseconds|crdEstablishing_longest_running_processor_microseconds|crdEstablishing_unfinished_work_seconds|crd_openapi_controller_adds|crd_autoregistration_controller_retries|crd_finalizer_queue_latency|AvailableConditionController_work_duration|non_structural_schema_condition_controller_depth|crd_autoregistration_controller_unfinished_work_seconds|AvailableConditionController_adds|DiscoveryController_longest_running_processor_microseconds|autoregister_queue_latency|crd_autoregistration_controller_adds|non_structural_schema_condition_controller_work_duration|APIServiceRegistrationController_adds|crd_finalizer_work_duration|crd_naming_condition_controller_unfinished_work_seconds|crd_openapi_controller_longest_running_processor_microseconds|DiscoveryController_adds|crd_autoregistration_controller_longest_running_processor_microseconds|autoregister_unfinished_work_seconds|crd_naming_condition_controller_queue_latency|crd_naming_condition_controller_retries|non_structural_schema_condition_controller_queue_latency|crd_naming_condition_controller_depth|AvailableConditionController_longest_running_processor_microseconds|crdEstablishing_depth|crd_finalizer_longest_running_processor_microseconds|crd_naming_condition_controller_adds|APIServiceOpenAPIAggregationControllerQueue1_longest_running_processor_microseconds|DiscoveryController_queue_latency|DiscoveryController_unfinished_work_seconds|crd_openapi_controller_depth|APIServiceOpenAPIAggregationControllerQueue1_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_unfinished_work_seconds|DiscoveryController_work_duration|autoregister_adds|crd_autoregistration_controller_queue_latency|crd_finalizer_retries|AvailableConditionController_unfinished_work_seconds|autoregister_longest_running_processor_microseconds|non_structural_schema_condition_controller_unfinished_work_seconds|APIServiceOpenAPIAggregationControllerQueue1_depth|AvailableConditionController_depth|DiscoveryController_retries|admission_quota_controller_depth|crdEstablishing_adds|APIServiceOpenAPIAggregationControllerQueue1_retries|crdEstablishing_queue_latency|non_structural_schema_condition_controller_longest_running_processor_microseconds|autoregister_work_duration|crd_openapi_controller_retries|APIServiceRegistrationController_work_duration|crdEstablishing_work_duration|crd_finalizer_adds|crd_finalizer_depth|crd_openapi_controller_queue_latency|APIServiceOpenAPIAggregationControllerQueue1_work_duration|APIServiceRegistrationController_queue_latency|crd_autoregistration_controller_depth|AvailableConditionController_queue_latency|admission_quota_controller_queue_latency|crd_naming_condition_controller_work_duration|crd_openapi_controller_work_duration|DiscoveryController_depth|crd_naming_condition_controller_longest_running_processor_microseconds|APIServiceRegistrationController_depth|APIServiceRegistrationController_longest_running_processor_microseconds|crd_finalizer_unfinished_work_seconds|crdEstablishing_retries|admission_quota_controller_unfinished_work_seconds|non_structural_schema_condition_controller_adds|APIServiceRegistrationController_unfinished_work_seconds|admission_quota_controller_work_duration|autoregister_depth|autoregister_retries|kubeproxy_sync_proxy_rules_latency_microseconds|rest_client_request_latency_seconds|non_structural_schema_condition_controller_retries)', + action: 'drop', + }, +] diff --git a/monitoring/vendor/kube-prometheus/jsonnetfile.json b/monitoring/vendor/kube-prometheus/jsonnetfile.json new file mode 100644 index 0000000..22beb7f --- /dev/null +++ b/monitoring/vendor/kube-prometheus/jsonnetfile.json @@ -0,0 +1,94 @@ +{ + "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.36" + }, + { + "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" + }, + { + "name": "kube-state-metrics", + "source": { + "git": { + "remote": "https://github.com/kubernetes/kube-state-metrics", + "subdir": "jsonnet/kube-state-metrics" + } + }, + "version": "master" + }, + { + "name": "kube-state-metrics-mixin", + "source": { + "git": { + "remote": "https://github.com/kubernetes/kube-state-metrics", + "subdir": "jsonnet/kube-state-metrics-mixin" + } + }, + "version": "master" + } + ] +} diff --git a/monitoring/vendor/kube-prometheus/ksm-autoscaler/ksm-autoscaler.libsonnet b/monitoring/vendor/kube-prometheus/ksm-autoscaler/ksm-autoscaler.libsonnet new file mode 100644 index 0000000..56406ef --- /dev/null +++ b/monitoring/vendor/kube-prometheus/ksm-autoscaler/ksm-autoscaler.libsonnet @@ -0,0 +1,118 @@ +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + _config+:: { + versions+:: { + clusterVerticalAutoscaler: "v0.8.1" + }, + + imageRepos+:: { + clusterVerticalAutoscaler: 'gcr.io/google_containers/cpvpa-amd64' + }, + + kubeStateMetrics+:: { + stepCPU: '1m', + stepMemory: '2Mi', + }, + }, + ksmAutoscaler+:: { + clusterRole: + local clusterRole = k.rbac.v1.clusterRole; + local rulesType = clusterRole.rulesType; + + local rules = [ + rulesType.new() + + rulesType.withApiGroups(['']) + + rulesType.withResources([ + 'nodes', + ]) + + rulesType.withVerbs(['list', 'watch']), + ]; + + clusterRole.new() + + clusterRole.mixin.metadata.withName('ksm-autoscaler') + + clusterRole.withRules(rules), + + clusterRoleBinding: + local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; + + clusterRoleBinding.new() + + clusterRoleBinding.mixin.metadata.withName('ksm-autoscaler') + + clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + clusterRoleBinding.mixin.roleRef.withName('ksm-autoscaler') + + clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + + clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'ksm-autoscaler', namespace: $._config.namespace }]), + + roleBinding: + local roleBinding = k.rbac.v1.roleBinding; + + roleBinding.new() + + roleBinding.mixin.metadata.withName('ksm-autoscaler') + + roleBinding.mixin.metadata.withNamespace($._config.namespace) + + roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + roleBinding.mixin.roleRef.withName('ksm-autoscaler') + + roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + + roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'ksm-autoscaler' }]), + + role: + local role = k.rbac.v1.role; + local rulesType = role.rulesType; + + local extensionsRule = rulesType.new() + + rulesType.withApiGroups(['extensions']) + + rulesType.withResources([ + 'deployments', + ]) + + rulesType.withVerbs(['patch']) + + rulesType.withResourceNames(['kube-state-metrics']); + + local appsRule = rulesType.new() + + rulesType.withApiGroups(['apps']) + + rulesType.withResources([ + 'deployments', + ]) + + rulesType.withVerbs(['patch']) + + rulesType.withResourceNames(['kube-state-metrics']); + + local rules = [extensionsRule, appsRule]; + + role.new() + + role.mixin.metadata.withName('ksm-autoscaler') + + role.mixin.metadata.withNamespace($._config.namespace) + + role.withRules(rules), + + serviceAccount: + local serviceAccount = k.core.v1.serviceAccount; + + serviceAccount.new('ksm-autoscaler') + + serviceAccount.mixin.metadata.withNamespace($._config.namespace), + deployment: + local deployment = k.apps.v1.deployment; + local container = deployment.mixin.spec.template.spec.containersType; + local podSelector = deployment.mixin.spec.template.spec.selectorType; + local podLabels = { app: 'ksm-autoscaler' }; + + local kubeStateMetricsAutoscaler = + container.new('ksm-autoscaler', $._config.imageRepos.clusterVerticalAutoscaler + ':' + $._config.versions.clusterVerticalAutoscaler) + + container.withArgs([ + '/cpvpa', + '--target=deployment/kube-state-metrics', + '--namespace=' + $._config.namespace, + '--logtostderr=true', + '--poll-period-seconds=10', + '--default-config={"kube-state-metrics":{"requests":{"cpu":{"base":"' + $._config.kubeStateMetrics.baseCPU + '","step":"' + $._config.kubeStateMetrics.stepCPU + '","nodesPerStep":1},"memory":{"base":"' + $._config.kubeStateMetrics.baseMemory + '","step":"' + $._config.kubeStateMetrics.stepMemory + '","nodesPerStep":1}},"limits":{"cpu":{"base":"' + $._config.kubeStateMetrics.baseCPU + '","step":"' + $._config.kubeStateMetrics.stepCPU + '","nodesPerStep":1},"memory":{"base":"' + $._config.kubeStateMetrics.baseMemory + '","step":"' + $._config.kubeStateMetrics.stepMemory + '","nodesPerStep":1}}}}' + ]) + + container.mixin.resources.withRequests({cpu: '20m', memory: '10Mi'}); + + local c = [kubeStateMetricsAutoscaler]; + + deployment.new('ksm-autoscaler', 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('ksm-autoscaler'), + }, +} diff --git a/monitoring/vendor/kube-prometheus/kube-prometheus-all-namespaces.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-all-namespaces.libsonnet new file mode 100644 index 0000000..468420f --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-all-namespaces.libsonnet @@ -0,0 +1,20 @@ +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + prometheus+:: { + clusterRole+: { + rules+: + local role = k.rbac.v1.role; + local policyRule = role.rulesType; + local rule = policyRule.new() + + policyRule.withApiGroups(['']) + + policyRule.withResources([ + 'services', + 'endpoints', + 'pods', + ]) + + policyRule.withVerbs(['get', 'list', 'watch']); + [rule] + }, + } +} \ No newline at end of file diff --git a/monitoring/vendor/kube-prometheus/kube-prometheus-anti-affinity.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-anti-affinity.libsonnet new file mode 100644 index 0000000..51b3c19 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-anti-affinity.libsonnet @@ -0,0 +1,41 @@ +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, namespace) = { + affinity: { + podAntiAffinity: { + preferredDuringSchedulingIgnoredDuringExecution: [ + affinity.new() + + affinity.withWeight(100) + + affinity.mixin.podAffinityTerm.withNamespaces(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], $._config.namespace), + }, + }, + + prometheus+: { + local p = self, + + prometheus+: { + spec+: + antiaffinity('prometheus', [p.name], p.namespace), + }, + }, +} diff --git a/monitoring/vendor/kube-prometheus/kube-prometheus-bootkube.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-bootkube.libsonnet new file mode 100644 index 0000000..3e2094a --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-bootkube.libsonnet @@ -0,0 +1,23 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-config-mixins.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-config-mixins.libsonnet new file mode 100644 index 0000000..ad27840 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-config-mixins.libsonnet @@ -0,0 +1,20 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-eks.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-eks.libsonnet new file mode 100644 index 0000000..d04a3ee --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-eks.libsonnet @@ -0,0 +1,76 @@ +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+: { + serviceMonitorCoreDNS+: { + spec+: { + endpoints: [ + { + bearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token", + interval: "15s", + targetPort: 9153 + } + ] + }, + }, + AwsEksCniMetricService: + service.new('aws-node', { 'k8s-app' : 'aws-node' } , servicePort.newNamed('cni-metrics-port', 61678, 61678)) + + service.mixin.metadata.withNamespace('kube-system') + + service.mixin.metadata.withLabels({ 'k8s-app': 'aws-node' }) + + service.mixin.spec.withClusterIp('None'), + serviceMonitorAwsEksCNI: + { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'ServiceMonitor', + metadata: { + name: 'awsekscni', + namespace: $._config.namespace, + labels: { + 'k8s-app': 'eks-cni', + }, + }, + spec: { + jobLabel: 'k8s-app', + selector: { + matchLabels: { + 'k8s-app': 'aws-node', + }, + }, + namespaceSelector: { + matchNames: [ + 'kube-system', + ], + }, + endpoints: [ + { + port: 'cni-metrics-port', + interval: '30s', + path: '/metrics', + }, + ], + }, + }, + }, + prometheusRules+: { + groups+: [ + { + name: 'kube-prometheus-eks.rules', + rules: [ + { + expr: 'sum by(instance) (awscni_total_ip_addresses) - sum by(instance) (awscni_assigned_ip_addresses) < 10', + labels: { + severity: 'critical', + }, + annotations: { + message: 'Instance {{ $labels.instance }} has less than 10 IPs available.' + }, + 'for': '10m', + alert: 'EksAvailableIPs' + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet new file mode 100644 index 0000000..ab5dcea --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet @@ -0,0 +1,46 @@ +{ + prometheus+:: { + serviceMonitorKubelet+: + { + spec+: { + endpoints: [ + { + port: 'http-metrics', + scheme: 'http', + interval: '30s', + bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', + relabelings: [ + { + sourceLabels: ['__metrics_path__'], + targetLabel: 'metrics_path' + }, + ], + }, + { + port: 'http-metrics', + scheme: 'http', + path: '/metrics/cadvisor', + interval: '30s', + honorLabels: true, + bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', + relabelings: [ + { + sourceLabels: ['__metrics_path__'], + targetLabel: 'metrics_path' + }, + ], + 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', + }, + ], + }, + ], + }, + }, + }, +} diff --git a/monitoring/vendor/kube-prometheus/kube-prometheus-kops-coredns.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-kops-coredns.libsonnet new file mode 100644 index 0000000..8a309d2 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-kops-coredns.libsonnet @@ -0,0 +1,13 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-kops.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-kops.libsonnet new file mode 100644 index 0000000..01b6e2e --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-kops.libsonnet @@ -0,0 +1,23 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-ksonnet.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-ksonnet.libsonnet new file mode 100644 index 0000000..664e191 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-ksonnet.libsonnet @@ -0,0 +1,8 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-kube-aws.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-kube-aws.libsonnet new file mode 100644 index 0000000..23b33c9 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-kube-aws.libsonnet @@ -0,0 +1,18 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-kubeadm.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-kubeadm.libsonnet new file mode 100644 index 0000000..9e497cd --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-kubeadm.libsonnet @@ -0,0 +1,18 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-kubespray.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-kubespray.libsonnet new file mode 100644 index 0000000..6ef1a34 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-kubespray.libsonnet @@ -0,0 +1,40 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-managed-cluster.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-managed-cluster.libsonnet new file mode 100644 index 0000000..9b4e1a8 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-managed-cluster.libsonnet @@ -0,0 +1,35 @@ +// On managed Kubernetes clusters some of the control plane components are not exposed to customers. +// Disable scrape jobs, service monitors, and alert groups for these components by overwriting 'kube-prometheus.libsonnet' defaults + +{ + _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']) + }, + + // Skip alerting rules too + prometheus+:: { + rules+:: { + local g = super.groups, + groups: [ + h + for h in g + if !std.setMember(h.name, ['kubernetes-system-controller-manager', 'kubernetes-system-scheduler']) + ], + }, + }, + }, + + // 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']) + }, +} diff --git a/monitoring/vendor/kube-prometheus/kube-prometheus-node-ports.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-node-ports.libsonnet new file mode 100644 index 0000000..b10a1bb --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-node-ports.libsonnet @@ -0,0 +1,21 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-static-etcd.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-static-etcd.libsonnet new file mode 100644 index 0000000..63094f1 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-static-etcd.libsonnet @@ -0,0 +1,99 @@ +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/monitoring/vendor/kube-prometheus/kube-prometheus-strip-limits.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-strip-limits.libsonnet new file mode 100644 index 0000000..710489d --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-strip-limits.libsonnet @@ -0,0 +1,35 @@ +// Strips spec.containers[].limits for certain containers +// https://github.com/coreos/kube-prometheus/issues/72 +{ + _config+:: { + resources+:: { + 'addon-resizer'+: { + limits: {}, + }, + 'kube-rbac-proxy'+: { + limits: {}, + }, + 'kube-state-metrics'+: { + 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/monitoring/vendor/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet new file mode 100644 index 0000000..07e9948 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet @@ -0,0 +1,39 @@ +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.10.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/monitoring/vendor/kube-prometheus/kube-prometheus.libsonnet b/monitoring/vendor/kube-prometheus/kube-prometheus.libsonnet new file mode 100644 index 0000000..513bba9 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-prometheus.libsonnet @@ -0,0 +1,171 @@ +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 'kube-state-metrics-mixin/mixin.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), + }, + prometheusOperator+:: + { + '0alertmanagerCustomResourceDefinition'+: { + spec: std.mergePatch(super.spec, { + preserveUnknownFields: null, + }), + }, + '0prometheusCustomResourceDefinition'+: { + spec: std.mergePatch(super.spec, { + preserveUnknownFields: null, + }), + }, + '0servicemonitorCustomResourceDefinition'+: { + spec: std.mergePatch(super.spec, { + preserveUnknownFields: null, + }), + }, + '0podmonitorCustomResourceDefinition'+: { + spec: std.mergePatch(super.spec, { + preserveUnknownFields: null, + }), + }, + '0prometheusruleCustomResourceDefinition'+: { + spec: std.mergePatch(super.spec, { + preserveUnknownFields: null, + }), + }, + '0thanosrulerCustomResourceDefinition'+: { + spec: std.mergePatch(super.spec, { + preserveUnknownFields: null, + }), + }, + }, + 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.6.0', + }, + + 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", metrics_path="/metrics/cadvisor"', + kubeletSelector: 'job="kubelet", metrics_path="/metrics"', + 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' }, + }, + 'kube-state-metrics': { + requests: { cpu: '100m', memory: '150Mi' }, + limits: { cpu: '100m', memory: '150Mi' }, + }, + 'node-exporter': { + requests: { cpu: '102m', memory: '180Mi' }, + limits: { cpu: '250m', memory: '180Mi' }, + }, + }, + prometheus+:: { + rules: $.prometheusRules + $.prometheusAlerts, + }, + + grafana+:: { + dashboards: $.grafanaDashboards, + }, + + }, +} diff --git a/monitoring/vendor/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet b/monitoring/vendor/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet new file mode 100644 index 0000000..3cde3aa --- /dev/null +++ b/monitoring/vendor/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet @@ -0,0 +1,43 @@ +{ + kubeStateMetrics+:: (import 'kube-state-metrics/kube-state-metrics.libsonnet') + + { + local ksm = self, + name:: 'kube-state-metrics', + namespace:: 'monitoring', + version:: '1.9.4', //$._config.versions.kubeStateMetrics, + image:: 'quay.io/coreos/kube-state-metrics:v' + ksm.version, + serviceMonitor: { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'ServiceMonitor', + metadata: { + name: ksm.name, + namespace: ksm.namespace, + labels: ksm.commonLabels, + }, + spec: { + jobLabel: 'app.kubernetes.io/name', + selector: { + matchLabels: ksm.commonLabels, + }, + endpoints: [ + { + port: 'http-metrics', + interval: '30s', + scrapeTimeout: '30s', + honorLabels: true, + relabelings: [ + { + regex: '(pod|service|endpoint|namespace)', + action: 'labeldrop', + }, + ], + }, + { + port: 'telemetry', + interval: '30s', + }, + ], + }, + }, + }, +} diff --git a/monitoring/vendor/kube-prometheus/lib/image.libsonnet b/monitoring/vendor/kube-prometheus/lib/image.libsonnet new file mode 100644 index 0000000..0561e33 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/lib/image.libsonnet @@ -0,0 +1,21 @@ +// 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/monitoring/vendor/kube-prometheus/lib/lib.libsonnet b/monitoring/vendor/kube-prometheus/lib/lib.libsonnet new file mode 100644 index 0000000..c30f976 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/lib/lib.libsonnet @@ -0,0 +1 @@ +(import 'image.libsonnet') diff --git a/monitoring/vendor/kube-prometheus/node-exporter/node-exporter.libsonnet b/monitoring/vendor/kube-prometheus/node-exporter/node-exporter.libsonnet new file mode 100644 index 0000000..1f108e0 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/node-exporter/node-exporter.libsonnet @@ -0,0 +1,202 @@ +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', + '--no-collector.wifi', + '--no-collector.hwmon', + // 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($._config.resources['kube-rbac-proxy'].requests) + + container.mixin.resources.withLimits($._config.resources['kube-rbac-proxy'].limits) + + 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: '15s', + bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', + relabelings: [ + { + action: 'replace', + regex: '(.*)', + replacement: '$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/monitoring/vendor/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet b/monitoring/vendor/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet new file mode 100644 index 0000000..e1bc8dc --- /dev/null +++ b/monitoring/vendor/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet @@ -0,0 +1,221 @@ +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + _config+:: { + namespace: 'default', + + versions+:: { + prometheusAdapter: 'v0.5.0', + }, + + 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!="POD",container!="",pod!=""}[5m])) by (<<.GroupBy>>) + nodeQuery: sum(1 - rate(node_cpu_seconds_total{mode="idle"}[5m]) * on(namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>}) by (<<.GroupBy>>) + resources: + overrides: + node: + resource: node + namespace: + resource: namespace + pod: + resource: pod + containerLabel: container + memory: + containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,container!="POD",container!="",pod!=""}) 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: + resource: pod + containerLabel: container + window: 5m + |||, + }, + }, + + 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', 'nodes']) + + 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/monitoring/vendor/kube-prometheus/prometheus/prometheus.libsonnet b/monitoring/vendor/kube-prometheus/prometheus/prometheus.libsonnet new file mode 100644 index 0000000..2ea5f80 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/prometheus/prometheus.libsonnet @@ -0,0 +1,466 @@ +local k3 = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + _config+:: { + namespace: 'default', + + versions+:: { + prometheus: 'v2.15.2', + }, + + imageRepos+:: { + prometheus: 'quay.io/prometheus/prometheus', + }, + + alertmanager+:: { + name: 'main', + }, + + prometheus+:: { + name: 'k8s', + replicas: 2, + rules: {}, + namespaces: ['default', 'kube-system', $._config.namespace], + }, + }, + + prometheus+:: { + local p = self, + + name:: $._config.prometheus.name, + namespace:: $._config.namespace, + roleBindingNamespaces:: $._config.prometheus.namespaces, + replicas:: $._config.prometheus.replicas, + prometheusRules:: $._config.prometheus.rules, + alertmanagerName:: $.alertmanager.service.metadata.name, + + serviceAccount: + local serviceAccount = k.core.v1.serviceAccount; + + serviceAccount.new('prometheus-' + p.name) + + serviceAccount.mixin.metadata.withNamespace(p.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-' + p.name, { app: 'prometheus', prometheus: p.name }, prometheusPort) + + service.mixin.spec.withSessionAffinity('ClientIP') + + service.mixin.metadata.withNamespace(p.namespace) + + service.mixin.metadata.withLabels({ prometheus: p.name }), + + rules: + { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'PrometheusRule', + metadata: { + labels: { + prometheus: p.name, + role: 'alert-rules', + }, + name: 'prometheus-' + p.name + '-rules', + namespace: p.namespace, + }, + spec: { + groups: p.prometheusRules.groups, + }, + }, + + roleBindingSpecificNamespaces: + local roleBinding = k.rbac.v1.roleBinding; + + local newSpecificRoleBinding(namespace) = + roleBinding.new() + + roleBinding.mixin.metadata.withName('prometheus-' + p.name) + + roleBinding.mixin.metadata.withNamespace(namespace) + + roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + roleBinding.mixin.roleRef.withName('prometheus-' + p.name) + + roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + + roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + p.name, namespace: p.namespace }]); + + local roleBindingList = k3.rbac.v1.roleBindingList; + roleBindingList.new([newSpecificRoleBinding(x) for x in p.roleBindingNamespaces]), + 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-' + p.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-' + p.name + '-config') + + role.mixin.metadata.withNamespace(p.namespace) + + role.withRules(configmapRule), + roleBindingConfig: + local roleBinding = k.rbac.v1.roleBinding; + + roleBinding.new() + + roleBinding.mixin.metadata.withName('prometheus-' + p.name + '-config') + + roleBinding.mixin.metadata.withNamespace(p.namespace) + + roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + roleBinding.mixin.roleRef.withName('prometheus-' + p.name + '-config') + + roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + + roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + p.name, namespace: p.namespace }]), + clusterRoleBinding: + local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; + + clusterRoleBinding.new() + + clusterRoleBinding.mixin.metadata.withName('prometheus-' + p.name) + + clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + clusterRoleBinding.mixin.roleRef.withName('prometheus-' + p.name) + + clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + + clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + p.name, namespace: p.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-' + p.name) + + role.mixin.metadata.withNamespace(namespace) + + role.withRules(coreRule); + + local roleList = k3.rbac.v1.roleList; + roleList.new([newSpecificRole(x) for x in p.roleBindingNamespaces]), + 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: p.name, + namespace: p.namespace, + labels: { + prometheus: p.name, + }, + }, + spec: { + replicas: p.replicas, + version: $._config.versions.prometheus, + baseImage: $._config.imageRepos.prometheus, + serviceAccountName: 'prometheus-' + p.name, + serviceMonitorSelector: {}, + podMonitorSelector: {}, + serviceMonitorNamespaceSelector: {}, + podMonitorNamespaceSelector: {}, + nodeSelector: { 'kubernetes.io/os': 'linux' }, + ruleSelector: selector.withMatchLabels({ + role: 'alert-rules', + prometheus: p.name, + }), + resources: resources, + alerting: { + alertmanagers: [ + { + namespace: p.namespace, + name: p.alertmanagerName, + port: 'web', + }, + ], + }, + securityContext: { + runAsUser: 1000, + runAsNonRoot: true, + fsGroup: 2000, + }, + }, + }, + serviceMonitor: + { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'ServiceMonitor', + metadata: { + name: 'prometheus', + namespace: p.namespace, + labels: { + 'k8s-app': 'prometheus', + }, + }, + spec: { + selector: { + matchLabels: { + prometheus: p.name, + }, + }, + endpoints: [ + { + port: 'web', + interval: '30s', + }, + ], + }, + }, + serviceMonitorKubeScheduler: + { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'ServiceMonitor', + metadata: { + name: 'kube-scheduler', + namespace: p.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: p.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', + metricRelabelings: (import 'kube-prometheus/dropping-deprecated-metrics-relabelings.libsonnet'), + relabelings: [ + { + sourceLabels: ['__metrics_path__'], + targetLabel: 'metrics_path', + }, + ], + }, + { + port: 'https-metrics', + scheme: 'https', + path: '/metrics/cadvisor', + interval: '30s', + honorLabels: true, + tlsConfig: { + insecureSkipVerify: true, + }, + bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', + relabelings: [ + { + sourceLabels: ['__metrics_path__'], + targetLabel: 'metrics_path', + }, + ], + 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: p.namespace, + labels: { + 'k8s-app': 'kube-controller-manager', + }, + }, + spec: { + jobLabel: 'k8s-app', + endpoints: [ + { + port: 'http-metrics', + interval: '30s', + metricRelabelings: (import 'kube-prometheus/dropping-deprecated-metrics-relabelings.libsonnet') + [ + { + 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: p.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: (import 'kube-prometheus/dropping-deprecated-metrics-relabelings.libsonnet') + [ + { + 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', + }, + { + sourceLabels: ['__name__', 'le'], + regex: 'apiserver_request_duration_seconds_bucket;(0.15|0.25|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2.5|3|3.5|4.5|6|7|8|9|15|25|30|50)', + action: 'drop', + }, + ], + }, + ], + }, + }, + serviceMonitorCoreDNS: + { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'ServiceMonitor', + metadata: { + name: 'coredns', + namespace: p.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/monitoring/vendor/kube-prometheus/rules/general.libsonnet b/monitoring/vendor/kube-prometheus/rules/general.libsonnet new file mode 100644 index 0000000..231d5cb --- /dev/null +++ b/monitoring/vendor/kube-prometheus/rules/general.libsonnet @@ -0,0 +1,19 @@ +{ + prometheusRules+:: { + groups+: [ + { + name: 'kube-prometheus-general.rules', + rules: [ + { + expr: 'count without(instance, pod, node) (up == 1)', + record: 'count:up1', + }, + { + expr: 'count without(instance, pod, node) (up == 0)', + record: 'count:up0', + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kube-prometheus/rules/node-rules.libsonnet b/monitoring/vendor/kube-prometheus/rules/node-rules.libsonnet new file mode 100644 index 0000000..e3396b0 --- /dev/null +++ b/monitoring/vendor/kube-prometheus/rules/node-rules.libsonnet @@ -0,0 +1,39 @@ +{ + 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/monitoring/vendor/kube-prometheus/rules/rules.libsonnet b/monitoring/vendor/kube-prometheus/rules/rules.libsonnet new file mode 100644 index 0000000..79a5c0a --- /dev/null +++ b/monitoring/vendor/kube-prometheus/rules/rules.libsonnet @@ -0,0 +1,2 @@ +(import 'node-rules.libsonnet') + +(import 'general.libsonnet') diff --git a/monitoring/vendor/kube-state-metrics-mixin/alerts.libsonnet b/monitoring/vendor/kube-state-metrics-mixin/alerts.libsonnet new file mode 100644 index 0000000..0d30a99 --- /dev/null +++ b/monitoring/vendor/kube-state-metrics-mixin/alerts.libsonnet @@ -0,0 +1,46 @@ +{ + _config+:: { + kubeStateMetricsSelector: error 'must provide selector for kube-state-metrics', + }, + prometheusAlerts+:: { + groups+: [ + { + name: 'kube-state-metrics', + rules: [ + { + alert: 'KubeStateMetricsListErrors', + expr: ||| + (sum(rate(kube_state_metrics_list_total{%(kubeStateMetricsSelector)s,result="error"}[5m])) + / + sum(rate(kube_state_metrics_list_total{%(kubeStateMetricsSelector)s}[5m]))) + > 0.01 + ||| % $._config, + 'for': '15m', + labels: { + severity: 'critical', + }, + annotations: { + message: 'kube-state-metrics is experiencing errors at an elevated rate in list operations. This is likely causing it to not be able to expose metrics about Kubernetes objects correctly or at all.', + }, + }, + { + alert: 'KubeStateMetricsWatchErrors', + expr: ||| + (sum(rate(kube_state_metrics_watch_total{%(kubeStateMetricsSelector)s,result="error"}[5m])) + / + sum(rate(kube_state_metrics_watch_total{%(kubeStateMetricsSelector)s}[5m]))) + > 0.01 + ||| % $._config, + 'for': '15m', + labels: { + severity: 'critical', + }, + annotations: { + message: 'kube-state-metrics is experiencing errors at an elevated rate in watch operations. This is likely causing it to not be able to expose metrics about Kubernetes objects correctly or at all.', + }, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kube-state-metrics-mixin/mixin.libsonnet b/monitoring/vendor/kube-state-metrics-mixin/mixin.libsonnet new file mode 100644 index 0000000..d06ee2f --- /dev/null +++ b/monitoring/vendor/kube-state-metrics-mixin/mixin.libsonnet @@ -0,0 +1 @@ +(import 'alerts.libsonnet') diff --git a/monitoring/vendor/kube-state-metrics/jsonnetfile.json b/monitoring/vendor/kube-state-metrics/jsonnetfile.json new file mode 100644 index 0000000..d31ac11 --- /dev/null +++ b/monitoring/vendor/kube-state-metrics/jsonnetfile.json @@ -0,0 +1,14 @@ +{ + "dependencies": [ + { + "name": "ksonnet", + "source": { + "git": { + "remote": "https://github.com/ksonnet/ksonnet-lib", + "subdir": "" + } + }, + "version": "master" + } + ] +} diff --git a/monitoring/vendor/kube-state-metrics/kube-state-metrics.libsonnet b/monitoring/vendor/kube-state-metrics/kube-state-metrics.libsonnet new file mode 100644 index 0000000..296657a --- /dev/null +++ b/monitoring/vendor/kube-state-metrics/kube-state-metrics.libsonnet @@ -0,0 +1,268 @@ +local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; + +{ + local ksm = self, + name:: error 'must set namespace', + namespace:: error 'must set namespace', + version:: error 'must set version', + image:: error 'must set image', + + commonLabels:: { + 'app.kubernetes.io/name': 'kube-state-metrics', + 'app.kubernetes.io/version': ksm.version, + }, + + podLabels:: { + [labelName]: ksm.commonLabels[labelName] + for labelName in std.objectFields(ksm.commonLabels) + if !std.setMember(labelName, ['app.kubernetes.io/version']) + }, + + clusterRoleBinding: + local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; + + clusterRoleBinding.new() + + clusterRoleBinding.mixin.metadata.withName(ksm.name) + + clusterRoleBinding.mixin.metadata.withLabels(ksm.commonLabels) + + clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + clusterRoleBinding.mixin.roleRef.withName(ksm.name) + + clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + + clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: ksm.name, namespace: ksm.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', + 'volumeattachments', + ]) + + rulesType.withVerbs(['list', 'watch']), + + rulesType.new() + + rulesType.withApiGroups(['admissionregistration.k8s.io']) + + rulesType.withResources([ + 'mutatingwebhookconfigurations', + 'validatingwebhookconfigurations', + ]) + + rulesType.withVerbs(['list', 'watch']), + + rulesType.new() + + rulesType.withApiGroups(['networking.k8s.io']) + + rulesType.withResources([ + 'networkpolicies', + ]) + + rulesType.withVerbs(['list', 'watch']), + + rulesType.new() + + rulesType.withApiGroups(['coordination.k8s.io']) + + rulesType.withResources([ + 'leases', + ]) + + rulesType.withVerbs(['list', 'watch']), + ]; + + clusterRole.new() + + clusterRole.mixin.metadata.withName(ksm.name) + + clusterRole.mixin.metadata.withLabels(ksm.commonLabels) + + 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 c = + container.new('kube-state-metrics', ksm.image) + + container.withPorts([ + containerPort.newNamed(8080, 'http-metrics'), + containerPort.newNamed(8081, 'telemetry'), + ]) + + container.mixin.livenessProbe.httpGet.withPath('/healthz') + + container.mixin.livenessProbe.httpGet.withPort(8080) + + container.mixin.livenessProbe.withInitialDelaySeconds(5) + + container.mixin.livenessProbe.withTimeoutSeconds(5) + + container.mixin.readinessProbe.httpGet.withPath('/') + + container.mixin.readinessProbe.httpGet.withPort(8081) + + container.mixin.readinessProbe.withInitialDelaySeconds(5) + + container.mixin.readinessProbe.withTimeoutSeconds(5) + + container.mixin.securityContext.withRunAsUser(65534); + + deployment.new(ksm.name, 1, c, ksm.commonLabels) + + deployment.mixin.metadata.withNamespace(ksm.namespace) + + deployment.mixin.metadata.withLabels(ksm.commonLabels) + + deployment.mixin.spec.selector.withMatchLabels(ksm.podLabels) + + deployment.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) + + deployment.mixin.spec.template.spec.withServiceAccountName(ksm.name), + + serviceAccount: + local serviceAccount = k.core.v1.serviceAccount; + + serviceAccount.new(ksm.name) + + serviceAccount.mixin.metadata.withNamespace(ksm.namespace) + + serviceAccount.mixin.metadata.withLabels(ksm.commonLabels), + + service: + local service = k.core.v1.service; + local servicePort = service.mixin.spec.portsType; + + local ksmServicePortMain = servicePort.newNamed('http-metrics', 8080, 'http-metrics'); + local ksmServicePortSelf = servicePort.newNamed('telemetry', 8081, 'telemetry'); + + service.new(ksm.name, ksm.podLabels, [ksmServicePortMain, ksmServicePortSelf]) + + service.mixin.metadata.withNamespace(ksm.namespace) + + service.mixin.metadata.withLabels(ksm.commonLabels) + + service.mixin.spec.withClusterIp('None'), + + autosharding:: { + role: + local role = k.rbac.v1.role; + local rulesType = role.rulesType; + + local rules = [ + rulesType.new() + + rulesType.withApiGroups(['']) + + rulesType.withResources(['pods']) + + rulesType.withVerbs(['get']), + rulesType.new() + + rulesType.withApiGroups(['apps']) + + rulesType.withResources(['statefulsets']) + + rulesType.withResourceNames([ksm.name]) + + rulesType.withVerbs(['get']), + ]; + + role.new() + + role.mixin.metadata.withName(ksm.name) + + role.mixin.metadata.withNamespace(ksm.namespace) + + role.mixin.metadata.withLabels(ksm.commonLabels) + + role.withRules(rules), + + roleBinding: + local roleBinding = k.rbac.v1.roleBinding; + + roleBinding.new() + + roleBinding.mixin.metadata.withName(ksm.name) + + roleBinding.mixin.metadata.withLabels(ksm.commonLabels) + + roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + + roleBinding.mixin.roleRef.withName(ksm.name) + + roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + + roleBinding.withSubjects([{ kind: 'ServiceAccount', name: ksm.name }]), + + statefulset: + local statefulset = k.apps.v1.statefulSet; + local container = statefulset.mixin.spec.template.spec.containersType; + local containerEnv = container.envType; + + local c = ksm.deployment.spec.template.spec.containers[0] + + container.withArgs([ + '--pod=$(POD_NAME)', + '--pod-namespace=$(POD_NAMESPACE)', + ]) + + container.mixin.securityContext.withRunAsUser(65534) + + container.withEnv([ + containerEnv.new('POD_NAME') + + containerEnv.mixin.valueFrom.fieldRef.withFieldPath('metadata.name'), + containerEnv.new('POD_NAMESPACE') + + containerEnv.mixin.valueFrom.fieldRef.withFieldPath('metadata.namespace'), + ]); + + statefulset.new(ksm.name, 2, c, [], ksm.commonLabels) + + statefulset.mixin.metadata.withNamespace(ksm.namespace) + + statefulset.mixin.metadata.withLabels(ksm.commonLabels) + + statefulset.mixin.spec.withServiceName(ksm.service.metadata.name) + + statefulset.mixin.spec.selector.withMatchLabels(ksm.podLabels) + + statefulset.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) + + statefulset.mixin.spec.template.spec.withServiceAccountName(ksm.name), + } + { + service: ksm.service, + serviceAccount: ksm.serviceAccount, + clusterRole: ksm.clusterRole, + clusterRoleBinding: ksm.clusterRoleBinding, + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/.circleci/Dockerfile b/monitoring/vendor/kubernetes-mixin/.circleci/Dockerfile new file mode 100644 index 0000000..7be997a --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/.circleci/Dockerfile @@ -0,0 +1,16 @@ +# 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.14.0 && \ + make -C jsonnet LDFLAGS=-static + +FROM prom/prometheus:v2.12.0 + +FROM circleci/golang:1.12.9-stretch +COPY --from=0 jsonnet/jsonnet /usr/bin +COPY --from=0 jsonnet/jsonnetfmt /usr/bin +COPY --from=1 /bin/promtool /usr/bin +RUN go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb diff --git a/monitoring/vendor/kubernetes-mixin/.circleci/config.yml b/monitoring/vendor/kubernetes-mixin/.circleci/config.yml new file mode 100644 index 0000000..02df914 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/.circleci/config.yml @@ -0,0 +1,11 @@ +version: 2 +jobs: + build: + docker: + - image: csmarchbanks/kubernetes-mixin-build:0.1.2 + + working_directory: /go/src/github.com/kubernetes-monitoring/kubernetes-mixin + steps: + - checkout + - run: jb install + - run: make diff --git a/monitoring/vendor/kubernetes-mixin/.gitignore b/monitoring/vendor/kubernetes-mixin/.gitignore new file mode 100644 index 0000000..b23a75c --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/.gitignore @@ -0,0 +1,4 @@ +*.yaml +dashboards_out +vendor +jsonnetfile.lock.json diff --git a/monitoring/vendor/kubernetes-mixin/LICENSE b/monitoring/vendor/kubernetes-mixin/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/LICENSE @@ -0,0 +1,202 @@ + + 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/monitoring/vendor/kubernetes-mixin/Makefile b/monitoring/vendor/kubernetes-mixin/Makefile new file mode 100644 index 0000000..03091c2 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/Makefile @@ -0,0 +1,39 @@ +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 -J vendor -S lib/alerts.jsonnet > $@ + +prometheus_rules.yaml: mixin.libsonnet lib/rules.jsonnet rules/*.libsonnet + jsonnet -J vendor -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/monitoring/vendor/kubernetes-mixin/OWNERS b/monitoring/vendor/kubernetes-mixin/OWNERS new file mode 100644 index 0000000..71c146e --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/OWNERS @@ -0,0 +1,13 @@ +# 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/monitoring/vendor/kubernetes-mixin/README.md b/monitoring/vendor/kubernetes-mixin/README.md new file mode 100644 index 0000000..6e1d1ed --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/README.md @@ -0,0 +1,199 @@ +# 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 | Prometheus Compatibility | +| ------- | -------------------------- | ------------------------ | +| master | Kubernetes 1.14+ | Prometheus 2.11.0+ | +| v0.1.x | Kubernetes 1.13 and before | | + +In Kubernetes 1.14 there was a major [metrics overhaul](https://github.com/kubernetes/enhancements/issues/1206) 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. + +Some alerts now use Prometheus filters made available in Prometheus 2.11.0, which makes this version of Prometheus a dependency. + +## 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. + +## Running the tests + +Build the mixins, run the tests: + +``` +$ docker run -v $(pwd):/tmp --entrypoint "/bin/promtool" prom/prometheus:latest test rules /tmp/tests.yaml +``` + +## 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/monitoring/vendor/kubernetes-mixin/SECURITY_CONTACTS b/monitoring/vendor/kubernetes-mixin/SECURITY_CONTACTS new file mode 100644 index 0000000..0f85c94 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/SECURITY_CONTACTS @@ -0,0 +1,16 @@ +# 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/monitoring/vendor/kubernetes-mixin/alerts/add-runbook-links.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/add-runbook-links.libsonnet new file mode 100644 index 0000000..1124f48 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/add-runbook-links.libsonnet @@ -0,0 +1,23 @@ +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/monitoring/vendor/kubernetes-mixin/alerts/alerts.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/alerts.libsonnet new file mode 100644 index 0000000..19f2846 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/alerts.libsonnet @@ -0,0 +1,9 @@ +(import 'apps_alerts.libsonnet') + +(import 'resource_alerts.libsonnet') + +(import 'storage_alerts.libsonnet') + +(import 'system_alerts.libsonnet') + +(import 'kube_apiserver.libsonnet') + +(import 'kubelet.libsonnet') + +(import 'kube_scheduler.libsonnet') + +(import 'kube_controller_manager.libsonnet') + +(import 'add-runbook-links.libsonnet') diff --git a/monitoring/vendor/kubernetes-mixin/alerts/apps_alerts.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/apps_alerts.libsonnet new file mode 100644 index 0000000..0a567dd --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/apps_alerts.libsonnet @@ -0,0 +1,253 @@ +{ + _config+:: { + kubeStateMetricsSelector: error 'must provide selector for kube-state-metrics', + namespaceSelector: null, + prefixedNamespaceSelector: if self.namespaceSelector != null then self.namespaceSelector + ',' else '', + }, + + 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) (max by(namespace, pod) (kube_pod_status_phase{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, phase=~"Pending|Unknown"}) * on(namespace, pod) group_left(owner_kind) max by(namespace, pod, owner_kind) (kube_pod_owner{owner_kind!="Job"})) > 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} < 1.00 + ||| % $._config, + labels: { + severity: 'critical', + }, + annotations: { + message: 'Only {{ $value | humanizePercentage }} of the desired Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are scheduled and ready.', + }, + 'for': '15m', + }, + { + expr: ||| + sum by (namespace, pod, container) (kube_pod_container_status_waiting_reason{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s}) > 0 + ||| % $._config, + labels: { + severity: 'warning', + }, + annotations: { + message: 'Pod {{ $labels.namespace }}/{{ $labels.pod }} container {{ $labels.container}} has been in waiting state for longer than 1 hour.', + }, + 'for': '1h', + alert: 'KubeContainerWaiting', + }, + { + 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/monitoring/vendor/kubernetes-mixin/alerts/kube_apiserver.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/kube_apiserver.libsonnet new file mode 100644 index 0000000..327e84c --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/kube_apiserver.libsonnet @@ -0,0 +1,157 @@ +local utils = import 'utils.libsonnet'; + +{ + _config+:: { + kubeApiserverSelector: error 'must provide selector for kube-apiserver', + + kubeAPILatencyWarningSeconds: 1, + kubeAPILatencyCriticalSeconds: 4, + + certExpirationWarningSeconds: 7 * 24 * 3600, + certExpirationCriticalSeconds: 1 * 24 * 3600, + }, + + prometheusAlerts+:: { + groups+: [ + { + name: 'kube-apiserver-error', + rules: + $._config.SLOs.apiserver.errors.alerts + + $._config.SLOs.apiserver.errors.recordingrules, + }, + { + name: 'kubernetes-system-apiserver', + rules: [ + { + alert: 'KubeAPILatencyHigh', + expr: ||| + ( + cluster:apiserver_request_duration_seconds:mean5m{%(kubeApiserverSelector)s} + > + on (verb) group_left() + ( + avg by (verb) (cluster:apiserver_request_duration_seconds:mean5m{%(kubeApiserverSelector)s} >= 0) + + + 2*stddev by (verb) (cluster:apiserver_request_duration_seconds:mean5m{%(kubeApiserverSelector)s} >= 0) + ) + ) > on (verb) group_left() + 1.2 * avg by (verb) (cluster:apiserver_request_duration_seconds:mean5m{%(kubeApiserverSelector)s} >= 0) + and on (verb,resource) + cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{%(kubeApiserverSelector)s,quantile="0.99"} + > + %(kubeAPILatencyWarningSeconds)s + ||| % $._config, + 'for': '5m', + labels: { + severity: 'warning', + }, + annotations: { + message: 'The API server has an abnormal 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"} > %(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])) > 0.03 + ||| % $._config, + 'for': '10m', + labels: { + severity: 'critical', + }, + annotations: { + message: 'API server is returning errors for {{ $value | humanizePercentage }} of requests.', + }, + }, + { + alert: 'KubeAPIErrorsHigh', + expr: ||| + sum(rate(apiserver_request_total{%(kubeApiserverSelector)s,code=~"5.."}[5m])) + / + sum(rate(apiserver_request_total{%(kubeApiserverSelector)s}[5m])) > 0.01 + ||| % $._config, + 'for': '10m', + labels: { + severity: 'warning', + }, + annotations: { + message: 'API server is returning errors for {{ $value | humanizePercentage }} 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) > 0.10 + ||| % $._config, + 'for': '10m', + labels: { + severity: 'critical', + }, + annotations: { + message: 'API server is returning errors for {{ $value | humanizePercentage }} 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) > 0.05 + ||| % $._config, + 'for': '10m', + labels: { + severity: 'warning', + }, + annotations: { + message: 'API server is returning errors for {{ $value | humanizePercentage }} of requests for {{ $labels.verb }} {{ $labels.resource }} {{ $labels.subresource }}.', + }, + }, + { + alert: 'KubeClientCertificateExpiration', + expr: ||| + apiserver_client_certificate_expiration_seconds_count{%(kubeApiserverSelector)s} > 0 and on(job) 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 on(job) 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)), + }, + }, + (import '../lib/absent_alert.libsonnet') { + componentName:: 'KubeAPI', + selector:: $._config.kubeApiserverSelector, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/alerts/kube_controller_manager.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/kube_controller_manager.libsonnet new file mode 100644 index 0000000..571e529 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/kube_controller_manager.libsonnet @@ -0,0 +1,19 @@ +{ + _config+:: { + kubeControllerManagerSelector: error 'must provide selector for kube-controller-manager', + }, + + prometheusAlerts+:: { + groups+: [ + { + name: 'kubernetes-system-controller-manager', + rules: [ + (import '../lib/absent_alert.libsonnet') { + componentName:: 'KubeControllerManager', + selector:: $._config.kubeControllerManagerSelector, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/alerts/kube_scheduler.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/kube_scheduler.libsonnet new file mode 100644 index 0000000..baae29a --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/kube_scheduler.libsonnet @@ -0,0 +1,19 @@ +{ + _config+:: { + kubeSchedulerSelector: 'job="kube-scheduler"', + }, + + prometheusAlerts+:: { + groups+: [ + { + name: 'kubernetes-system-scheduler', + rules: [ + (import '../lib/absent_alert.libsonnet') { + componentName:: 'KubeScheduler', + selector:: $._config.kubeSchedulerSelector, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/alerts/kubelet.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/kubelet.libsonnet new file mode 100644 index 0000000..8d3842e --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/kubelet.libsonnet @@ -0,0 +1,59 @@ +{ + _config+:: { + kubeStateMetricsSelector: error 'must provide selector for kube-state-metrics', + kubeletSelector: error 'must provide selector for kubelet', + }, + + prometheusAlerts+:: { + groups+: [ + { + name: 'kubernetes-system-kubelet', + 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 15 minutes.', + }, + 'for': '15m', + alert: 'KubeNodeNotReady', + }, + { + expr: ||| + kube_node_spec_taint{%(kubeStateMetricsSelector)s,key="node.kubernetes.io/unreachable",effect="NoSchedule"} == 1 + ||| % $._config, + 'for': '2m', + labels: { + severity: 'warning', + }, + annotations: { + message: '{{ $labels.node }} is unreachable and some workloads may be rescheduled.', + }, + alert: 'KubeNodeUnreachable', + }, + { + alert: 'KubeletTooManyPods', + expr: ||| + max(max(kubelet_running_pod_count{%(kubeletSelector)s}) by(instance) * on(instance) group_left(node) kubelet_node_name{%(kubeletSelector)s}) by(node) / max(kube_node_status_capacity_pods{%(kubeStateMetricsSelector)s}) by(node) > 0.95 + ||| % $._config, + 'for': '15m', + labels: { + severity: 'warning', + }, + annotations: { + message: "Kubelet '{{ $labels.node }}' is running at {{ $value | humanizePercentage }} of its Pod capacity.", + }, + }, + (import '../lib/absent_alert.libsonnet') { + componentName:: 'Kubelet', + selector:: $._config.kubeletSelector, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/alerts/resource_alerts.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/resource_alerts.libsonnet new file mode 100644 index 0000000..b8e0590 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/resource_alerts.libsonnet @@ -0,0 +1,125 @@ +{ + _config+:: { + kubeStateMetricsSelector: error 'must provide selector for kube-state-metrics', + nodeExporterSelector: error 'must provide selector for node-exporter', + namespaceSelector: null, + prefixedNamespaceSelector: if self.namespaceSelector != null then self.namespaceSelector + ',' else '', + + // 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, + cpuThrottlingPercent: 25, + cpuThrottlingSelector: '', + }, + + 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: ||| + kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="used"} + / ignoring(instance, job, type) + (kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard"} > 0) + > 0.90 + ||| % $._config, + 'for': '15m', + labels: { + severity: 'warning', + }, + annotations: { + message: 'Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage }} of its {{ $labels.resource }} quota.', + }, + }, + { + alert: 'CPUThrottlingHigh', + expr: ||| + 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 / 100 ) + ||| % $._config, + 'for': '15m', + labels: { + severity: 'warning', + }, + annotations: { + message: '{{ $value | humanizePercentage }} throttling of CPU in namespace {{ $labels.namespace }} for container {{ $labels.container }} in pod {{ $labels.pod }}.', + }, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/alerts/storage_alerts.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/storage_alerts.libsonnet new file mode 100644 index 0000000..b4c838a --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/storage_alerts.libsonnet @@ -0,0 +1,71 @@ +{ + _config+:: { + kubeStateMetricsSelector: error 'must provide selector for kube-state-metrics', + kubeletSelector: error 'must provide selector for kubelet', + namespaceSelector: null, + prefixedNamespaceSelector: if self.namespaceSelector != null then self.namespaceSelector + ',' else '', + + // 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', + }, + + prometheusAlerts+:: { + groups+: [ + { + name: 'kubernetes-storage', + rules: [ + { + alert: 'KubePersistentVolumeUsageCritical', + expr: ||| + kubelet_volume_stats_available_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} + / + kubelet_volume_stats_capacity_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} + < 0.03 + ||| % $._config, + 'for': '1m', + labels: { + severity: 'critical', + }, + annotations: { + message: 'The PersistentVolume claimed by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace }} is only {{ $value | humanizePercentage }} free.', + }, + }, + { + alert: 'KubePersistentVolumeFullInFourDays', + expr: ||| + ( + kubelet_volume_stats_available_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} + / + kubelet_volume_stats_capacity_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} + ) < 0.15 + and + predict_linear(kubelet_volume_stats_available_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s}[%(volumeFullPredictionSampleTime)s], 4 * 24 * 3600) < 0 + ||| % $._config, + 'for': '1h', + 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 {{ $value | humanizePercentage }} 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/monitoring/vendor/kubernetes-mixin/alerts/system_alerts.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/system_alerts.libsonnet new file mode 100644 index 0000000..293aa3b --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/system_alerts.libsonnet @@ -0,0 +1,47 @@ +{ + _config+:: { + notKubeDnsCoreDnsSelector: 'job!~"kube-dns|coredns"', + }, + + prometheusAlerts+:: { + groups+: [ + { + name: 'kubernetes-system', + rules: [ + { + 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)) + > 0.01 + |||, + 'for': '15m', + labels: { + severity: 'warning', + }, + annotations: { + message: "Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance }}' is experiencing {{ $value | humanizePercentage }} errors.'", + }, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/alerts/utils.libsonnet b/monitoring/vendor/kubernetes-mixin/alerts/utils.libsonnet new file mode 100644 index 0000000..7af4557 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/alerts/utils.libsonnet @@ -0,0 +1,6 @@ +{ + humanizeSeconds(s):: + if s > 60 * 60 * 24 + then '%.1f days' % (s / 60 / 60 / 24) + else '%.1f hours' % (s / 60 / 60), +} diff --git a/monitoring/vendor/kubernetes-mixin/config.libsonnet b/monitoring/vendor/kubernetes-mixin/config.libsonnet new file mode 100644 index 0000000..f66bc45 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/config.libsonnet @@ -0,0 +1,83 @@ +local slo = import 'slo-libsonnet/slo.libsonnet'; + +{ + _config+:: { + SLOs: { + apiserver: { + // This is templating a Multiple Burn Rate Alerts for Kubernetes Apiservers. + // We will alert on burning too much error budget over 30 days. + // By default we have 99% availability (1% unavailability = 7h12m in 30d). + errors: slo.errorburn({ + metric: 'apiserver_request_total', + selectors: [$._config.kubeApiserverSelector], + errorBudget: 1 - 0.99, + }), + }, + }, + + // Selectors are inserted between {} in Prometheus queries. + cadvisorSelector: 'job="cadvisor"', + kubeletSelector: 'job="kubelet"', + kubeStateMetricsSelector: 'job="kube-state-metrics"', + nodeExporterSelector: 'job="node-exporter"', + kubeSchedulerSelector: 'job="kube-scheduler"', + kubeControllerManagerSelector: 'job="kube-controller-manager"', + kubeApiserverSelector: 'job="kube-apiserver"', + kubeProxySelector: 'job="kube-proxy"', + podLabel: 'pod', + hostNetworkInterfaceSelector: 'device!~"veth.+"', + hostMountpointSelector: 'mountpoint="/"', + wmiExporterSelector: 'job="wmi-exporter"', + + // 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: '.', + }, + + // Opt-in to multiCluster dashboards by overriding this and the clusterLabel. + showMultiCluster: false, + clusterLabel: 'cluster', + + namespaceLabel: 'namespace', + + // 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-.+', 'dasd.+'], + diskDeviceSelector: 'device=~"%s"' % std.join('|', self.diskDevices), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/apiserver.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/apiserver.libsonnet new file mode 100644 index 0000000..6aa177f --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/apiserver.libsonnet @@ -0,0 +1,213 @@ +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; + +{ + _config+:: { + kubeApiserverSelector: 'job="kube-apiserver"', + }, + + grafanaDashboards+:: { + 'apiserver.json': + local upCount = + singlestat.new( + 'Up', + datasource='$datasource', + span=2, + valueName='min', + ) + .addTarget(prometheus.target('sum(up{%(kubeApiserverSelector)s, %(clusterLabel)s="$cluster"})' % $._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..", %(clusterLabel)s="$cluster"}[5m]))' % $._config, legendFormat='2xx')) + .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"3..", %(clusterLabel)s="$cluster"}[5m]))' % $._config, legendFormat='3xx')) + .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"4..", %(clusterLabel)s="$cluster"}[5m]))' % $._config, legendFormat='4xx')) + .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"5..", %(clusterLabel)s="$cluster"}[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", verb!="WATCH", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}' % $._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", %(clusterLabel)s="$cluster"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} hit')) + .addTarget(prometheus.target('sum(rate(etcd_helper_cache_miss_total{%(kubeApiserverSelector)s,instance=~"$instance", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}[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", %(clusterLabel)s="$cluster"}' % $._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", %(clusterLabel)s="$cluster"}[5m])' % $._config, legendFormat='{{instance}}')); + + local goroutines = + graphPanel.new( + 'Goroutines', + datasource='$datasource', + span=4, + format='short', + ) + .addTarget(prometheus.target('go_goroutines{%(kubeApiserverSelector)s,instance=~"$instance", %(clusterLabel)s="$cluster"}' % $._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: 'default', + value: 'default', + }, + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addTemplate( + template.new( + name='cluster', + datasource='$datasource', + query='label_values(apiserver_request_total, %(clusterLabel)s)' % $._config, + current='prod', + hide=if $._config.showMultiCluster then '' else 'variable', + refresh=1, + includeAll=false, + sort=1 + ) + ) + .addTemplate( + template.new( + 'instance', + '$datasource', + 'label_values(apiserver_request_total{%(kubeApiserverSelector)s, %(clusterLabel)s="$cluster"}, instance)' % $._config, + refresh='time', + includeAll=true, + sort=1, + ) + ) + .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/monitoring/vendor/kubernetes-mixin/dashboards/controller-manager.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/controller-manager.libsonnet new file mode 100644 index 0000000..24b96f0 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/controller-manager.libsonnet @@ -0,0 +1,185 @@ +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: 'default', + value: 'default', + }, + 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, + sort=1, + ) + ) + .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/monitoring/vendor/kubernetes-mixin/dashboards/dashboards.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/dashboards.libsonnet new file mode 100644 index 0000000..c00111c --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/dashboards.libsonnet @@ -0,0 +1,11 @@ +(import 'network.libsonnet') + +(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/monitoring/vendor/kubernetes-mixin/dashboards/defaults.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/defaults.libsonnet new file mode 100644 index 0000000..12f430d --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/defaults.libsonnet @@ -0,0 +1,29 @@ +{ + 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/monitoring/vendor/kubernetes-mixin/dashboards/kubelet.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/kubelet.libsonnet new file mode 100644 index 0000000..7ce550d --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/kubelet.libsonnet @@ -0,0 +1,418 @@ +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{%(clusterLabel)s="$cluster", %(kubeletSelector)s})' % $._config)); + + local runningPodCount = + singlestat.new( + 'Running Pods', + datasource='$datasource', + span=2, + valueName='min', + ) + .addTarget(prometheus.target('sum(kubelet_running_pod_count{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} pod')) + .addTarget(prometheus.target('sum(rate(kubelet_pod_worker_duration_seconds_count{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster", %(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(kubeletSelector)s, instance=~"$instance",code=~"2.."}[5m]))' % $._config, legendFormat='2xx')) + .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(clusterLabel)s="$cluster",%(kubeletSelector)s, instance=~"$instance",code=~"3.."}[5m]))' % $._config, legendFormat='3xx')) + .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(clusterLabel)s="$cluster",%(kubeletSelector)s, instance=~"$instance",code=~"4.."}[5m]))' % $._config, legendFormat='4xx')) + .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(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{%(clusterLabel)s="$cluster",%(kubeletSelector)s,instance=~"$instance"}[5m])' % $._config, legendFormat='{{instance}}')); + + local goroutines = + graphPanel.new( + 'Goroutines', + datasource='$datasource', + span=4, + format='short', + ) + .addTarget(prometheus.target('go_goroutines{%(clusterLabel)s="$cluster",%(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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .addTemplate( + template.new( + 'instance', + '$datasource', + 'label_values(kubelet_runtime_operations_total{%(clusterLabel)s="$cluster", %(kubeletSelector)s}, instance)' % $._config, + refresh='time', + includeAll=true, + sort=1, + ) + ) + .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/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/cluster-total.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/cluster-total.libsonnet new file mode 100644 index 0000000..f5fd099 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/cluster-total.libsonnet @@ -0,0 +1,507 @@ +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 annotation = grafana.annotation; +local singlestat = grafana.singlestat; +local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; +local numbersinglestat = promgrafonnet.numbersinglestat; +local gauge = promgrafonnet.gauge; + +{ + grafanaDashboards+:: { + + 'cluster-total.json': + + local newStyle( + alias, + colorMode=null, + colors=[], + dateFormat='YYYY-MM-DD HH:mm:ss', + decimals=2, + link=false, + linkTooltip='Drill down', + linkUrl='', + thresholds=[], + type='number', + unit='short' + ) = { + alias: alias, + colorMode: colorMode, + colors: colors, + dateFormat: dateFormat, + decimals: decimals, + link: link, + linkTooltip: linkTooltip, + linkUrl: linkUrl, + thresholds: thresholds, + type: type, + unit: unit, + }; + + local newBarplotPanel(graphTitle, graphQuery, graphFormat='Bps', legendFormat='{{namespace}}') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: legendFormat, + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=24, + datasource='$datasource', + fill=2, + min_span=24, + format=graphFormat, + min=0, + max=null, + show_xaxis=false, + x_axis_mode='series', + x_axis_values='current', + lines=false, + bars=true, + stack=false, + legend_show=true, + legend_values=true, + legend_min=false, + legend_max=false, + legend_current=true, + legend_avg=false, + legend_alignAsTable=true, + legend_rightSide=true, + legend_sort='current', + legend_sortDesc=true, + nullPointMode='null' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local newGraphPanel(graphTitle, graphQuery, graphFormat='Bps', legendFormat='{{namespace}}') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: legendFormat, + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=24, + datasource='$datasource', + fill=2, + linewidth=2, + min_span=24, + format=graphFormat, + min=0, + max=null, + x_axis_mode='time', + x_axis_values='total', + lines=true, + stack=true, + legend_show=true, + legend_values=true, + legend_min=true, + legend_max=true, + legend_current=true, + legend_avg=true, + legend_alignAsTable=true, + legend_rightSide=true, + nullPointMode='connected' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local newTablePanel(tableTitle, colQueries) = + local buildTarget(index, colQuery) = + prometheus.target( + colQuery, + format='table', + instant=true, + ) + { + legendFormat: '', + step: 10, + refId: std.char(65 + index), + }; + + local targets = std.mapWithIndex(buildTarget, colQueries); + + tablePanel.new( + title=tableTitle, + span=24, + min_span=24, + datasource='$datasource', + ) + .addColumn( + field='Time', + style=newStyle( + alias='Time', + type='hidden' + ) + ) + .addColumn( + field='Value #A', + style=newStyle( + alias='Current Bandwidth Received', + unit='Bps', + ), + ) + .addColumn( + field='Value #B', + style=newStyle( + alias='Current Bandwidth Transmitted', + unit='Bps', + ), + ) + .addColumn( + field='Value #C', + style=newStyle( + alias='Average Bandwidth Received', + unit='Bps', + ), + ) + .addColumn( + field='Value #D', + style=newStyle( + alias='Average Bandwidth Transmitted', + unit='Bps', + ), + ) + .addColumn( + field='Value #E', + style=newStyle( + alias='Rate of Received Packets', + unit='pps', + ), + ) + .addColumn( + field='Value #F', + style=newStyle( + alias='Rate of Transmitted Packets', + unit='pps', + ), + ) + .addColumn( + field='Value #G', + style=newStyle( + alias='Rate of Received Packets Dropped', + unit='pps', + ), + ) + .addColumn( + field='Value #H', + style=newStyle( + alias='Rate of Transmitted Packets Dropped', + unit='pps', + ), + ) + .addColumn( + field='namespace', + style=newStyle( + alias='Namespace', + link=true, + linkUrl='d/8b7a8b326d7a6f1f04244066368c67af/kubernetes-networking-namespace-pods?orgId=1&refresh=30s&var-namespace=$__cell', + ), + ) + { + + fill: 1, + fontSize: '90%', + lines: true, + linewidth: 1, + nullPointMode: 'null as zero', + renderer: 'flot', + scroll: true, + showHeader: true, + spaceLength: 10, + sort: { + col: 0, + desc: false, + }, + targets: targets, + }; + + local resolutionTemplate = + template.new( + name='resolution', + datasource='$datasource', + query='30s,5m,1h', + current='5m', + hide='', + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: false, + text: '30s', + value: '30s', + }, + { + selected: true, + text: '5m', + value: '5m', + }, + { + selected: false, + text: '1h', + value: '1h', + }, + ], + }; + + local intervalTemplate = + template.new( + name='interval', + datasource='$datasource', + query='4h', + current='5m', + hide=2, + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: true, + text: '4h', + value: '4h', + }, + ], + }; + + //##### Current Bandwidth Row ###### + + local currentBandwidthRow = + row.new( + title='Current Bandwidth' + ); + + //##### Average Bandwidth Row ###### + + local averageBandwidthRow = + row.new( + title='Average Bandwidth', + collapse=true, + ); + + //##### Bandwidth History Row ###### + local bandwidthHistoryRow = + row.new( + title='Bandwidth History' + ); + + //##### Packet Row ###### + // collapsed, so row must include panels + local packetRow = + row.new( + title='Packets', + collapse=true, + ); + + //##### Error Row ###### + // collapsed, so row must include panels + local errorRow = + row.new( + title='Errors', + collapse=true, + ); + + dashboard.new( + title='%(dashboardNamePrefix)sNetworking / Cluster' % $._config.grafanaK8s, + tags=($._config.grafanaK8s.dashboardTags), + editable=true, + schemaVersion=18, + refresh='30s', + time_from='now-1h', + time_to='now', + ) + .addTemplate(resolutionTemplate) + .addTemplate(intervalTemplate) + .addAnnotation(annotation.default) + .addPanel( + currentBandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 0 } + ) + .addTemplate( + { + current: { + text: 'default', + value: 'default', + }, + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addPanel( + newBarplotPanel( + graphTitle='Current Rate of Bytes Received', + graphQuery='sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ), + gridPos={ h: 9, w: 12, x: 0, y: 1 } + ) + .addPanel( + newBarplotPanel( + graphTitle='Current Rate of Bytes Transmitted', + graphQuery='sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ), + gridPos={ h: 9, w: 12, x: 12, y: 1 } + ) + .addPanel( + newTablePanel( + tableTitle='Current Status', + colQueries=[ + 'sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(sum(irate(container_network_receive_packets_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + 'sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ] + ), + gridPos={ h: 9, w: 24, x: 0, y: 10 } + ) + .addPanel( + averageBandwidthRow + .addPanel( + newBarplotPanel( + graphTitle='Average Rate of Bytes Received', + graphQuery='sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ), + gridPos={ h: 9, w: 12, x: 0, y: 11 } + ) + .addPanel( + newBarplotPanel( + graphTitle='Average Rate of Bytes Transmitted', + graphQuery='sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ), + gridPos={ h: 9, w: 12, x: 12, y: 11 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 10 }, + ) + .addPanel( + bandwidthHistoryRow, gridPos={ h: 1, w: 24, x: 0, y: 11 } + ) + .addPanel( + newGraphPanel( + graphTitle='Receive Bandwidth', + graphQuery='sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ), + gridPos={ h: 9, w: 24, x: 0, y: 12 } + ) + .addPanel( + newGraphPanel( + graphTitle='Transmit Bandwidth', + graphQuery='sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + ), + gridPos={ h: 9, w: 24, x: 0, y: 21 } + ) + .addPanel( + packetRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets', + graphQuery='sort_desc(sum(irate(container_network_receive_packets_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + graphFormat='pps' + ), + gridPos={ h: 9, w: 24, x: 0, y: 31 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets', + graphQuery='sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + graphFormat='pps' + ), + gridPos={ h: 9, w: 24, x: 0, y: 40 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 30 } + ) + .addPanel( + errorRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets Dropped', + graphQuery='sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + graphFormat='pps' + ), + gridPos={ h: 9, w: 24, x: 0, y: 50 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets Dropped', + graphQuery='sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~".+"}[$interval:$resolution])) by (namespace))', + graphFormat='pps' + ), + gridPos={ h: 9, w: 24, x: 0, y: 59 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of TCP Retransimts out of all sent segments', + graphQuery='sort_desc(sum(rate(node_netstat_Tcp_RetransSegs[$interval:$resolution]) / rate(node_netstat_Tcp_OutSegs[$interval:$resolution])) by (instance))', + graphFormat='percentunit', + legendFormat='{{instance}}' + ) + { links: [ + { + url: 'https://accedian.com/enterprises/blog/network-packet-loss-retransmissions-and-duplicate-acknowledgements/', + title: 'What is TCP Retransmit?', + targetBlank: true, + }, + ] }, + gridPos={ h: 9, w: 24, x: 0, y: 59 } + ).addPanel( + newGraphPanel( + graphTitle='Rate of TCP SYN Retransimts out of all retransmits', + graphQuery='sort_desc(sum(rate(node_netstat_TcpExt_TCPSynRetrans[$interval:$resolution]) / rate(node_netstat_Tcp_RetransSegs[$interval:$resolution])) by (instance))', + graphFormat='percentunit', + legendFormat='{{instance}}' + ) + { links: [ + { + url: 'https://github.com/prometheus/node_exporter/issues/1023#issuecomment-408128365', + title: 'Why monitor SYN retransmits?', + targetBlank: true, + }, + ] }, + gridPos={ h: 9, w: 24, x: 0, y: 59 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 31 } + ), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/namespace-by-pod.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/namespace-by-pod.libsonnet new file mode 100644 index 0000000..fce3a06 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/namespace-by-pod.libsonnet @@ -0,0 +1,457 @@ +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 annotation = grafana.annotation; +local singlestat = grafana.singlestat; +local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; +local numbersinglestat = promgrafonnet.numbersinglestat; +local gauge = promgrafonnet.gauge; + +{ + grafanaDashboards+:: { + + 'namespace-by-pod.json': + + local newStyle( + alias, + colorMode=null, + colors=[], + dateFormat='YYYY-MM-DD HH:mm:ss', + decimals=2, + link=false, + linkTooltip='Drill down', + linkUrl='', + thresholds=[], + type='number', + unit='short' + ) = { + alias: alias, + colorMode: colorMode, + colors: colors, + dateFormat: dateFormat, + decimals: decimals, + link: link, + linkTooltip: linkTooltip, + linkUrl: linkUrl, + thresholds: thresholds, + type: type, + unit: unit, + }; + + local newGaugePanel(gaugeTitle, gaugeQuery) = + local target = + prometheus.target( + gaugeQuery, + ) + { + instant: null, + intervalFactor: 1, + }; + + singlestat.new( + title=gaugeTitle, + datasource='$datasource', + format='time_series', + height=9, + span=12, + min_span=12, + decimals=0, + valueName='current' + ).addTarget(target) + { + timeFrom: null, + timeShift: null, + type: 'gauge', + options: { + fieldOptions: { + calcs: [ + 'last', + ], + defaults: { + max: 10000000000, // 10GBs + min: 0, + title: '$namespace', + unit: 'Bps', + }, + mappings: [], + override: {}, + thresholds: [ + { + color: 'dark-green', + index: 0, + value: null, // 0GBs + }, + { + color: 'dark-yellow', + index: 1, + value: 5000000000, // 5GBs + }, + { + color: 'dark-red', + index: 2, + value: 7000000000, // 7GBs + }, + ], + values: false, + }, + }, + }; + + local newGraphPanel(graphTitle, graphQuery, graphFormat='Bps') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: '{{pod}}', + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=12, + datasource='$datasource', + fill=2, + linewidth=2, + min_span=12, + format=graphFormat, + min=0, + max=null, + x_axis_mode='time', + x_axis_values='total', + lines=true, + stack=true, + legend_show=true, + nullPointMode='connected' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local newTablePanel(tableTitle, colQueries) = + local buildTarget(index, colQuery) = + prometheus.target( + colQuery, + format='table', + instant=true, + ) + { + legendFormat: '', + step: 10, + refId: std.char(65 + index), + }; + + local targets = std.mapWithIndex(buildTarget, colQueries); + + tablePanel.new( + title=tableTitle, + span=24, + min_span=24, + datasource='$datasource', + ) + .addColumn( + field='Time', + style=newStyle( + alias='Time', + type='hidden', + ) + ) + .addColumn( + field='Value #A', + style=newStyle( + alias='Bandwidth Received', + unit='Bps', + ), + ) + .addColumn( + field='Value #B', + style=newStyle( + alias='Bandwidth Transmitted', + unit='Bps', + ), + ) + .addColumn( + field='Value #C', + style=newStyle( + alias='Rate of Received Packets', + unit='pps', + ), + ) + .addColumn( + field='Value #D', + style=newStyle( + alias='Rate of Transmitted Packets', + unit='pps', + ), + ) + .addColumn( + field='Value #E', + style=newStyle( + alias='Rate of Received Packets Dropped', + unit='pps', + ), + ) + .addColumn( + field='Value #F', + style=newStyle( + alias='Rate of Transmitted Packets Dropped', + unit='pps', + ), + ) + .addColumn( + field='pod', + style=newStyle( + alias='Pod', + link=true, + linkUrl='d/7a18067ce943a40ae25454675c19ff5c/kubernetes-networking-pod?orgId=1&refresh=30s&var-namespace=$namespace&var-pod=$__cell' + ), + ) + { + + fill: 1, + fontSize: '100%', + lines: true, + linewidth: 1, + nullPointMode: 'null as zero', + renderer: 'flot', + scroll: true, + showHeader: true, + spaceLength: 10, + sort: { + col: 0, + desc: false, + }, + targets: targets, + }; + + + local namespaceTemplate = + template.new( + name='namespace', + datasource='$datasource', + query='label_values(container_network_receive_packets_total, namespace)', + allValues='.+', + current='kube-system', + hide='', + refresh=1, + includeAll=true, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(container_network_receive_packets_total, namespace)', + skipUrlSync: false, + }; + + local resolutionTemplate = + template.new( + name='resolution', + datasource='$datasource', + query='30s,5m,1h', + current='5m', + hide='', + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: false, + text: '30s', + value: '30s', + }, + { + selected: true, + text: '5m', + value: '5m', + }, + { + selected: false, + text: '1h', + value: '1h', + }, + ], + }; + + local intervalTemplate = + template.new( + name='interval', + datasource='$datasource', + query='4h', + current='5m', + hide=2, + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: true, + text: '4h', + value: '4h', + }, + ], + }; + + //##### Current Bandwidth Row ###### + + local currentBandwidthRow = + row.new( + title='Current Bandwidth' + ); + + //##### Bandwidth Row ###### + + local bandwidthRow = + row.new( + title='Bandwidth' + ); + + //##### Packet Row ###### + // collapsed, so row must include panels + local packetRow = + row.new( + title='Packets', + collapse=true, + ); + + //##### Error Row ###### + // collapsed, so row must include panels + local errorRow = + row.new( + title='Errors', + collapse=true, + ); + + dashboard.new( + title='%(dashboardNamePrefix)sNetworking / Namespace (Pods)' % $._config.grafanaK8s, + tags=($._config.grafanaK8s.dashboardTags), + editable=true, + schemaVersion=18, + refresh='30s', + time_from='now-1h', + time_to='now', + ) + .addTemplate( + { + current: { + text: 'default', + value: 'default', + }, + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addTemplate(namespaceTemplate) + .addTemplate(resolutionTemplate) + .addTemplate(intervalTemplate) + .addAnnotation(annotation.default) + .addPanel(currentBandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 0 }) + .addPanel( + newGaugePanel( + gaugeTitle='Current Rate of Bytes Received', + gaugeQuery='sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]))' + ), + gridPos={ h: 9, w: 12, x: 0, y: 1 } + ) + .addPanel( + newGaugePanel( + gaugeTitle='Current Rate of Bytes Transmitted', + gaugeQuery='sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]))' + ), + gridPos={ h: 9, w: 12, x: 12, y: 1 } + ) + .addPanel( + newTablePanel( + tableTitle='Current Status', + colQueries=[ + 'sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + 'sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + 'sum(irate(container_network_receive_packets_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + 'sum(irate(container_network_transmit_packets_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + 'sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + 'sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + ] + ), + gridPos={ h: 9, w: 24, x: 0, y: 10 } + ) + .addPanel(bandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 19 }) + .addPanel( + newGraphPanel( + graphTitle='Receive Bandwidth', + graphQuery='sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)' + ), + gridPos={ h: 9, w: 12, x: 0, y: 20 } + ) + .addPanel( + newGraphPanel( + graphTitle='Transmit Bandwidth', + graphQuery='sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)' + ), + gridPos={ h: 9, w: 12, x: 12, y: 20 } + ) + .addPanel( + packetRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets', + graphQuery='sum(irate(container_network_receive_packets_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 0, y: 30 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets', + graphQuery='sum(irate(container_network_transmit_packets_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 12, y: 30 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 29 } + ) + .addPanel( + errorRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets Dropped', + graphQuery='sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 0, y: 40 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets Dropped', + graphQuery='sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 12, y: 40 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 30 } + ), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/namespace-by-workload.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/namespace-by-workload.libsonnet new file mode 100644 index 0000000..802d914 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/namespace-by-workload.libsonnet @@ -0,0 +1,584 @@ +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 annotation = grafana.annotation; +local singlestat = grafana.singlestat; +local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; +local numbersinglestat = promgrafonnet.numbersinglestat; +local gauge = promgrafonnet.gauge; + +{ + grafanaDashboards+:: { + + 'namespace-by-workload.json': + + local newStyle( + alias, + colorMode=null, + colors=[], + dateFormat='YYYY-MM-DD HH:mm:ss', + decimals=2, + link=false, + linkTooltip='Drill down', + linkUrl='', + thresholds=[], + type='number', + unit='short' + ) = { + alias: alias, + colorMode: colorMode, + colors: colors, + dateFormat: dateFormat, + decimals: decimals, + link: link, + linkTooltip: linkTooltip, + linkUrl: linkUrl, + thresholds: thresholds, + type: type, + unit: unit, + }; + + local newBarplotPanel(graphTitle, graphQuery, graphFormat='Bps', legendFormat='{{namespace}}') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: legendFormat, + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=24, + datasource='$datasource', + fill=2, + min_span=24, + format=graphFormat, + min=0, + max=null, + show_xaxis=false, + x_axis_mode='series', + x_axis_values='current', + lines=false, + bars=true, + stack=false, + legend_show=true, + legend_values=true, + legend_min=false, + legend_max=false, + legend_current=true, + legend_avg=false, + legend_alignAsTable=true, + legend_rightSide=true, + legend_sort='current', + legend_sortDesc=true, + nullPointMode='null' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local newGraphPanel(graphTitle, graphQuery, graphFormat='Bps') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: '{{workload}}', + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=12, + datasource='$datasource', + fill=2, + linewidth=2, + min_span=12, + format=graphFormat, + min=0, + max=null, + x_axis_mode='time', + x_axis_values='total', + lines=true, + stack=true, + legend_show=true, + nullPointMode='connected' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local newTablePanel(tableTitle, colQueries) = + local buildTarget(index, colQuery) = + prometheus.target( + colQuery, + format='table', + instant=true, + ) + { + legendFormat: '', + step: 10, + refId: std.char(65 + index), + }; + + local targets = std.mapWithIndex(buildTarget, colQueries); + + tablePanel.new( + title=tableTitle, + span=24, + min_span=24, + datasource='$datasource', + ) + .addColumn( + field='Time', + style=newStyle( + alias='Time', + type='hidden' + ) + ) + .addColumn( + field='Value #A', + style=newStyle( + alias='Current Bandwidth Received', + unit='Bps', + ), + ) + .addColumn( + field='Value #B', + style=newStyle( + alias='Current Bandwidth Transmitted', + unit='Bps', + ), + ) + .addColumn( + field='Value #C', + style=newStyle( + alias='Average Bandwidth Received', + unit='Bps', + ), + ) + .addColumn( + field='Value #D', + style=newStyle( + alias='Average Bandwidth Transmitted', + unit='Bps', + ), + ) + .addColumn( + field='Value #E', + style=newStyle( + alias='Rate of Received Packets', + unit='pps', + ), + ) + .addColumn( + field='Value #F', + style=newStyle( + alias='Rate of Transmitted Packets', + unit='pps', + ), + ) + .addColumn( + field='Value #G', + style=newStyle( + alias='Rate of Received Packets Dropped', + unit='pps', + ), + ) + .addColumn( + field='Value #H', + style=newStyle( + alias='Rate of Transmitted Packets Dropped', + unit='pps', + ), + ) + .addColumn( + field='workload', + style=newStyle( + alias='Workload', + link=true, + linkUrl='d/728bf77cc1166d2f3133bf25846876cc/kubernetes-networking-workload?orgId=1&refresh=30s&var-namespace=$namespace&var-type=$type&var-workload=$__cell' + ), + ) + { + + fill: 1, + fontSize: '90%', + lines: true, + linewidth: 1, + nullPointMode: 'null as zero', + renderer: 'flot', + scroll: true, + showHeader: true, + spaceLength: 10, + sort: { + col: 0, + desc: false, + }, + targets: targets, + }; + + local namespaceTemplate = + template.new( + name='namespace', + datasource='$datasource', + query='label_values(container_network_receive_packets_total, namespace)', + current='kube-system', + hide='', + refresh=1, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(container_network_receive_packets_total, namespace)', + skipUrlSync: false, + }; + + local typeTemplate = + template.new( + name='type', + datasource='$datasource', + query='label_values(mixin_pod_workload{namespace=~"$namespace", workload=~".+"}, workload_type)', + current='deployment', + hide='', + refresh=1, + includeAll=false, + sort=0 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(mixin_pod_workload{namespace=~"$namespace", workload=~".+"}, workload_type)', + skipUrlSync: false, + }; + + local resolutionTemplate = + template.new( + name='resolution', + datasource='$datasource', + query='30s,5m,1h', + current='5m', + hide='', + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: false, + text: '30s', + value: '30s', + }, + { + selected: true, + text: '5m', + value: '5m', + }, + { + selected: false, + text: '1h', + value: '1h', + }, + ], + }; + + local intervalTemplate = + template.new( + name='interval', + datasource='$datasource', + query='4h', + current='5m', + hide=2, + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: true, + text: '4h', + value: '4h', + }, + ], + }; + + //##### Current Bandwidth Row ###### + + local currentBandwidthRow = + row.new( + title='Current Bandwidth' + ); + + //##### Average Bandwidth Row ###### + + local averageBandwidthRow = + row.new( + title='Average Bandwidth', + collapse=true, + ); + + //##### Bandwidth History Row ###### + + local bandwidthHistoryRow = + row.new( + title='Bandwidth HIstory', + ); + + //##### Packet Row ###### + // collapsed, so row must include panels + local packetRow = + row.new( + title='Packets', + collapse=true, + ); + + //##### Error Row ###### + // collapsed, so row must include panels + local errorRow = + row.new( + title='Errors', + collapse=true, + ); + + dashboard.new( + title='%(dashboardNamePrefix)sNetworking / Namespace (Workload)' % $._config.grafanaK8s, + tags=($._config.grafanaK8s.dashboardTags), + editable=true, + schemaVersion=18, + refresh='30s', + time_from='now-1h', + time_to='now', + ) + .addTemplate( + { + current: { + text: 'default', + value: 'default', + }, + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addTemplate(namespaceTemplate) + .addTemplate(typeTemplate) + .addTemplate(resolutionTemplate) + .addTemplate(intervalTemplate) + .addAnnotation(annotation.default) + .addPanel(currentBandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 0 }) + .addPanel( + newBarplotPanel( + graphTitle='Current Rate of Bytes Received', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + legendFormat='{{ workload }}', + ), + gridPos={ h: 9, w: 12, x: 0, y: 1 } + ) + .addPanel( + newBarplotPanel( + graphTitle='Current Rate of Bytes Transmitted', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + legendFormat='{{ workload }}', + ), + gridPos={ h: 9, w: 12, x: 12, y: 1 } + ) + .addPanel( + newTablePanel( + tableTitle='Current Status', + colQueries=[ + ||| + sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(sum(irate(container_network_receive_packets_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ||| + sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ] + ), + gridPos={ h: 9, w: 24, x: 0, y: 10 } + ) + .addPanel( + averageBandwidthRow + .addPanel( + newBarplotPanel( + graphTitle='Average Rate of Bytes Received', + graphQuery=||| + sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + legendFormat='{{ workload }}', + ), + gridPos={ h: 9, w: 12, x: 0, y: 20 } + ) + .addPanel( + newBarplotPanel( + graphTitle='Average Rate of Bytes Transmitted', + graphQuery=||| + sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + legendFormat='{{ workload }}', + ), + gridPos={ h: 9, w: 12, x: 12, y: 20 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 19 }, + ) + .addPanel( + bandwidthHistoryRow, gridPos={ h: 1, w: 24, x: 0, y: 29 } + ) + .addPanel( + newGraphPanel( + graphTitle='Receive Bandwidth', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ), + gridPos={ h: 9, w: 12, x: 0, y: 38 } + ) + .addPanel( + newGraphPanel( + graphTitle='Transmit Bandwidth', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + ), + gridPos={ h: 9, w: 12, x: 12, y: 38 } + ) + .addPanel( + packetRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_packets_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 0, y: 40 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 12, y: 40 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 39 } + ) + .addPanel( + errorRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets Dropped', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 0, y: 41 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets Dropped', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 12, y: 41 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 40 } + ), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/pod-total.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/pod-total.libsonnet new file mode 100644 index 0000000..c5c7715 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/pod-total.libsonnet @@ -0,0 +1,341 @@ +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 annotation = grafana.annotation; +local singlestat = grafana.singlestat; +local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; +local numbersinglestat = promgrafonnet.numbersinglestat; +local gauge = promgrafonnet.gauge; + +{ + grafanaDashboards+:: { + + 'pod-total.json': + + local newGaugePanel(gaugeTitle, gaugeQuery) = + local target = + prometheus.target( + gaugeQuery + ) + { + instant: null, + intervalFactor: 1, + }; + + singlestat.new( + title=gaugeTitle, + datasource='$datasource', + format='time_series', + height=9, + span=12, + min_span=12, + decimals=0, + valueName='current' + ).addTarget(target) + { + timeFrom: null, + timeShift: null, + type: 'gauge', + options: { + fieldOptions: { + calcs: [ + 'last', + ], + defaults: { + max: 10000000000, // 10GBs + min: 0, + title: '$namespace: $pod', + unit: 'Bps', + }, + mappings: [], + override: {}, + thresholds: [ + { + color: 'dark-green', + index: 0, + value: null, // 0GBs + }, + { + color: 'dark-yellow', + index: 1, + value: 5000000000, // 5GBs + }, + { + color: 'dark-red', + index: 2, + value: 7000000000, // 7GBs + }, + ], + values: false, + }, + }, + }; + + local newGraphPanel(graphTitle, graphQuery, graphFormat='Bps') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: '{{pod}}', + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=12, + datasource='$datasource', + fill=2, + linewidth=2, + min_span=12, + format=graphFormat, + min=0, + max=null, + x_axis_mode='time', + x_axis_values='total', + lines=true, + stack=true, + legend_show=true, + nullPointMode='connected' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local namespaceTemplate = + template.new( + name='namespace', + datasource='$datasource', + query='label_values(container_network_receive_packets_total, namespace)', + allValues='.+', + current='kube-system', + hide='', + refresh=1, + includeAll=true, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(container_network_receive_packets_total, namespace)', + skipUrlSync: false, + }; + + local podTemplate = + template.new( + name='pod', + datasource='$datasource', + query='label_values(container_network_receive_packets_total{namespace=~"$namespace"}, pod)', + allValues='.+', + current='', + hide='', + refresh=1, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(container_network_receive_packets_total{namespace=~"$namespace"}, pod)', + skipUrlSync: false, + }; + + local resolutionTemplate = + template.new( + name='resolution', + datasource='$datasource', + query='30s,5m,1h', + current='5m', + hide='', + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: false, + text: '30s', + value: '30s', + }, + { + selected: true, + text: '5m', + value: '5m', + }, + { + selected: false, + text: '1h', + value: '1h', + }, + ], + }; + + local intervalTemplate = + template.new( + name='interval', + datasource='$datasource', + query='4h', + current='5m', + hide=2, + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: true, + text: '4h', + value: '4h', + }, + ], + }; + + //##### Current Bandwidth Row ###### + + local currentBandwidthRow = + row.new( + title='Current Bandwidth' + ); + + //##### Bandwidth Row ###### + + local bandwidthRow = + row.new( + title='Bandwidth' + ); + + //##### Packet Row ###### + // collapsed, so row must include panels + local packetRow = + row.new( + title='Packets', + collapse=true, + ); + + //##### Error Row ###### + // collapsed, so row must include panels + local errorRow = + row.new( + title='Errors', + collapse=true, + ); + + dashboard.new( + title='%(dashboardNamePrefix)sNetworking / Pod' % $._config.grafanaK8s, + tags=($._config.grafanaK8s.dashboardTags), + editable=true, + schemaVersion=18, + refresh='30s', + time_from='now-1h', + time_to='now', + ) + .addTemplate( + { + current: { + text: 'default', + value: 'default', + }, + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addTemplate(namespaceTemplate) + .addTemplate(podTemplate) + .addTemplate(resolutionTemplate) + .addTemplate(intervalTemplate) + .addAnnotation(annotation.default) + .addPanel(currentBandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 0 }) + .addPanel( + newGaugePanel( + gaugeTitle='Current Rate of Bytes Received', + gaugeQuery='sum(irate(container_network_receive_bytes_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution]))' + ), + gridPos={ h: 9, w: 12, x: 0, y: 1 } + ) + .addPanel( + newGaugePanel( + gaugeTitle='Current Rate of Bytes Transmitted', + gaugeQuery='sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution]))' + ), + gridPos={ h: 9, w: 12, x: 12, y: 1 } + ) + .addPanel(bandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 10 }) + .addPanel( + newGraphPanel( + graphTitle='Receive Bandwidth', + graphQuery='sum(irate(container_network_receive_bytes_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution])) by (pod)' + ), + gridPos={ h: 9, w: 12, x: 0, y: 11 } + ) + .addPanel( + newGraphPanel( + graphTitle='Transmit Bandwidth', + graphQuery='sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution])) by (pod)' + ), + gridPos={ h: 9, w: 12, x: 12, y: 11 } + ) + .addPanel( + packetRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets', + graphQuery='sum(irate(container_network_receive_packets_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 0, y: 21 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets', + graphQuery='sum(irate(container_network_transmit_packets_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 12, y: 21 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 20 } + ) + .addPanel( + errorRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets Dropped', + graphQuery='sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 0, y: 32 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets Dropped', + graphQuery='sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace", pod=~"$pod"}[$interval:$resolution])) by (pod)', + graphFormat='pps' + ), + gridPos={ h: 10, w: 12, x: 12, y: 32 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 21 } + ), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/workload-total.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/workload-total.libsonnet new file mode 100644 index 0000000..0ac399e --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/network-usage/workload-total.libsonnet @@ -0,0 +1,421 @@ +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 annotation = grafana.annotation; +local singlestat = grafana.singlestat; +local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; +local numbersinglestat = promgrafonnet.numbersinglestat; +local gauge = promgrafonnet.gauge; + +{ + grafanaDashboards+:: { + + 'workload-total.json': + + local newBarplotPanel(graphTitle, graphQuery, graphFormat='Bps', legendFormat='{{namespace}}') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: legendFormat, + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=24, + datasource='$datasource', + fill=2, + min_span=24, + format=graphFormat, + min=0, + max=null, + show_xaxis=false, + x_axis_mode='series', + x_axis_values='current', + lines=false, + bars=true, + stack=false, + legend_show=true, + legend_values=true, + legend_min=false, + legend_max=false, + legend_current=true, + legend_avg=false, + legend_alignAsTable=true, + legend_rightSide=true, + legend_sort='current', + legend_sortDesc=true, + nullPointMode='null' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local newGraphPanel(graphTitle, graphQuery, graphFormat='Bps') = + local target = + prometheus.target( + graphQuery + ) + { + intervalFactor: 1, + legendFormat: '{{pod}}', + step: 10, + }; + + graphPanel.new( + title=graphTitle, + span=12, + datasource='$datasource', + fill=2, + linewidth=2, + min_span=12, + format=graphFormat, + min=0, + max=null, + x_axis_mode='time', + x_axis_values='total', + lines=true, + stack=true, + legend_show=true, + nullPointMode='connected' + ).addTarget(target) + { + legend+: { + hideEmpty: true, + hideZero: true, + }, + paceLength: 10, + tooltip+: { + sort: 2, + }, + }; + + local namespaceTemplate = + template.new( + name='namespace', + datasource='$datasource', + query='label_values(container_network_receive_packets_total, namespace)', + allValues='.+', + current='kube-system', + hide='', + refresh=1, + includeAll=true, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(container_network_receive_packets_total, namespace)', + skipUrlSync: false, + }; + + local workloadTemplate = + template.new( + name='workload', + datasource='$datasource', + query='label_values(mixin_pod_workload{namespace=~"$namespace"}, workload)', + current='', + hide='', + refresh=1, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(mixin_pod_workload{namespace=~"$namespace"}, workload)', + skipUrlSync: false, + }; + + local typeTemplate = + template.new( + name='type', + datasource='$datasource', + query='label_values(mixin_pod_workload{namespace=~"$namespace", workload=~"$workload"}, workload_type)', + current='deployment', + hide='', + refresh=1, + includeAll=false, + sort=0 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(mixin_pod_workload{namespace=~"$namespace", workload=~"$workload"}, workload_type)', + skipUrlSync: false, + }; + + local resolutionTemplate = + template.new( + name='resolution', + datasource='$datasource', + query='30s,5m,1h', + current='5m', + hide='', + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: false, + text: '30s', + value: '30s', + }, + { + selected: true, + text: '5m', + value: '5m', + }, + { + selected: false, + text: '1h', + value: '1h', + }, + ], + }; + + local intervalTemplate = + template.new( + name='interval', + datasource='$datasource', + query='4h', + current='5m', + hide=2, + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: true, + text: '4h', + value: '4h', + }, + ], + }; + + //##### Current Bandwidth Row ###### + + local currentBandwidthRow = + row.new( + title='Current Bandwidth' + ); + + //##### Average Bandwidth Row ###### + + local averageBandwidthRow = + row.new( + title='Average Bandwidth', + collapse=true, + ); + + //##### Bandwidth History Row ###### + + local bandwidthHistoryRow = + row.new( + title='Bandwidth HIstory', + ); + + //##### Packet Row ###### + // collapsed, so row must include panels + local packetRow = + row.new( + title='Packets', + collapse=true, + ); + + //##### Error Row ###### + // collapsed, so row must include panels + local errorRow = + row.new( + title='Errors', + collapse=true, + ); + + dashboard.new( + title='%(dashboardNamePrefix)sNetworking / Workload' % $._config.grafanaK8s, + tags=($._config.grafanaK8s.dashboardTags), + editable=true, + schemaVersion=18, + refresh='30s', + time_from='now-1h', + time_to='now', + ) + .addTemplate( + { + current: { + text: 'default', + value: 'default', + }, + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addTemplate(namespaceTemplate) + .addTemplate(workloadTemplate) + .addTemplate(typeTemplate) + .addTemplate(resolutionTemplate) + .addTemplate(intervalTemplate) + .addAnnotation(annotation.default) + .addPanel(currentBandwidthRow, gridPos={ h: 1, w: 24, x: 0, y: 0 }) + .addPanel( + newBarplotPanel( + graphTitle='Current Rate of Bytes Received', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + legendFormat='{{ pod }}', + ), + gridPos={ h: 9, w: 12, x: 0, y: 1 } + ) + .addPanel( + newBarplotPanel( + graphTitle='Current Rate of Bytes Transmitted', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + legendFormat='{{ pod }}', + ), + gridPos={ h: 9, w: 12, x: 12, y: 1 } + ) + .addPanel( + averageBandwidthRow + .addPanel( + newBarplotPanel( + graphTitle='Average Rate of Bytes Received', + graphQuery=||| + sort_desc(avg(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + legendFormat='{{ pod }}', + ), + gridPos={ h: 9, w: 12, x: 0, y: 11 } + ) + .addPanel( + newBarplotPanel( + graphTitle='Average Rate of Bytes Transmitted', + graphQuery=||| + sort_desc(avg(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + legendFormat='{{ pod }}', + ), + gridPos={ h: 9, w: 12, x: 12, y: 11 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 10 }, + ) + .addPanel( + bandwidthHistoryRow, gridPos={ h: 1, w: 24, x: 0, y: 11 } + ) + .addPanel( + newGraphPanel( + graphTitle='Receive Bandwidth', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + ), + gridPos={ h: 9, w: 12, x: 0, y: 12 } + ) + .addPanel( + newGraphPanel( + graphTitle='Transmit Bandwidth', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + ), + gridPos={ h: 9, w: 12, x: 12, y: 12 } + ) + .addPanel( + packetRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_packets_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 0, y: 22 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_packets_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 12, y: 22 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 21 } + ) + .addPanel( + errorRow + .addPanel( + newGraphPanel( + graphTitle='Rate of Received Packets Dropped', + graphQuery=||| + sort_desc(sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 0, y: 23 } + ) + .addPanel( + newGraphPanel( + graphTitle='Rate of Transmitted Packets Dropped', + graphQuery=||| + sort_desc(sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace"}[$interval:$resolution]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{namespace=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + |||, + graphFormat='pps' + ), + gridPos={ h: 9, w: 12, x: 12, y: 23 } + ), + gridPos={ h: 1, w: 24, x: 0, y: 22 } + ), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/network.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/network.libsonnet new file mode 100644 index 0000000..5d992e4 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/network.libsonnet @@ -0,0 +1,5 @@ +(import 'network-usage/cluster-total.libsonnet') + +(import 'network-usage/namespace-by-workload.libsonnet') + +(import 'network-usage/namespace-by-pod.libsonnet') + +(import 'network-usage/pod-total.libsonnet') + +(import 'network-usage/workload-total.libsonnet') diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/persistentvolumesusage.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/persistentvolumesusage.libsonnet new file mode 100644 index 0000000..0e98bf6 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/persistentvolumesusage.libsonnet @@ -0,0 +1,171 @@ +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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .addTemplate( + template.new( + 'namespace', + '$datasource', + 'label_values(kubelet_volume_stats_capacity_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s}, namespace)' % $._config, + label='Namespace', + refresh='time', + sort=1, + ) + ) + .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', + sort=1, + ) + ) + .addRow( + row.new() + .addPanel(sizeGraph) + .addPanel(sizeGauge) + ) + .addRow( + row.new() + .addPanel(inodesGraph) + .addPanel(inodeGauge) + ), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/pods.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/pods.libsonnet new file mode 100644 index 0000000..f3ea9fa --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/pods.libsonnet @@ -0,0 +1,195 @@ +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_working_set_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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .addTemplate( + template.new( + 'namespace', + '$datasource', + 'label_values(kube_pod_info{%(clusterLabel)s="$cluster"}, namespace)' % $._config, + label='Namespace', + refresh='time', + sort=1, + ) + ) + .addTemplate( + template.new( + 'pod', + '$datasource', + 'label_values(kube_pod_info{%(clusterLabel)s="$cluster", namespace=~"$namespace"}, pod)' % $._config, + label='Pod', + refresh='time', + sort=1, + ) + ) + .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, + sort=1, + ) + ) + .addAnnotation(restartAnnotation) + .addRow(memoryRow) + .addRow(cpuRow) + .addRow(networkRow) + .addRow(restartsRow), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/proxy.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/proxy.libsonnet new file mode 100644 index 0000000..0739f25 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/proxy.libsonnet @@ -0,0 +1,191 @@ +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: 'default', + value: 'default', + }, + 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, + sort=1, + ) + ) + .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/monitoring/vendor/kubernetes-mixin/dashboards/resources.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/resources.libsonnet new file mode 100644 index 0000000..3501ccd --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/resources.libsonnet @@ -0,0 +1,1352 @@ +local g = import 'grafana-builder/grafana.libsonnet'; +local grafana = import 'grafonnet/grafana.libsonnet'; +local template = grafana.template; + +{ + grafanaDashboards+:: { + + local intervalTemplate = + template.new( + name='interval', + datasource='$datasource', + query='4h', + current='5m', + hide=2, + refresh=2, + includeAll=false, + sort=1 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + skipUrlSync: false, + type: 'interval', + options: [ + { + selected: true, + text: '4h', + value: '4h', + }, + ], + }, + + local typeTemplate = + template.new( + name='type', + datasource='$datasource', + query='label_values(mixin_pod_workload{namespace=~"$namespace", workload=~".+"}, workload_type)', + current='deployment', + hide='', + refresh=1, + includeAll=false, + sort=0 + ) + { + auto: false, + auto_count: 30, + auto_min: '10s', + definition: 'label_values(mixin_pod_workload{namespace=~"$namespace", workload=~".+"}, workload_type)', + skipUrlSync: false, + }, + + '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, + ]; + + local networkColumns = [ + 'sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, + 'sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, + 'sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, + 'sum(irate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, + 'sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, + 'sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, + ]; + + local networkTableStyles = { + 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: 'Current Receive Bandwidth', + unit: 'Bps', + }, + 'Value #B': { + alias: 'Current Transmit Bandwidth', + unit: 'Bps', + }, + 'Value #C': { + alias: 'Rate of Received Packets', + unit: 'pps', + }, + 'Value #D': { + alias: 'Rate of Transmitted Packets', + unit: 'pps', + }, + 'Value #E': { + alias: 'Rate of Received Packets Dropped', + unit: 'pps', + }, + 'Value #F': { + alias: 'Rate of Transmitted Packets Dropped', + unit: 'pps', + }, + }; + + 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_MemAvailable_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(node_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(node_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(node_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(node_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' }, + }) + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Current Network Usage') + + g.tablePanel( + networkColumns, + networkTableStyles + ), + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Receive Bandwidth') + + g.queryPanel('sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Transmit Bandwidth') + + g.queryPanel('sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Average Container Bandwidth by Namespace: Received') + + g.queryPanel('avg(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Average Container Bandwidth by Namespace: Transmitted') + + g.queryPanel('avg(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets') + + g.queryPanel('sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets') + + g.queryPanel('sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets Dropped') + + g.queryPanel('sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets Dropped') + + g.queryPanel('sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~".+"}[$interval])) by (namespace)' % $._config, '{{namespace}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + { tags: $._config.grafanaK8s.dashboardTags, templating+: { list+: [intervalTemplate] } }, + + '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') }, + }, + }; + + local networkColumns = [ + 'sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, + 'sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, + 'sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, + 'sum(irate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, + 'sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, + 'sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, + ]; + + local networkTableStyles = { + 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') }, + linkTooltip: 'Drill down to pods', + }, + 'Value #A': { + alias: 'Current Receive Bandwidth', + unit: 'Bps', + }, + 'Value #B': { + alias: 'Current Transmit Bandwidth', + unit: 'Bps', + }, + 'Value #C': { + alias: 'Rate of Received Packets', + unit: 'pps', + }, + 'Value #D': { + alias: 'Rate of Transmitted Packets', + unit: 'pps', + }, + 'Value #E': { + alias: 'Rate of Received Packets Dropped', + unit: 'pps', + }, + 'Value #F': { + alias: 'Rate of Transmitted Packets Dropped', + unit: 'pps', + }, + }; + + 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(node_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(node_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(node_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(node_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 above, 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' }, + }) + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Current Network Usage') + + g.tablePanel( + networkColumns, + networkTableStyles + ), + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Receive Bandwidth') + + g.queryPanel('sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Transmit Bandwidth') + + g.queryPanel('sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets') + + g.queryPanel('sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets') + + g.queryPanel('sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets Dropped') + + g.queryPanel('sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets Dropped') + + g.queryPanel('sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval])) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + { tags: $._config.grafanaK8s.dashboardTags, templating+: { list+: [intervalTemplate] } }, + + 'k8s-resources-node.json': + local tableStyles = { + pod: { + alias: 'Pod', + }, + }; + + g.dashboard( + '%(dashboardNamePrefix)sCompute Resources / Node (Pods)' % $._config.grafanaK8s, + uid=($._config.grafanaDashboardIDs['k8s-resources-node.json']), + ).addTemplate('cluster', 'kube_pod_info', $._config.clusterLabel, hide=if $._config.showMultiCluster then 0 else 2) + .addTemplate('node', 'kube_pod_info{%(clusterLabel)s="$cluster"}' % $._config, 'node') + .addRow( + g.row('CPU Usage') + .addPanel( + g.panel('CPU Usage') + + g.queryPanel('sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, '{{pod}}') + + g.stack, + ) + ) + .addRow( + g.row('CPU Quota') + .addPanel( + g.panel('CPU Quota') + + g.tablePanel([ + 'sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, + 'sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", node="$node"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, + 'sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", node="$node"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster", node="$node"}) 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 above, without page cache + g.queryPanel('sum(node_namespace_pod_container:container_memory_working_set_bytes{%(clusterLabel)s="$cluster", node="$node", container!=""}) by (pod)' % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('bytes') }, + ) + ) + .addRow( + g.row('Memory Quota') + .addPanel( + g.panel('Memory Quota') + + g.tablePanel([ + 'sum(node_namespace_pod_container:container_memory_working_set_bytes{%(clusterLabel)s="$cluster", node="$node",container!=""}) by (pod)' % $._config, + 'sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_memory_working_set_bytes{%(clusterLabel)s="$cluster", node="$node",container!=""}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{node="$node"}) by (pod)' % $._config, + 'sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster", node="$node"}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_memory_working_set_bytes{%(clusterLabel)s="$cluster", node="$node",container!=""}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{node="$node"}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_memory_rss{%(clusterLabel)s="$cluster", node="$node",container!=""}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_memory_cache{%(clusterLabel)s="$cluster", node="$node",container!=""}) by (pod)' % $._config, + 'sum(node_namespace_pod_container:container_memory_swap{%(clusterLabel)s="$cluster", node="$node",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 networkColumns = [ + ||| + (sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload_type="$type"}) by (workload)) + ||| % $._config, + ||| + (sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload_type="$type"}) by (workload)) + ||| % $._config, + ||| + (sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload_type="$type"}) by (workload)) + ||| % $._config, + ||| + (sum(irate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload_type="$type"}) by (workload)) + ||| % $._config, + ||| + (sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload_type="$type"}) by (workload)) + ||| % $._config, + ||| + (sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload_type="$type"}) by (workload)) + ||| % $._config, + ]; + + local networkTableStyles = { + 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=$type' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-workload.json') }, + linkTooltip: 'Drill down to pods', + }, + workload_type: { + alias: 'Workload Type', + }, + 'Value #A': { + alias: 'Current Receive Bandwidth', + unit: 'Bps', + }, + 'Value #B': { + alias: 'Current Transmit Bandwidth', + unit: 'Bps', + }, + 'Value #C': { + alias: 'Rate of Received Packets', + unit: 'pps', + }, + 'Value #D': { + alias: 'Rate of Transmitted Packets', + unit: 'pps', + }, + 'Value #E': { + alias: 'Rate of Received Packets Dropped', + unit: 'pps', + }, + 'Value #F': { + alias: 'Rate of Transmitted Packets Dropped', + unit: 'pps', + }, + }; + + local cpuUsageQuery = ||| + sum( + node_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_type="$type"} + ) 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", workload_type="$type"} + ) by (workload, workload_type) + ||| % $._config; + + local podCountQuery = 'count(mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace", workload_type="$type"}) 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", workload_type="$type"} + ) 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' }, + }) + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Current Network Usage') + + g.tablePanel( + networkColumns, + networkTableStyles + ), + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Receive Bandwidth') + + g.queryPanel(||| + (sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Transmit Bandwidth') + + g.queryPanel(||| + (sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Average Container Bandwidth by Workload: Received') + + g.queryPanel(||| + (avg(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Average Container Bandwidth by Workload: Transmitted') + + g.queryPanel(||| + (avg(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets') + + g.queryPanel(||| + (sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets') + + g.queryPanel(||| + (sum(irate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets Dropped') + + g.queryPanel(||| + (sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets Dropped') + + g.queryPanel(||| + (sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~".+", workload_type="$type"}) by (workload)) + ||| % $._config, '{{workload}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + { tags: $._config.grafanaK8s.dashboardTags, templating+: { list+: [intervalTemplate, typeTemplate] } }, + + '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 networkColumns = [ + ||| + (sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, + ||| + (sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, + ||| + (sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, + ||| + (sum(irate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, + ||| + (sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, + ||| + (sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, + ]; + + local networkTableStyles = { + 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') }, + }, + 'Value #A': { + alias: 'Current Receive Bandwidth', + unit: 'Bps', + }, + 'Value #B': { + alias: 'Current Transmit Bandwidth', + unit: 'Bps', + }, + 'Value #C': { + alias: 'Rate of Received Packets', + unit: 'pps', + }, + 'Value #D': { + alias: 'Rate of Transmitted Packets', + unit: 'pps', + }, + 'Value #E': { + alias: 'Rate of Received Packets Dropped', + unit: 'pps', + }, + 'Value #F': { + alias: 'Rate of Transmitted Packets Dropped', + unit: 'pps', + }, + }; + + + local cpuUsageQuery = ||| + sum( + node_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' }, + }) + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Current Network Usage') + + g.tablePanel( + networkColumns, + networkTableStyles + ), + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Receive Bandwidth') + + g.queryPanel(||| + (sum(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Transmit Bandwidth') + + g.queryPanel(||| + (sum(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Average Container Bandwidth by Pod: Received') + + g.queryPanel(||| + (avg(irate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Average Container Bandwidth by Pod: Transmitted') + + g.queryPanel(||| + (avg(irate(container_network_transmit_bytes_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets') + + g.queryPanel(||| + (sum(irate(container_network_receive_packets_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets') + + g.queryPanel(||| + (sum(irate(container_network_transmit_packets_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets Dropped') + + g.queryPanel(||| + (sum(irate(container_network_receive_packets_dropped_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets Dropped') + + g.queryPanel(||| + (sum(irate(container_network_transmit_packets_dropped_total{%(clusterLabel)s="$cluster", namespace=~"$namespace"}[$interval]) + * on (namespace,pod) + group_left(workload,workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", %(namespaceLabel)s=~"$namespace", workload=~"$workload", workload_type="$type"}) by (pod)) + ||| % $._config, '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + { tags: $._config.grafanaK8s.dashboardTags, templating+: { list+: [intervalTemplate] } }, + + '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(node_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(node_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(node_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(node_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' }, + }) + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Receive Bandwidth') + + g.queryPanel('sum(irate(container_network_receive_bytes_total{namespace=~"$namespace", pod=~"$pod"}[$interval])) by (pod)', '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Transmit Bandwidth') + + g.queryPanel('sum(irate(container_network_transmit_bytes_total{namespace=~"$namespace", pod=~"$pod"}[$interval])) by (pod)', '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets') + + g.queryPanel('sum(irate(container_network_receive_packets_total{namespace=~"$namespace", pod=~"$pod"}[$interval])) by (pod)', '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets') + + g.queryPanel('sum(irate(container_network_transmit_packets_total{namespace=~"$namespace", pod=~"$pod"}[$interval])) by (pod)', '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Received Packets Dropped') + + g.queryPanel('sum(irate(container_network_receive_packets_dropped_total{namespace=~"$namespace", pod=~"$pod"}[$interval])) by (pod)', '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + .addRow( + g.row('Network') + .addPanel( + g.panel('Rate of Transmitted Packets Dropped') + + g.queryPanel('sum(irate(container_network_transmit_packets_dropped_total{namespace=~"$namespace", pod=~"$pod"}[$interval])) by (pod)', '{{pod}}') + + g.stack + + { yaxes: g.yaxes('Bps') }, + ) + ) + { tags: $._config.grafanaK8s.dashboardTags, templating+: { list+: [intervalTemplate] } }, + }, +} + { + 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_MemAvailable_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(node_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(node_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(node_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(node_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/monitoring/vendor/kubernetes-mixin/dashboards/scheduler.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/scheduler.libsonnet new file mode 100644 index 0000000..823ec3e --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/scheduler.libsonnet @@ -0,0 +1,175 @@ +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: 'default', + value: 'default', + }, + 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, + sort=1, + ) + ) + .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/monitoring/vendor/kubernetes-mixin/dashboards/statefulset.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/statefulset.libsonnet new file mode 100644 index 0000000..7f91cf8 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/statefulset.libsonnet @@ -0,0 +1,160 @@ +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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .addTemplate( + template.new( + 'namespace', + '$datasource', + 'label_values(kube_statefulset_metadata_generation{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster"}, namespace)' % $._config, + label='Namespace', + refresh='time', + sort=1, + ) + ) + .addTemplate( + template.new( + 'statefulset', + '$datasource', + 'label_values(kube_statefulset_metadata_generation{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace"}, statefulset)' % $._config, + label='Name', + refresh='time', + sort=1, + ) + ) + .addRow(overviewRow) + .addRow(statsRow) + .addRow(replicasRow), + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/dashboards/windows.libsonnet b/monitoring/vendor/kubernetes-mixin/dashboards/windows.libsonnet new file mode 100644 index 0000000..4d91687 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/dashboards/windows.libsonnet @@ -0,0 +1,566 @@ +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: 'default', + value: 'default', + }, + 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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .addTemplate( + template.new( + 'pod', + '$datasource', + 'label_values(windows_container_available{namespace="$namespace"}, pod)', + label='Pod', + refresh='time', + sort=1, + ) + ) + .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: 'default', + value: 'default', + }, + 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: 'default', + value: 'default', + }, + 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', + sort=1, + ) + ) + .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/monitoring/vendor/kubernetes-mixin/jsonnetfile.json b/monitoring/vendor/kubernetes-mixin/jsonnetfile.json new file mode 100644 index 0000000..dbda908 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/jsonnetfile.json @@ -0,0 +1,34 @@ +{ + "dependencies": [ + { + "name": "grafana-builder", + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs", + "subdir": "grafana-builder" + } + }, + "version": "master" + }, + { + "name": "grafonnet", + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet-lib", + "subdir": "grafonnet" + } + }, + "version": "master" + }, + { + "name": "slo-libsonnet", + "source": { + "git": { + "remote": "https://github.com/metalmatze/slo-libsonnet", + "subdir": "slo-libsonnet" + } + }, + "version": "master" + } + ] +} diff --git a/monitoring/vendor/kubernetes-mixin/lib/absent_alert.libsonnet b/monitoring/vendor/kubernetes-mixin/lib/absent_alert.libsonnet new file mode 100644 index 0000000..b556a57 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/absent_alert.libsonnet @@ -0,0 +1,17 @@ +{ + local absentAlert = self, + componentName:: error 'must provide component name', + selector:: error 'must provide selector for component', + + alert: '%sDown' % absentAlert.componentName, + expr: ||| + absent(up{%s} == 1) + ||| % absentAlert.selector, + 'for': '15m', + labels: { + severity: 'critical', + }, + annotations: { + message: '%s has disappeared from Prometheus target discovery.' % absentAlert.componentName, + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/lib/alerts.jsonnet b/monitoring/vendor/kubernetes-mixin/lib/alerts.jsonnet new file mode 100644 index 0000000..d396a38 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/alerts.jsonnet @@ -0,0 +1 @@ +std.manifestYamlDoc((import '../mixin.libsonnet').prometheusAlerts) diff --git a/monitoring/vendor/kubernetes-mixin/lib/dashboards.jsonnet b/monitoring/vendor/kubernetes-mixin/lib/dashboards.jsonnet new file mode 100644 index 0000000..dadaebe --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/dashboards.jsonnet @@ -0,0 +1,6 @@ +local dashboards = (import '../mixin.libsonnet').grafanaDashboards; + +{ + [name]: dashboards[name] + for name in std.objectFields(dashboards) +} diff --git a/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/gauge.libsonnet b/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/gauge.libsonnet new file mode 100644 index 0000000..abe7f85 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/gauge.libsonnet @@ -0,0 +1,60 @@ +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/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/numbersinglestat.libsonnet b/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/numbersinglestat.libsonnet new file mode 100644 index 0000000..771e4bd --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/numbersinglestat.libsonnet @@ -0,0 +1,48 @@ +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/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/promgrafonnet.libsonnet b/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/promgrafonnet.libsonnet new file mode 100644 index 0000000..8b74e36 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/promgrafonnet/promgrafonnet.libsonnet @@ -0,0 +1,4 @@ +{ + numbersinglestat:: import 'numbersinglestat.libsonnet', + gauge:: import 'gauge.libsonnet', +} diff --git a/monitoring/vendor/kubernetes-mixin/lib/rules.jsonnet b/monitoring/vendor/kubernetes-mixin/lib/rules.jsonnet new file mode 100644 index 0000000..2d7fa91 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/rules.jsonnet @@ -0,0 +1 @@ +std.manifestYamlDoc((import '../mixin.libsonnet').prometheusRules) diff --git a/monitoring/vendor/kubernetes-mixin/lib/utils.libsonnet b/monitoring/vendor/kubernetes-mixin/lib/utils.libsonnet new file mode 100644 index 0000000..700ada9 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/lib/utils.libsonnet @@ -0,0 +1,13 @@ +{ + mapRuleGroups(f): { + groups: [ + group { + rules: [ + f(rule) + for rule in super.rules + ], + } + for group in super.groups + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/mixin.libsonnet b/monitoring/vendor/kubernetes-mixin/mixin.libsonnet new file mode 100644 index 0000000..152721d --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/mixin.libsonnet @@ -0,0 +1,4 @@ +(import 'alerts/alerts.libsonnet') + +(import 'dashboards/dashboards.libsonnet') + +(import 'rules/rules.libsonnet') + +(import 'config.libsonnet') diff --git a/monitoring/vendor/kubernetes-mixin/rules/apps.libsonnet b/monitoring/vendor/kubernetes-mixin/rules/apps.libsonnet new file mode 100644 index 0000000..fca2e83 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/rules/apps.libsonnet @@ -0,0 +1,141 @@ +{ + _config+:: { + cadvisorSelector: 'job="cadvisor"', + kubeStateMetricsSelector: 'job="kube-state-metrics"', + }, + + 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: 'node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate', + expr: ||| + sum by (%(clusterLabel)s, namespace, pod, container) ( + rate(container_cpu_usage_seconds_total{%(cadvisorSelector)s, image!="", container!="POD"}[5m]) + ) * on (%(clusterLabel)s, namespace, pod) group_left(node) max by(%(clusterLabel)s, namespace, pod, node) (kube_pod_info) + ||| % $._config, + }, + { + record: 'node_namespace_pod_container:container_memory_working_set_bytes', + expr: ||| + container_memory_working_set_bytes{%(cadvisorSelector)s, image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + ||| % $._config, + }, + { + record: 'node_namespace_pod_container:container_memory_rss', + expr: ||| + container_memory_rss{%(cadvisorSelector)s, image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + ||| % $._config, + }, + { + record: 'node_namespace_pod_container:container_memory_cache', + expr: ||| + container_memory_cache{%(cadvisorSelector)s, image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + ||| % $._config, + }, + { + record: 'node_namespace_pod_container:container_memory_swap', + expr: ||| + container_memory_swap{%(cadvisorSelector)s, image!=""} + * on (namespace, pod) group_left(node) max by(namespace, pod, node) (kube_pod_info) + ||| % $._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) ( + sum by (namespace, pod) ( + max by (namespace, pod, container) ( + kube_pod_container_resource_requests_memory_bytes{%(kubeStateMetricsSelector)s} + ) * on(namespace, pod) group_left() max by (namespace, pod) ( + kube_pod_status_phase{phase=~"Pending|Running"} == 1 + ) + ) + ) + ||| % $._config, + }, + { + record: 'namespace:kube_pod_container_resource_requests_cpu_cores:sum', + expr: ||| + sum by (namespace) ( + sum by (namespace, pod) ( + max by (namespace, pod, container) ( + kube_pod_container_resource_requests_cpu_cores{%(kubeStateMetricsSelector)s} + ) * on(namespace, pod) group_left() max by (namespace, pod) ( + kube_pod_status_phase{phase=~"Pending|Running"} == 1 + ) + ) + ) + ||| % $._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 (%(clusterLabel)s, 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 (%(clusterLabel)s, 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 (%(clusterLabel)s, namespace, workload, pod) + ||| % $._config, + labels: { + workload_type: 'statefulset', + }, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/rules/kube_apiserver.libsonnet b/monitoring/vendor/kubernetes-mixin/rules/kube_apiserver.libsonnet new file mode 100644 index 0000000..aee888e --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/rules/kube_apiserver.libsonnet @@ -0,0 +1,35 @@ +{ + _config+:: { + kubeApiserverSelector: 'job="kube-apiserver"', + podLabel: 'pod', + }, + + prometheusRules+:: { + groups+: [ + { + name: 'kube-apiserver.rules', + rules: [ + { + record: 'cluster:apiserver_request_duration_seconds:mean5m', + expr: ||| + sum(rate(apiserver_request_duration_seconds_sum{subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, %(podLabel)s) + / + sum(rate(apiserver_request_duration_seconds_count{subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, %(podLabel)s) + ||| % ($._config), + }, + ] + [ + { + record: 'cluster_quantile:apiserver_request_duration_seconds:histogram_quantile', + expr: ||| + histogram_quantile(%(quantile)s, sum(rate(apiserver_request_duration_seconds_bucket{%(kubeApiserverSelector)s,subresource!="log",verb!~"LIST|WATCH|WATCHLIST|PROXY|CONNECT"}[5m])) without(instance, %(podLabel)s)) + ||| % ({ quantile: quantile } + $._config), + labels: { + quantile: quantile, + }, + } + for quantile in ['0.99', '0.9', '0.5'] + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/rules/kube_scheduler.libsonnet b/monitoring/vendor/kubernetes-mixin/rules/kube_scheduler.libsonnet new file mode 100644 index 0000000..f319642 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/rules/kube_scheduler.libsonnet @@ -0,0 +1,31 @@ +{ + _config+:: { + kubeSchedulerSelector: 'job="kube-scheduler"', + podLabel: 'pod', + }, + + prometheusRules+:: { + groups+: [ + { + 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', + ] + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/rules/node.libsonnet b/monitoring/vendor/kubernetes-mixin/rules/node.libsonnet new file mode 100644 index 0000000..ad8fa70 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/rules/node.libsonnet @@ -0,0 +1,59 @@ +{ + _config+:: { + kubeStateMetricsSelector: 'job="kube-state-metrics"', + nodeExporterSelector: 'job="node-exporter"', + podLabel: 'pod', + }, + + prometheusRules+:: { + groups+: [ + { + 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 (%(clusterLabel)s, node)) + ||| % $._config, + }, + { + // 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 (%(clusterLabel)s, 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 Available memory, so we can aggregate across clusters in dashboards. + { + record: ':node_memory_MemAvailable_bytes:sum', + expr: ||| + sum( + node_memory_MemAvailable_bytes{%(nodeExporterSelector)s} or + ( + node_memory_Buffers_bytes{%(nodeExporterSelector)s} + + node_memory_Cached_bytes{%(nodeExporterSelector)s} + + node_memory_MemFree_bytes{%(nodeExporterSelector)s} + + node_memory_Slab_bytes{%(nodeExporterSelector)s} + ) + ) by (%(clusterLabel)s) + ||| % $._config, + }, + ], + }, + ], + }, +} diff --git a/monitoring/vendor/kubernetes-mixin/rules/rules.libsonnet b/monitoring/vendor/kubernetes-mixin/rules/rules.libsonnet new file mode 100644 index 0000000..874b423 --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/rules/rules.libsonnet @@ -0,0 +1,4 @@ +(import 'kube_apiserver.libsonnet') + +(import 'apps.libsonnet') + +(import 'kube_scheduler.libsonnet') + +(import 'node.libsonnet') diff --git a/monitoring/vendor/kubernetes-mixin/rules/windows.libsonnet b/monitoring/vendor/kubernetes-mixin/rules/windows.libsonnet new file mode 100644 index 0000000..cf1f6df --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/rules/windows.libsonnet @@ -0,0 +1,252 @@ +{ + 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/monitoring/vendor/kubernetes-mixin/runbook.md b/monitoring/vendor/kubernetes-mixin/runbook.md new file mode 100644 index 0000000..f92934d --- /dev/null +++ b/monitoring/vendor/kubernetes-mixin/runbook.md @@ -0,0 +1,136 @@ +# 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 | humanizePercentage }} of desired pods scheduled and ready for daemon set {{$labels.namespace}}/{{$labels.daemonset}}` ++ *Severity*: critical +##### Alert Name: "KubeContainerWaiting" ++ *Message*: `{{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container }}) is in waiting state.` ++ *Severity*: warning +##### 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*: `{{ $value | humanizePercentage }} 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 {{ $value | humanizePercentage }} 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 {{ $value | humanizePercentage }} 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 | humanizePercentage }} of requests.` ++ *Severity*: critical +##### Alert Name: "KubeAPIErrorsHigh" ++ *Message*: `API server is erroring for {{ $value | humanizePercentage }} 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/monitoring/vendor/node-mixin/.gitignore b/monitoring/vendor/node-mixin/.gitignore new file mode 100644 index 0000000..522b99f --- /dev/null +++ b/monitoring/vendor/node-mixin/.gitignore @@ -0,0 +1,4 @@ +jsonnetfile.lock.json +vendor +*.yaml +dashboards_out diff --git a/monitoring/vendor/node-mixin/Makefile b/monitoring/vendor/node-mixin/Makefile new file mode 100644 index 0000000..012a4b5 --- /dev/null +++ b/monitoring/vendor/node-mixin/Makefile @@ -0,0 +1,28 @@ +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/monitoring/vendor/node-mixin/README.md b/monitoring/vendor/node-mixin/README.md new file mode 100644 index 0000000..46981d6 --- /dev/null +++ b/monitoring/vendor/node-mixin/README.md @@ -0,0 +1,47 @@ +# Node Mixin + +_This is a 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 creates +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/monitoring/vendor/node-mixin/alerts.jsonnet b/monitoring/vendor/node-mixin/alerts.jsonnet new file mode 100644 index 0000000..75e7c1b --- /dev/null +++ b/monitoring/vendor/node-mixin/alerts.jsonnet @@ -0,0 +1 @@ +std.manifestYamlDoc((import 'mixin.libsonnet').prometheusAlerts) diff --git a/monitoring/vendor/node-mixin/alerts/alerts.libsonnet b/monitoring/vendor/node-mixin/alerts/alerts.libsonnet new file mode 100644 index 0000000..0cdc16e --- /dev/null +++ b/monitoring/vendor/node-mixin/alerts/alerts.libsonnet @@ -0,0 +1,191 @@ +{ + 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} * 100 < 40 + 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} * 100 < 20 + 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} * 100 < 40 + 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} * 100 < 20 + 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/monitoring/vendor/node-mixin/config.libsonnet b/monitoring/vendor/node-mixin/config.libsonnet new file mode 100644 index 0000000..fdea71d --- /dev/null +++ b/monitoring/vendor/node-mixin/config.libsonnet @@ -0,0 +1,40 @@ +{ + _config+:: { + // Selectors are inserted between {} in Prometheus queries. + + // Select the metrics coming from the node exporter. Note that all + // the selected metrics are shown stacked on top of each other in + // the 'USE Method / Cluster' dashboard. Consider disabling that + // dashboard if mixing up all those metrics in the same dashboard + // doesn't make sense (e.g. because they are coming from different + // clusters). + 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/monitoring/vendor/node-mixin/dashboards.jsonnet b/monitoring/vendor/node-mixin/dashboards.jsonnet new file mode 100644 index 0000000..9d913ed --- /dev/null +++ b/monitoring/vendor/node-mixin/dashboards.jsonnet @@ -0,0 +1,6 @@ +local dashboards = (import 'mixin.libsonnet').grafanaDashboards; + +{ + [name]: dashboards[name] + for name in std.objectFields(dashboards) +} diff --git a/monitoring/vendor/node-mixin/dashboards/dashboards.libsonnet b/monitoring/vendor/node-mixin/dashboards/dashboards.libsonnet new file mode 100644 index 0000000..e6adbd4 --- /dev/null +++ b/monitoring/vendor/node-mixin/dashboards/dashboards.libsonnet @@ -0,0 +1,2 @@ +(import 'node.libsonnet') + +(import 'use.libsonnet') diff --git a/monitoring/vendor/node-mixin/dashboards/node.libsonnet b/monitoring/vendor/node-mixin/dashboards/node.libsonnet new file mode 100644 index 0000000..78241ed --- /dev/null +++ b/monitoring/vendor/node-mixin/dashboards/node.libsonnet @@ -0,0 +1,254 @@ +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/monitoring/vendor/node-mixin/dashboards/use.libsonnet b/monitoring/vendor/node-mixin/dashboards/use.libsonnet new file mode 100644 index 0000000..3c855a6 --- /dev/null +++ b/monitoring/vendor/node-mixin/dashboards/use.libsonnet @@ -0,0 +1,275 @@ +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} + ) + / scalar(sum(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} + / scalar(count(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} + / scalar(count(instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s})) + ||| % $._config, '{{instance}}', legendLink) + + g.stack + + { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, + ) + .addPanel( + g.panel('Memory Saturation (Major Page Faults)') + + g.queryPanel('instance:node_vmstat_pgmajfault: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} + / scalar(count(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} + / scalar(count(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} + ) + ) + / scalar(sum(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 (Major Page Faults)') + + g.queryPanel('instance:node_vmstat_pgmajfault:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Major page faults') + + { + 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/monitoring/vendor/node-mixin/jsonnetfile.json b/monitoring/vendor/node-mixin/jsonnetfile.json new file mode 100644 index 0000000..dc92880 --- /dev/null +++ b/monitoring/vendor/node-mixin/jsonnetfile.json @@ -0,0 +1,34 @@ +{ + "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/monitoring/vendor/node-mixin/mixin.libsonnet b/monitoring/vendor/node-mixin/mixin.libsonnet new file mode 100644 index 0000000..b9831f9 --- /dev/null +++ b/monitoring/vendor/node-mixin/mixin.libsonnet @@ -0,0 +1,4 @@ +(import 'config.libsonnet') + +(import 'alerts/alerts.libsonnet') + +(import 'dashboards/dashboards.libsonnet') + +(import 'rules/rules.libsonnet') diff --git a/monitoring/vendor/node-mixin/rules.jsonnet b/monitoring/vendor/node-mixin/rules.jsonnet new file mode 100644 index 0000000..dbe13f4 --- /dev/null +++ b/monitoring/vendor/node-mixin/rules.jsonnet @@ -0,0 +1 @@ +std.manifestYamlDoc((import 'mixin.libsonnet').prometheusRules) diff --git a/monitoring/vendor/node-mixin/rules/rules.libsonnet b/monitoring/vendor/node-mixin/rules/rules.libsonnet new file mode 100644 index 0000000..6b396e3 --- /dev/null +++ b/monitoring/vendor/node-mixin/rules/rules.libsonnet @@ -0,0 +1,109 @@ +{ + 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_vmstat_pgmajfault:rate1m', + expr: ||| + rate(node_vmstat_pgmajfault{%(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/monitoring/vendor/prometheus-operator/.gitignore b/monitoring/vendor/prometheus-operator/.gitignore new file mode 100644 index 0000000..80243da --- /dev/null +++ b/monitoring/vendor/prometheus-operator/.gitignore @@ -0,0 +1,2 @@ +vendor/ +jsonnetfile.lock.json diff --git a/monitoring/vendor/prometheus-operator/alertmanager-crd.libsonnet b/monitoring/vendor/prometheus-operator/alertmanager-crd.libsonnet new file mode 100644 index 0000000..d0d25bb --- /dev/null +++ b/monitoring/vendor/prometheus-operator/alertmanager-crd.libsonnet @@ -0,0 +1 @@ +{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"alertmanagers.monitoring.coreos.com"},"spec":{"additionalPrinterColumns":[{"JSONPath":".spec.version","description":"The version of Alertmanager","name":"Version","type":"string"},{"JSONPath":".spec.replicas","description":"The desired replicas number of Alertmanagers","name":"Replicas","type":"integer"},{"JSONPath":".metadata.creationTimestamp","name":"Age","type":"date"}],"group":"monitoring.coreos.com","names":{"kind":"Alertmanager","listKind":"AlertmanagerList","plural":"alertmanagers","singular":"alertmanager"},"preserveUnknownFields":false,"scope":"Namespaced","subresources":{},"validation":{"openAPIV3Schema":{"description":"Alertmanager describes an Alertmanager cluster.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"type":"object"},"spec":{"description":"Specification of the desired behavior of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/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":"If specified, the pod's scheduling constraints.","properties":{"nodeAffinity":{"description":"Describes node affinity scheduling rules for the pod.","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 node selector term, associated with the corresponding weight.","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":["preference","weight"],"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 an update), the system may or may not try to eventually evict the pod from its node.","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":"Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).","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":"Required. A pod affinity term, associated with the corresponding weight.","properties":{"labelSelector":{"description":"A label query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":["podAffinityTerm","weight"],"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 query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":"Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).","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":"Required. A pod affinity term, associated with the corresponding weight.","properties":{"labelSelector":{"description":"A label query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":["podAffinityTerm","weight"],"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 query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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"},"configSecret":{"description":"ConfigSecret is the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains configuration for this Alertmanager instance. Defaults to 'alertmanager-\u003calertmanager-name\u003e' The secret is mounted into /etc/alertmanager/config.","type":"string"},"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":"Source for the environment variable's value. Cannot be used if value is not empty.","properties":{"configMapKeyRef":{"description":"Selects a key of 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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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.","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":"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.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","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"},"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":"The ConfigMap to select from","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"},"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":"The Secret to select from","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"},"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":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"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/","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.","properties":{"add":{"description":"Added capabilities","items":{"description":"Capability represent POSIX capabilities type","type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"description":"Capability represent POSIX capabilities type","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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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"},"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":["devicePath","name"],"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":["mountPath","name"],"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 TODO: Add other useful fields. apiVersion, kind, uid?","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":"Source for the environment variable's value. Cannot be used if value is not empty.","properties":{"configMapKeyRef":{"description":"Selects a key of 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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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.","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":"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.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","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"},"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":"The ConfigMap to select from","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"},"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":"The Secret to select from","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"},"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":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"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/","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.","properties":{"add":{"description":"Added capabilities","items":{"description":"Capability represent POSIX capabilities type","type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"description":"Capability represent POSIX capabilities type","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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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"},"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":["devicePath","name"],"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":["mountPath","name"],"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":{"additionalProperties":{"type":"string"},"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":"Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods.","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":"Define resources requests and limits for single Pods.","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"SecurityContext holds pod-level security attributes and common container settings. This defaults to the default 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 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---- \n If 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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName 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":"Storage is the definition of how storage will be used by the Alertmanager instances.","properties":{"emptyDir":{"description":"EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir","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","type":"string"}},"type":"object"},"volumeClaimTemplate":{"description":"A PVC spec to be used by the Prometheus StatefulSets.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","type":"object"},"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","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":"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.","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":"Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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 query over volumes to consider for binding.","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":{"additionalProperties":{"type":"string"},"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":"Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","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":{"additionalProperties":{"type":"string"},"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":"Last time we probed the condition.","format":"date-time","type":"string"},"lastTransitionTime":{"description":"Last time the condition transitioned from one status to another.","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":{"description":"PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type","type":"string"}},"required":["status","type"],"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":["mountPath","name"],"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":"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","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"CephFS represents a Ceph FS mount on the host that shares a pod's lifetime","properties":{"monitors":{"description":"Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","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"}},"type":"object"},"user":{"description":"Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"}},"required":["monitors"],"type":"object"},"cinder":{"description":"Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","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://examples.k8s.io/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://examples.k8s.io/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"Optional: points to a secret object containing parameters used to connect to OpenStack.","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"}},"type":"object"},"volumeID":{"description":"volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string"}},"required":["volumeID"],"type":"object"},"configMap":{"description":"ConfigMap represents a configMap that should populate this volume","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"csi":{"description":"CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).","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":"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.","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"}},"type":"object"},"readOnly":{"description":"Specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"additionalProperties":{"type":"string"},"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":"DownwardAPI represents downward API about the pod that should populate this volume","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":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","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":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"emptyDir":{"description":"EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","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","type":"string"}},"type":"object"},"fc":{"description":"FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.","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. TODO: how do we prevent errors in the filesystem from compromising the machine","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":{"additionalProperties":{"type":"string"},"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":"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.","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"}},"type":"object"}},"required":["driver"],"type":"object"},"flocker":{"description":"Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running","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":"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","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"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.","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":"Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md","properties":{"endpoints":{"description":"EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string"},"path":{"description":"Path is the Glusterfs volume path. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}},"required":["endpoints","path"],"type":"object"},"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 --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.","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":"ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"CHAP Secret for iSCSI target and initiator authentication","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"}},"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":["iqn","lun","targetPortal"],"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":"NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","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":["path","server"],"type":"object"},"persistentVolumeClaim":{"description":"PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","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":"PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine","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":"PortworxVolume represents a portworx volume attached and mounted on kubelets host machine","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":"Items for all in one resources secrets, configmaps, and downward API","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":"information about the configMap data to project","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"downwardAPI":{"description":"information about the downwardAPI data to project","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":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","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":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"secret":{"description":"information about the secret data to project","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"type":"object"},"serviceAccountToken":{"description":"information about the serviceAccountToken data to project","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":"Quobyte represents a Quobyte mount on the host that shares a pod's lifetime","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":"RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md","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 TODO: how do we prevent errors in the filesystem from compromising the machine","type":"string"},"image":{"description":"The rados image name. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"A collection of Ceph monitors. More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","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"}},"type":"object"},"user":{"description":"The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"}},"required":["image","monitors"],"type":"object"},"scaleIO":{"description":"ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.","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":"SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.","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"}},"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","secretRef","system"],"type":"object"},"secret":{"description":"Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","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":"StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.","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.","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"}},"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":"VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine","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":"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/sig-architecture/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":["availableReplicas","paused","replicas","unavailableReplicas","updatedReplicas"],"type":"object"}},"required":["spec"],"type":"object"}},"version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}} \ No newline at end of file diff --git a/monitoring/vendor/prometheus-operator/jsonnetfile.json b/monitoring/vendor/prometheus-operator/jsonnetfile.json new file mode 100644 index 0000000..c5b89fc --- /dev/null +++ b/monitoring/vendor/prometheus-operator/jsonnetfile.json @@ -0,0 +1,14 @@ +{ + "dependencies": [ + { + "name": "ksonnet", + "source": { + "git": { + "remote": "https://github.com/ksonnet/ksonnet-lib", + "subdir": "" + } + }, + "version": "master" + } + ] +} \ No newline at end of file diff --git a/monitoring/vendor/prometheus-operator/podmonitor-crd.libsonnet b/monitoring/vendor/prometheus-operator/podmonitor-crd.libsonnet new file mode 100644 index 0000000..c3bf8e1 --- /dev/null +++ b/monitoring/vendor/prometheus-operator/podmonitor-crd.libsonnet @@ -0,0 +1 @@ +{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"podmonitors.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"PodMonitor","listKind":"PodMonitorList","plural":"podmonitors","singular":"podmonitor"},"preserveUnknownFields":false,"scope":"Namespaced","validation":{"openAPIV3Schema":{"description":"PodMonitor defines monitoring 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"type":"object"},"spec":{"description":"Specification of desired Pod selection for target discovery by Prometheus.","properties":{"jobLabel":{"description":"The label to use to retrieve the job name from.","type":"string"},"namespaceSelector":{"description":"Selector to select which namespaces the Endpoints objects are discovered from.","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"},"honorTimestamps":{"description":"HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.","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. Default 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":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"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. Default 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":"integer"},{"type":"string"}],"description":"Name or number of the target port of the endpoint. Mutually exclusive with port.","x-kubernetes-int-or-string":true}},"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":"Selector to select Pod 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":{"additionalProperties":{"type":"string"},"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"}},"required":["spec"],"type":"object"}},"version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}} \ No newline at end of file diff --git a/monitoring/vendor/prometheus-operator/prometheus-crd.libsonnet b/monitoring/vendor/prometheus-operator/prometheus-crd.libsonnet new file mode 100644 index 0000000..33a6769 --- /dev/null +++ b/monitoring/vendor/prometheus-operator/prometheus-crd.libsonnet @@ -0,0 +1 @@ +{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"prometheuses.monitoring.coreos.com"},"spec":{"additionalPrinterColumns":[{"JSONPath":".spec.version","description":"The version of Prometheus","name":"Version","type":"string"},{"JSONPath":".spec.replicas","description":"The desired replicas number of Prometheuses","name":"Replicas","type":"integer"},{"JSONPath":".metadata.creationTimestamp","name":"Age","type":"date"}],"group":"monitoring.coreos.com","names":{"kind":"Prometheus","listKind":"PrometheusList","plural":"prometheuses","singular":"prometheus"},"preserveUnknownFields":false,"scope":"Namespaced","subresources":{},"validation":{"openAPIV3Schema":{"description":"Prometheus defines a Prometheus deployment.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"type":"object"},"spec":{"description":"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":"AdditionalAlertManagerConfigs allows specifying a key of a Secret containing additional Prometheus AlertManager configurations. AlertManager configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config. As AlertManager configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible AlertManager configs are going to break Prometheus after the upgrade.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"additionalAlertRelabelConfigs":{"description":"AdditionalAlertRelabelConfigs allows specifying a key of a Secret containing additional Prometheus alert relabel configurations. Alert relabel configurations specified are appended to the configurations generated by the Prometheus Operator. Alert relabel configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs. As alert relabel configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible alert relabel configs are going to break Prometheus after the upgrade.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"additionalScrapeConfigs":{"description":"AdditionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"affinity":{"description":"If specified, the pod's scheduling constraints.","properties":{"nodeAffinity":{"description":"Describes node affinity scheduling rules for the pod.","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 node selector term, associated with the corresponding weight.","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":["preference","weight"],"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 an update), the system may or may not try to eventually evict the pod from its node.","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":"Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).","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":"Required. A pod affinity term, associated with the corresponding weight.","properties":{"labelSelector":{"description":"A label query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":["podAffinityTerm","weight"],"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 query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":"Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).","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":"Required. A pod affinity term, associated with the corresponding weight.","properties":{"labelSelector":{"description":"A label query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":["podAffinityTerm","weight"],"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 query over a set of resources, in this case pods.","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":{"additionalProperties":{"type":"string"},"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":"Define details regarding alerting.","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":{"apiVersion":{"description":"Version of the Alertmanager API that Prometheus uses to send alerts. It can be \"v1\" or \"v2\".","type":"string"},"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":"integer"},{"type":"string"}],"description":"Port the Alertmanager API is exposed on.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use when firing alerts.","type":"string"},"tlsConfig":{"description":"TLS Config to use for alertmanager connection.","properties":{"ca":{"description":"Stuct containing the CA cert to use for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"caFile":{"description":"Path to the CA cert in the Prometheus container to use for the targets.","type":"string"},"cert":{"description":"Struct containing the client cert file for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"certFile":{"description":"Path to the client cert file in the Prometheus container for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"Path to the client key file in the Prometheus container for the targets.","type":"string"},"keySecret":{"description":"Secret containing the client key file for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"}},"required":["name","namespace","port"],"type":"object"},"type":"array"}},"required":["alertmanagers"],"type":"object"},"apiserverConfig":{"description":"APIServerConfig allows specifying a host and auth methods to access apiserver. If left empty, Prometheus is assumed to run inside of the cluster and will discover API servers automatically and use the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.","properties":{"basicAuth":{"description":"BasicAuth allow an endpoint to authenticate over basic authentication","properties":{"password":{"description":"The secret in the service monitor namespace that contains the password for authentication.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"The secret in the service monitor namespace that contains the username for authentication.","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"},"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":"TLS Config to use for accessing apiserver.","properties":{"ca":{"description":"Stuct containing the CA cert to use for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"caFile":{"description":"Path to the CA cert in the Prometheus container to use for the targets.","type":"string"},"cert":{"description":"Struct containing the client cert file for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"certFile":{"description":"Path to the client cert file in the Prometheus container for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"Path to the client key file in the Prometheus container for the targets.","type":"string"},"keySecret":{"description":"Secret containing the client key file for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"}},"required":["host"],"type":"object"},"arbitraryFSAccessThroughSMs":{"description":"ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files on the file system of the Prometheus container e.g. bearer token files.","properties":{"deny":{"type":"boolean"}},"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":"Source for the environment variable's value. Cannot be used if value is not empty.","properties":{"configMapKeyRef":{"description":"Selects a key of 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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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.","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":"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.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","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"},"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":"The ConfigMap to select from","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"},"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":"The Secret to select from","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"},"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":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"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/","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.","properties":{"add":{"description":"Added capabilities","items":{"description":"Capability represent POSIX capabilities type","type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"description":"Capability represent POSIX capabilities type","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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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"},"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":["devicePath","name"],"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":["mountPath","name"],"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"},"disableCompaction":{"description":"Disable prometheus compaction.","type":"boolean"},"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"},"enforcedNamespaceLabel":{"description":"EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.","type":"string"},"evaluationInterval":{"description":"Interval between consecutive evaluations.","type":"string"},"externalLabels":{"additionalProperties":{"type":"string"},"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"},"ignoreNamespaceSelectors":{"description":"IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector settings from the podmonitor and servicemonitor configs, and they will only discover endpoints within their current namespace. Defaults to false.","type":"boolean"},"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 TODO: Add other useful fields. apiVersion, kind, uid?","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":"Source for the environment variable's value. Cannot be used if value is not empty.","properties":{"configMapKeyRef":{"description":"Selects a key of 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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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.","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":"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.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","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"},"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":"The ConfigMap to select from","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"},"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":"The Secret to select from","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"},"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":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"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/","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.","properties":{"add":{"description":"Added capabilities","items":{"description":"Capability represent POSIX capabilities type","type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"description":"Capability represent POSIX capabilities type","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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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"},"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":["devicePath","name"],"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":["mountPath","name"],"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":{"additionalProperties":{"type":"string"},"description":"Define which Nodes the Pods are scheduled on.","type":"object"},"overrideHonorLabels":{"description":"OverrideHonorLabels if set to true overrides all user configured honor_labels. If HonorLabels is set in ServiceMonitor or PodMonitor to true, this overrides honor_labels to false.","type":"boolean"},"overrideHonorTimestamps":{"description":"OverrideHonorTimestamps allows to globally enforce honoring timestamps in all scrape configs.","type":"boolean"},"paused":{"description":"When a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.","type":"boolean"},"podMetadata":{"description":"Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods.","type":"object"},"podMonitorNamespaceSelector":{"description":"Namespaces to be selected for PodMonitor discovery. If nil, only check own namespace.","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":{"additionalProperties":{"type":"string"},"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":"*Experimental* PodMonitors to be selected for target discovery.","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":{"additionalProperties":{"type":"string"},"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 for the URL.","properties":{"password":{"description":"The secret in the service monitor namespace that contains the password for authentication.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"The secret in the service monitor namespace that contains the username for authentication.","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"},"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":{"additionalProperties":{"type":"string"},"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":"TLS Config to use for remote read.","properties":{"ca":{"description":"Stuct containing the CA cert to use for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"caFile":{"description":"Path to the CA cert in the Prometheus container to use for the targets.","type":"string"},"cert":{"description":"Struct containing the client cert file for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"certFile":{"description":"Path to the client cert file in the Prometheus container for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"Path to the client key file in the Prometheus container for the targets.","type":"string"},"keySecret":{"description":"Secret containing the client key file for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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 for the URL.","properties":{"password":{"description":"The secret in the service monitor namespace that contains the password for authentication.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"The secret in the service monitor namespace that contains the username for authentication.","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"},"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 tuning of the remote write queue parameters.","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.","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.","type":"integer"},"maxSamplesPerSend":{"description":"MaxSamplesPerSend is the maximum number of samples per send.","type":"integer"},"maxShards":{"description":"MaxShards is the maximum number of shards, i.e. amount of concurrency.","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.","type":"integer"}},"type":"object"},"remoteTimeout":{"description":"Timeout for requests to the remote write endpoint.","type":"string"},"tlsConfig":{"description":"TLS Config to use for remote write.","properties":{"ca":{"description":"Stuct containing the CA cert to use for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"caFile":{"description":"Path to the CA cert in the Prometheus container to use for the targets.","type":"string"},"cert":{"description":"Struct containing the client cert file for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"certFile":{"description":"Path to the client cert file in the Prometheus container for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"Path to the client key file in the Prometheus container for the targets.","type":"string"},"keySecret":{"description":"Secret containing the client key file for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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. Default 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":"Define resources requests and limits for single Pods.","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"Namespaces to be selected for PrometheusRules discovery. If unspecified, only the same namespace as the Prometheus object is in is used.","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":{"additionalProperties":{"type":"string"},"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 selector to select which PrometheusRules to mount for loading alerting rules from. Until (excluding) Prometheus Operator v0.24.0 Prometheus Operator will migrate any legacy rule ConfigMaps to PrometheusRule custom resources selected by RuleSelector. Make sure it does not match any config maps that you do not want to be migrated.","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":{"additionalProperties":{"type":"string"},"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":"SecurityContext holds pod-level security attributes and common container settings. This defaults to the default 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 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---- \n If 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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName 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":"Namespaces to be selected for ServiceMonitor discovery. If nil, only check own namespace.","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":{"additionalProperties":{"type":"string"},"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":"ServiceMonitors to be selected for target discovery.","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":{"additionalProperties":{"type":"string"},"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":"Storage spec to specify how storage shall be used.","properties":{"emptyDir":{"description":"EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir","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","type":"string"}},"type":"object"},"volumeClaimTemplate":{"description":"A PVC spec to be used by the Prometheus StatefulSets.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","type":"object"},"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","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":"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.","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":"Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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 query over volumes to consider for binding.","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":{"additionalProperties":{"type":"string"},"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":"Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","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":{"additionalProperties":{"type":"string"},"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":"Last time we probed the condition.","format":"date-time","type":"string"},"lastTransitionTime":{"description":"Last time the condition transitioned from one status to another.","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":{"description":"PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type","type":"string"}},"required":["status","type"],"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":"Thanos configuration allows configuring various aspects of a Prometheus server in a Thanos environment. \n This section is experimental, it may change significantly without deprecation notice in any release. \n This is experimental and may change significantly without backward compatibility in any release.","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"},"listenLocal":{"description":"ListenLocal makes the Thanos sidecar listen on loopback, so that it does not bind against the Pod IP.","type":"boolean"},"objectStorageConfig":{"description":"ObjectStorageConfig configures object storage in Thanos.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"resources":{"description":"Resources defines the resource requirements for the Thanos sidecar. If not provided, no requests/limits will be set","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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"},"tracingConfig":{"description":"TracingConfig configures tracing in Thanos. This is an experimental feature, it may change in any upcoming release in a breaking way.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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":"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","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"CephFS represents a Ceph FS mount on the host that shares a pod's lifetime","properties":{"monitors":{"description":"Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","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"}},"type":"object"},"user":{"description":"Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"}},"required":["monitors"],"type":"object"},"cinder":{"description":"Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","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://examples.k8s.io/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://examples.k8s.io/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"Optional: points to a secret object containing parameters used to connect to OpenStack.","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"}},"type":"object"},"volumeID":{"description":"volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string"}},"required":["volumeID"],"type":"object"},"configMap":{"description":"ConfigMap represents a configMap that should populate this volume","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"csi":{"description":"CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).","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":"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.","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"}},"type":"object"},"readOnly":{"description":"Specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"additionalProperties":{"type":"string"},"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":"DownwardAPI represents downward API about the pod that should populate this volume","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":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","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":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"emptyDir":{"description":"EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","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","type":"string"}},"type":"object"},"fc":{"description":"FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.","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. TODO: how do we prevent errors in the filesystem from compromising the machine","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":{"additionalProperties":{"type":"string"},"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":"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.","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"}},"type":"object"}},"required":["driver"],"type":"object"},"flocker":{"description":"Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running","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":"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","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"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.","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":"Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md","properties":{"endpoints":{"description":"EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string"},"path":{"description":"Path is the Glusterfs volume path. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}},"required":["endpoints","path"],"type":"object"},"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 --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.","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":"ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"CHAP Secret for iSCSI target and initiator authentication","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"}},"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":["iqn","lun","targetPortal"],"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":"NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","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":["path","server"],"type":"object"},"persistentVolumeClaim":{"description":"PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","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":"PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine","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":"PortworxVolume represents a portworx volume attached and mounted on kubelets host machine","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":"Items for all in one resources secrets, configmaps, and downward API","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":"information about the configMap data to project","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"downwardAPI":{"description":"information about the downwardAPI data to project","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":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","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":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"secret":{"description":"information about the secret data to project","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"type":"object"},"serviceAccountToken":{"description":"information about the serviceAccountToken data to project","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":"Quobyte represents a Quobyte mount on the host that shares a pod's lifetime","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":"RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md","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 TODO: how do we prevent errors in the filesystem from compromising the machine","type":"string"},"image":{"description":"The rados image name. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"A collection of Ceph monitors. More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","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"}},"type":"object"},"user":{"description":"The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"}},"required":["image","monitors"],"type":"object"},"scaleIO":{"description":"ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.","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":"SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.","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"}},"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","secretRef","system"],"type":"object"},"secret":{"description":"Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","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":"StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.","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.","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"}},"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":"VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine","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":"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/sig-architecture/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":["availableReplicas","paused","replicas","unavailableReplicas","updatedReplicas"],"type":"object"}},"required":["spec"],"type":"object"}},"version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}} \ No newline at end of file diff --git a/monitoring/vendor/prometheus-operator/prometheus-operator.libsonnet b/monitoring/vendor/prometheus-operator/prometheus-operator.libsonnet new file mode 100644 index 0000000..6fe65ec --- /dev/null +++ b/monitoring/vendor/prometheus-operator/prometheus-operator.libsonnet @@ -0,0 +1,226 @@ +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.36.0', + prometheusConfigReloader: self.prometheusOperator, + configmapReloader: 'v0.3.0', + }, + + imageRepos+:: { + prometheusOperator: 'quay.io/coreos/prometheus-operator', + configmapReloader: 'jimmidyson/configmap-reload', + prometheusConfigReloader: 'quay.io/coreos/prometheus-config-reloader', + }, + }, + + prometheusOperator+:: { + local po = self, + + namespace:: $._config.namespace, + commonLabels:: $._config.prometheusOperator.commonLabels, + deploymentSelectorLabels:: $._config.prometheusOperator.deploymentSelectorLabels, + + image:: $._config.imageRepos.prometheusOperator, + version:: $._config.versions.prometheusOperator, + configReloaderImage:: $._config.imageRepos.configmapReloader, + configReloaderVersion:: $._config.versions.configmapReloader, + prometheusConfigReloaderImage:: $._config.imageRepos.prometheusConfigReloader, + prometheusConfigReloaderVersion:: $._config.versions.prometheusConfigReloader, + + // 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', + '0thanosrulerCustomResourceDefinition': import 'thanosruler-crd.libsonnet', + + clusterRoleBinding: + local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; + + clusterRoleBinding.new() + + clusterRoleBinding.mixin.metadata.withLabels(po.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: po.namespace }]), + + clusterRole: + local clusterRole = k.rbac.v1.clusterRole; + local policyRule = clusterRole.rulesType; + + local crdCreateRule = policyRule.new() + + policyRule.withApiGroups(['apiextensions.k8s.io']) + + policyRule.withResources([ + 'customresourcedefinitions', + ]) + + policyRule.withVerbs(['create']); + + local crdMonitoringRule = policyRule.new() + + policyRule.withApiGroups(['apiextensions.k8s.io']) + + policyRule.withResources([ + 'customresourcedefinitions', + ]) + + policyRule.withResourceNames([ + 'alertmanagers.monitoring.coreos.com', + 'podmonitors.monitoring.coreos.com', + 'prometheuses.monitoring.coreos.com', + 'prometheusrules.monitoring.coreos.com', + 'servicemonitors.monitoring.coreos.com', + 'thanosrulers.monitoring.coreos.com', + ]) + + policyRule.withVerbs(['get', 'update']); + + local monitoringRule = policyRule.new() + + policyRule.withApiGroups(['monitoring.coreos.com']) + + policyRule.withResources([ + 'alertmanagers', + 'alertmanagers/finalizers', + 'prometheuses', + 'prometheuses/finalizers', + 'thanosrulers', + 'thanosrulers/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 = [crdCreateRule, crdMonitoringRule, monitoringRule, appsRule, coreRule, podRule, routingRule, nodeRule, namespaceRule]; + + clusterRole.new() + + clusterRole.mixin.metadata.withLabels(po.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', po.image + ':' + po.version) + + 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=' + po.configReloaderImage + ':' + po.configReloaderVersion, + '--prometheus-config-reloader=' + po.prometheusConfigReloaderImage + ':' + po.prometheusConfigReloaderVersion, + ]) + + 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, po.commonLabels) + + deployment.mixin.metadata.withNamespace(po.namespace) + + deployment.mixin.metadata.withLabels(po.commonLabels) + + deployment.mixin.spec.selector.withMatchLabels(po.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(po.commonLabels) + + serviceAccount.mixin.metadata.withNamespace(po.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', po.deployment.spec.selector.matchLabels, [poServicePort]) + + service.mixin.metadata.withLabels(po.commonLabels) + + service.mixin.metadata.withNamespace(po.namespace) + + service.mixin.spec.withClusterIp('None'), + serviceMonitor: + { + apiVersion: 'monitoring.coreos.com/v1', + kind: 'ServiceMonitor', + metadata: { + name: 'prometheus-operator', + namespace: po.namespace, + labels: po.commonLabels, + }, + spec: { + endpoints: [ + { + port: 'http', + honorLabels: true, + }, + ], + selector: { + matchLabels: po.commonLabels, + }, + }, + }, + }, +} diff --git a/monitoring/vendor/prometheus-operator/prometheusrule-crd.libsonnet b/monitoring/vendor/prometheus-operator/prometheusrule-crd.libsonnet new file mode 100644 index 0000000..2706baf --- /dev/null +++ b/monitoring/vendor/prometheus-operator/prometheusrule-crd.libsonnet @@ -0,0 +1 @@ +{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"prometheusrules.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"PrometheusRule","listKind":"PrometheusRuleList","plural":"prometheusrules","singular":"prometheusrule"},"preserveUnknownFields":false,"scope":"Namespaced","validation":{"openAPIV3Schema":{"description":"PrometheusRule defines alerting rules for a Prometheus instance","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"type":"object"},"spec":{"description":"Specification of desired alerting rule definitions for Prometheus.","properties":{"groups":{"description":"Content of Prometheus rule file","items":{"description":"RuleGroup is a list of sequentially evaluated recording and alerting rules. Note: PartialResponseStrategy is only used by ThanosRuler and will be ignored by Prometheus instances. Valid values for this field are 'warn' or 'abort'. More info: https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response","properties":{"interval":{"type":"string"},"name":{"type":"string"},"partial_response_strategy":{"type":"string"},"rules":{"items":{"description":"Rule describes an alerting or recording rule.","properties":{"alert":{"type":"string"},"annotations":{"additionalProperties":{"type":"string"},"type":"object"},"expr":{"anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"for":{"type":"string"},"labels":{"additionalProperties":{"type":"string"},"type":"object"},"record":{"type":"string"}},"required":["expr"],"type":"object"},"type":"array"}},"required":["name","rules"],"type":"object"},"type":"array"}},"type":"object"}},"required":["spec"],"type":"object"}},"version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}} \ No newline at end of file diff --git a/monitoring/vendor/prometheus-operator/servicemonitor-crd.libsonnet b/monitoring/vendor/prometheus-operator/servicemonitor-crd.libsonnet new file mode 100644 index 0000000..0ae5c6b --- /dev/null +++ b/monitoring/vendor/prometheus-operator/servicemonitor-crd.libsonnet @@ -0,0 +1 @@ +{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"servicemonitors.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"ServiceMonitor","listKind":"ServiceMonitorList","plural":"servicemonitors","singular":"servicemonitor"},"preserveUnknownFields":false,"scope":"Namespaced","validation":{"openAPIV3Schema":{"description":"ServiceMonitor defines monitoring for a set of services.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"type":"object"},"spec":{"description":"Specification of desired Service selection for target discovery by Prometheus.","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":"The secret in the service monitor namespace that contains the password for authentication.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"The secret in the service monitor namespace that contains the username for authentication.","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"},"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"},"bearerTokenSecret":{"description":"Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"honorLabels":{"description":"HonorLabels chooses the metric's labels on collisions with target labels.","type":"boolean"},"honorTimestamps":{"description":"HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.","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. Default 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":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"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. Default 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":"integer"},{"type":"string"}],"description":"Name or number of the target port of the endpoint. Mutually exclusive with port.","x-kubernetes-int-or-string":true},"tlsConfig":{"description":"TLS configuration to use when scraping the endpoint","properties":{"ca":{"description":"Stuct containing the CA cert to use for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"caFile":{"description":"Path to the CA cert in the Prometheus container to use for the targets.","type":"string"},"cert":{"description":"Struct containing the client cert file for the targets.","properties":{"configMap":{"description":"ConfigMap containing data to use for the targets.","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"secret":{"description":"Secret containing data to use for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"certFile":{"description":"Path to the client cert file in the Prometheus container for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"Path to the client key file in the Prometheus container for the targets.","type":"string"},"keySecret":{"description":"Secret containing the client key file for the targets.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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":"Selector to select which namespaces the Endpoints objects are discovered from.","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":"Selector to select Endpoints 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":{"additionalProperties":{"type":"string"},"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"}},"required":["spec"],"type":"object"}},"version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}} \ No newline at end of file diff --git a/monitoring/vendor/prometheus-operator/thanosruler-crd.libsonnet b/monitoring/vendor/prometheus-operator/thanosruler-crd.libsonnet new file mode 100644 index 0000000..62c69a8 --- /dev/null +++ b/monitoring/vendor/prometheus-operator/thanosruler-crd.libsonnet @@ -0,0 +1 @@ +{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"thanosrulers.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"ThanosRuler","listKind":"ThanosRulerList","plural":"thanosrulers","singular":"thanosruler"},"preserveUnknownFields":false,"scope":"Namespaced","validation":{"openAPIV3Schema":{"description":"ThanosRuler defines a ThanosRuler deployment.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"type":"object"},"spec":{"description":"Specification of the desired behavior of the ThanosRuler cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","properties":{"alertDropLabels":{"description":"AlertDropLabels configure the label names which should be dropped in ThanosRuler alerts. If `labels` field is not provided, `thanos_ruler_replica` will be dropped in alerts by default.","items":{"type":"string"},"type":"array"},"alertmanagersConfig":{"description":"Define configuration for connecting to alertmanager. Only available with thanos v0.10.0 and higher. Maps to the `alertmanagers.config` arg.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"alertmanagersUrl":{"description":"Define URL to send alerts to alertmanager. For Thanos v0.10.0 and higher, AlertManagersConfig should be used instead. Maps to the `alertmanagers.url` arg.","type":"string"},"containers":{"description":"Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to a ThanosRuler 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: `thanos-ruler` and `rules-configmap-reloader`. 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":"Source for the environment variable's value. Cannot be used if value is not empty.","properties":{"configMapKeyRef":{"description":"Selects a key of 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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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.","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":"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.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","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"},"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":"The ConfigMap to select from","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"},"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":"The Secret to select from","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"},"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":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"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/","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.","properties":{"add":{"description":"Added capabilities","items":{"description":"Capability represent POSIX capabilities type","type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"description":"Capability represent POSIX capabilities type","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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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"},"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":["devicePath","name"],"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":["mountPath","name"],"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"},"enforcedNamespaceLabel":{"description":"EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.","type":"string"},"evaluationInterval":{"description":"Interval between consecutive evaluations.","type":"string"},"image":{"description":"Thanos container image URL.","type":"string"},"imagePullSecrets":{"description":"An optional list of references to secrets in the same namespace to use for pulling thanos 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 TODO: Add other useful fields. apiVersion, kind, uid?","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 ThanosRuler 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":"Source for the environment variable's value. Cannot be used if value is not empty.","properties":{"configMapKeyRef":{"description":"Selects a key of 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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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.","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":"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.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","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"},"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":"The ConfigMap to select from","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"},"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":"The Secret to select from","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"},"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":"Actions that the management system should take in response to container lifecycle events. Cannot be updated.","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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"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","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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":"Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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":"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/","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.","properties":{"add":{"description":"Added capabilities","items":{"description":"Capability represent POSIX capabilities type","type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"description":"Capability represent POSIX capabilities type","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":"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.","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":"The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","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"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","properties":{"exec":{"description":"One and only one of the following should be specified. Exec specifies the action to take.","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":"HTTPGet specifies the http request to perform.","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":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true},"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 and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"integer"},{"type":"string"}],"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.","x-kubernetes-int-or-string":true}},"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"},"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":["devicePath","name"],"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":["mountPath","name"],"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"},"labels":{"additionalProperties":{"type":"string"},"description":"Labels configure the external label pairs to ThanosRuler. If not provided, default replica label `thanos_ruler_replica` will be added as a label and be dropped in alerts.","type":"object"},"listenLocal":{"description":"ListenLocal makes the Thanos ruler listen on loopback, so that it does not bind against the Pod IP.","type":"boolean"},"logFormat":{"description":"Log format for ThanosRuler to be configured with.","type":"string"},"logLevel":{"description":"Log level for ThanosRuler to be configured with.","type":"string"},"objectStorageConfig":{"description":"ObjectStorageConfig configures object storage in Thanos.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"paused":{"description":"When a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects.","type":"boolean"},"podMetadata":{"description":"Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods.","type":"object"},"portName":{"description":"Port name used for the pods and governing service. This defaults to web","type":"string"},"queryEndpoints":{"description":"QueryEndpoints defines Thanos querier endpoints from which to query metrics. Maps to the --query flag of thanos ruler.","items":{"type":"string"},"type":"array"},"replicas":{"description":"Number of thanos ruler instances to deploy.","format":"int32","type":"integer"},"resources":{"description":"Resources defines the resource requirements for the Thanos sidecar. If not provided, no requests/limits will be set","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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 ThanosRuler 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"},"ruleNamespaceSelector":{"description":"Namespaces to be selected for Rules discovery. If unspecified, only the same namespace as the ThanosRuler object is in is used.","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":{"additionalProperties":{"type":"string"},"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 to select which PrometheusRules to mount for alerting and recording.","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":{"additionalProperties":{"type":"string"},"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"},"storage":{"description":"Storage spec to specify how storage shall be used.","properties":{"emptyDir":{"description":"EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir","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","type":"string"}},"type":"object"},"volumeClaimTemplate":{"description":"A PVC spec to be used by the Prometheus StatefulSets.","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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata","type":"object"},"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","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":"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.","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":"Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources","properties":{"limits":{"additionalProperties":{"type":"string"},"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":{"additionalProperties":{"type":"string"},"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 query over volumes to consider for binding.","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":{"additionalProperties":{"type":"string"},"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":"Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","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":{"additionalProperties":{"type":"string"},"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":"Last time we probed the condition.","format":"date-time","type":"string"},"lastTransitionTime":{"description":"Last time the condition transitioned from one status to another.","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":{"description":"PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type","type":"string"}},"required":["status","type"],"type":"object"},"type":"array"},"phase":{"description":"Phase represents the current phase of PersistentVolumeClaim.","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"tracingConfig":{"description":"TracingConfig configures tracing in Thanos. This is an experimental feature, it may change in any upcoming release in a breaking way.","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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"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":"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","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"CephFS represents a Ceph FS mount on the host that shares a pod's lifetime","properties":{"monitors":{"description":"Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","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"}},"type":"object"},"user":{"description":"Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it","type":"string"}},"required":["monitors"],"type":"object"},"cinder":{"description":"Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","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://examples.k8s.io/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://examples.k8s.io/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"Optional: points to a secret object containing parameters used to connect to OpenStack.","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"}},"type":"object"},"volumeID":{"description":"volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md","type":"string"}},"required":["volumeID"],"type":"object"},"configMap":{"description":"ConfigMap represents a configMap that should populate this volume","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"csi":{"description":"CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).","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":"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.","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"}},"type":"object"},"readOnly":{"description":"Specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"additionalProperties":{"type":"string"},"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":"DownwardAPI represents downward API about the pod that should populate this volume","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":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","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":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"emptyDir":{"description":"EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","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","type":"string"}},"type":"object"},"fc":{"description":"FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.","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. TODO: how do we prevent errors in the filesystem from compromising the machine","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":{"additionalProperties":{"type":"string"},"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":"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.","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"}},"type":"object"}},"required":["driver"],"type":"object"},"flocker":{"description":"Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running","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":"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","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"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.","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":"Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md","properties":{"endpoints":{"description":"EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string"},"path":{"description":"Path is the Glusterfs volume path. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}},"required":["endpoints","path"],"type":"object"},"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 --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.","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":"ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md","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 TODO: how do we prevent errors in the filesystem from compromising the machine","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":"CHAP Secret for iSCSI target and initiator authentication","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"}},"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":["iqn","lun","targetPortal"],"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":"NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","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":["path","server"],"type":"object"},"persistentVolumeClaim":{"description":"PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","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":"PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine","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":"PortworxVolume represents a portworx volume attached and mounted on kubelets host machine","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":"Items for all in one resources secrets, configmaps, and downward API","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":"information about the configMap data to project","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"downwardAPI":{"description":"information about the downwardAPI data to project","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":"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.","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":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.","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\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"secret":{"description":"information about the secret data to project","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 TODO: Add other useful fields. apiVersion, kind, uid?","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"type":"object"},"serviceAccountToken":{"description":"information about the serviceAccountToken data to project","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":"Quobyte represents a Quobyte mount on the host that shares a pod's lifetime","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":"RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md","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 TODO: how do we prevent errors in the filesystem from compromising the machine","type":"string"},"image":{"description":"The rados image name. More info: https://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"A collection of Ceph monitors. More info: https://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/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://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","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"}},"type":"object"},"user":{"description":"The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it","type":"string"}},"required":["image","monitors"],"type":"object"},"scaleIO":{"description":"ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.","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":"SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.","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"}},"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","secretRef","system"],"type":"object"},"secret":{"description":"Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","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":"StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.","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.","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"}},"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":"VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine","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"}},"required":["queryEndpoints"],"type":"object"},"status":{"description":"Most recent observed status of the ThanosRuler cluster. Read-only. Not included when requesting from the apiserver, only from the ThanosRuler Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","properties":{"availableReplicas":{"description":"Total number of available pods (ready for at least minReadySeconds) targeted by this ThanosRuler deployment.","format":"int32","type":"integer"},"paused":{"description":"Represents whether any actions on the underlying managed objects are being performed. Only delete actions will be performed.","type":"boolean"},"replicas":{"description":"Total number of non-terminated pods targeted by this ThanosRuler deployment (their labels match the selector).","format":"int32","type":"integer"},"unavailableReplicas":{"description":"Total number of unavailable pods targeted by this ThanosRuler deployment.","format":"int32","type":"integer"},"updatedReplicas":{"description":"Total number of non-terminated pods targeted by this ThanosRuler deployment that have the desired version spec.","format":"int32","type":"integer"}},"required":["availableReplicas","paused","replicas","unavailableReplicas","updatedReplicas"],"type":"object"}},"required":["spec"],"type":"object"}},"version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}} \ No newline at end of file diff --git a/monitoring/vendor/prometheus/.gitignore b/monitoring/vendor/prometheus/.gitignore new file mode 100644 index 0000000..b23a75c --- /dev/null +++ b/monitoring/vendor/prometheus/.gitignore @@ -0,0 +1,4 @@ +*.yaml +dashboards_out +vendor +jsonnetfile.lock.json diff --git a/monitoring/vendor/prometheus/Makefile b/monitoring/vendor/prometheus/Makefile new file mode 100644 index 0000000..9ade5aa --- /dev/null +++ b/monitoring/vendor/prometheus/Makefile @@ -0,0 +1,25 @@ +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/monitoring/vendor/prometheus/README.md b/monitoring/vendor/prometheus/README.md new file mode 100644 index 0000000..c44e70c --- /dev/null +++ b/monitoring/vendor/prometheus/README.md @@ -0,0 +1,36 @@ +# 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/monitoring/vendor/prometheus/alerts.jsonnet b/monitoring/vendor/prometheus/alerts.jsonnet new file mode 100644 index 0000000..75e7c1b --- /dev/null +++ b/monitoring/vendor/prometheus/alerts.jsonnet @@ -0,0 +1 @@ +std.manifestYamlDoc((import 'mixin.libsonnet').prometheusAlerts) diff --git a/monitoring/vendor/prometheus/alerts.libsonnet b/monitoring/vendor/prometheus/alerts.libsonnet new file mode 100644 index 0000000..4244172 --- /dev/null +++ b/monitoring/vendor/prometheus/alerts.libsonnet @@ -0,0 +1,266 @@ +{ + 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 {{ printf "%%.4g" $value }} 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 {{ printf "%%.4g" $value }} 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]) + > + 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 {{ $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/monitoring/vendor/prometheus/config.libsonnet b/monitoring/vendor/prometheus/config.libsonnet new file mode 100644 index 0000000..2761428 --- /dev/null +++ b/monitoring/vendor/prometheus/config.libsonnet @@ -0,0 +1,16 @@ +{ + _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/monitoring/vendor/prometheus/dashboards.jsonnet b/monitoring/vendor/prometheus/dashboards.jsonnet new file mode 100644 index 0000000..9d913ed --- /dev/null +++ b/monitoring/vendor/prometheus/dashboards.jsonnet @@ -0,0 +1,6 @@ +local dashboards = (import 'mixin.libsonnet').grafanaDashboards; + +{ + [name]: dashboards[name] + for name in std.objectFields(dashboards) +} diff --git a/monitoring/vendor/prometheus/dashboards.libsonnet b/monitoring/vendor/prometheus/dashboards.libsonnet new file mode 100644 index 0000000..328e720 --- /dev/null +++ b/monitoring/vendor/prometheus/dashboards.libsonnet @@ -0,0 +1,376 @@ +local g = import 'grafana-builder/grafana.libsonnet'; +local grafana = import 'grafonnet/grafana.libsonnet'; +local dashboard = grafana.dashboard; +local row = grafana.row; +local singlestat = grafana.singlestat; +local prometheus = grafana.prometheus; +local graphPanel = grafana.graphPanel; +local tablePanel = grafana.tablePanel; +local template = grafana.template; +{ + 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': + local timestampComparison = + graphPanel.new( + 'Highest Timestamp In vs. Highest Timestamp Sent', + datasource='$datasource', + span=6, + ) + .addTarget(prometheus.target( + ||| + ( + 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"} + ) + |||, + legendFormat='{{cluster}}:{{instance}}-{{queue}}', + )); + + local timestampComparisonRate = + graphPanel.new( + 'Rate[5m]', + datasource='$datasource', + span=6, + ) + .addTarget(prometheus.target( + ||| + ( + 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]) + ) + |||, + legendFormat='{{cluster}}:{{instance}}-{{queue}}', + )); + + local samplesRate = + graphPanel.new( + 'Rate, in vs. succeeded or dropped [5m]', + datasource='$datasource', + span=12, + ) + .addTarget(prometheus.target( + ||| + 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]) + |||, + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local currentShards = + graphPanel.new( + 'Current Shards', + datasource='$datasource', + span=12, + min_span=6, + ) + .addTarget(prometheus.target( + 'prometheus_remote_storage_shards{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local maxShards = + graphPanel.new( + 'Max Shards', + datasource='$datasource', + span=4, + ) + .addTarget(prometheus.target( + 'prometheus_remote_storage_shards_max{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local minShards = + graphPanel.new( + 'Min Shards', + datasource='$datasource', + span=4, + ) + .addTarget(prometheus.target( + 'prometheus_remote_storage_shards_min{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local desiredShards = + graphPanel.new( + 'Desired Shards', + datasource='$datasource', + span=4, + ) + .addTarget(prometheus.target( + 'prometheus_remote_storage_shards_desired{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local shardsCapacity = + graphPanel.new( + 'Shard Capacity', + datasource='$datasource', + span=6, + ) + .addTarget(prometheus.target( + 'prometheus_remote_storage_shard_capacity{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + + local pendingSamples = + graphPanel.new( + 'Pending Samples', + datasource='$datasource', + span=6, + ) + .addTarget(prometheus.target( + 'prometheus_remote_storage_pending_samples{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local walSegment = + graphPanel.new( + 'TSDB Current Segment', + datasource='$datasource', + span=6, + formatY1='none', + ) + .addTarget(prometheus.target( + 'prometheus_tsdb_wal_segment_current{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}' + )); + + local queueSegment = + graphPanel.new( + 'Remote Write Current Segment', + datasource='$datasource', + span=6, + formatY1='none', + ) + .addTarget(prometheus.target( + 'prometheus_wal_watcher_current_segment{cluster=~"$cluster", instance=~"$instance"}', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local droppedSamples = + graphPanel.new( + 'Dropped Samples', + datasource='$datasource', + span=3, + ) + .addTarget(prometheus.target( + 'rate(prometheus_remote_storage_dropped_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local failedSamples = + graphPanel.new( + 'Failed Samples', + datasource='$datasource', + span=3, + ) + .addTarget(prometheus.target( + 'rate(prometheus_remote_storage_failed_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local retriedSamples = + graphPanel.new( + 'Retried Samples', + datasource='$datasource', + span=3, + ) + .addTarget(prometheus.target( + 'rate(prometheus_remote_storage_retried_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + local enqueueRetries = + graphPanel.new( + 'Enqueue Retries', + datasource='$datasource', + span=3, + ) + .addTarget(prometheus.target( + 'rate(prometheus_remote_storage_enqueue_retries_total{cluster=~"$cluster", instance=~"$instance"}[5m])', + legendFormat='{{cluster}}:{{instance}}-{{queue}}' + )); + + dashboard.new('Prometheus Remote Write', + editable=true) + .addTemplate( + { + hide: 0, + label: null, + name: 'datasource', + options: [], + query: 'prometheus', + refresh: 1, + regex: '', + type: 'datasource', + }, + ) + .addTemplate( + template.new( + 'instance', + '$datasource', + 'label_values(prometheus_build_info, instance)' % $._config, + refresh='time', + current={ + selected: true, + text: 'All', + value: '$__all', + }, + includeAll=true, + ) + ) + .addTemplate( + template.new( + 'cluster', + '$datasource', + 'label_values(kube_pod_container_info{image=~".*prometheus.*"}, cluster)' % $._config, + refresh='time', + current={ + selected: true, + text: 'All', + value: '$__all', + }, + includeAll=true, + ) + ) + .addTemplate( + template.new( + 'queue', + '$datasource', + 'label_values(prometheus_remote_storage_shards{cluster=~"$cluster", instance=~"$instance"}, queue)' % $._config, + refresh='time', + includeAll=true, + ) + ) + .addRow( + row.new('Timestamps') + .addPanel(timestampComparison) + .addPanel(timestampComparisonRate) + ) + .addRow( + row.new('Samples') + .addPanel(samplesRate) + ) + .addRow( + row.new('Shards' + ) + .addPanel(currentShards) + .addPanel(maxShards) + .addPanel(minShards) + .addPanel(desiredShards) + ) + .addRow( + row.new('Shard Details') + .addPanel(shardsCapacity) + .addPanel(pendingSamples) + ) + .addRow( + row.new('Segments') + .addPanel(walSegment) + .addPanel(queueSegment) + ) + .addRow( + row.new('Misc. Rates') + .addPanel(droppedSamples) + .addPanel(failedSamples) + .addPanel(retriedSamples) + .addPanel(enqueueRetries) + ) + }, +} diff --git a/monitoring/vendor/prometheus/jsonnetfile.json b/monitoring/vendor/prometheus/jsonnetfile.json new file mode 100644 index 0000000..6532d20 --- /dev/null +++ b/monitoring/vendor/prometheus/jsonnetfile.json @@ -0,0 +1,24 @@ +{ + "dependencies": [ + { + "name": "grafana-builder", + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs", + "subdir": "grafana-builder" + } + }, + "version": "master" + }, + { + "name": "grafonnet", + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet-lib", + "subdir": "grafonnet" + } + }, + "version": "master" + } + ] +} diff --git a/monitoring/vendor/prometheus/mixin.libsonnet b/monitoring/vendor/prometheus/mixin.libsonnet new file mode 100644 index 0000000..3c983a3 --- /dev/null +++ b/monitoring/vendor/prometheus/mixin.libsonnet @@ -0,0 +1,3 @@ +(import 'config.libsonnet') + +(import 'dashboards.libsonnet') + +(import 'alerts.libsonnet') diff --git a/monitoring/vendor/promgrafonnet/gauge.libsonnet b/monitoring/vendor/promgrafonnet/gauge.libsonnet new file mode 100644 index 0000000..abe7f85 --- /dev/null +++ b/monitoring/vendor/promgrafonnet/gauge.libsonnet @@ -0,0 +1,60 @@ +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/monitoring/vendor/promgrafonnet/numbersinglestat.libsonnet b/monitoring/vendor/promgrafonnet/numbersinglestat.libsonnet new file mode 100644 index 0000000..771e4bd --- /dev/null +++ b/monitoring/vendor/promgrafonnet/numbersinglestat.libsonnet @@ -0,0 +1,48 @@ +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/monitoring/vendor/promgrafonnet/promgrafonnet.libsonnet b/monitoring/vendor/promgrafonnet/promgrafonnet.libsonnet new file mode 100644 index 0000000..8b74e36 --- /dev/null +++ b/monitoring/vendor/promgrafonnet/promgrafonnet.libsonnet @@ -0,0 +1,4 @@ +{ + numbersinglestat:: import 'numbersinglestat.libsonnet', + gauge:: import 'gauge.libsonnet', +} diff --git a/monitoring/vendor/slo-libsonnet/_util.libsonnet b/monitoring/vendor/slo-libsonnet/_util.libsonnet new file mode 100644 index 0000000..ac9f4a2 --- /dev/null +++ b/monitoring/vendor/slo-libsonnet/_util.libsonnet @@ -0,0 +1,9 @@ +{ + selectorsToLabels(labelset):: { + [s[0]]: std.strReplace(s[1], '"', '') + for s in [ + std.split(s, '=') + for s in labelset + ] + }, +} diff --git a/monitoring/vendor/slo-libsonnet/errorburn.libsonnet b/monitoring/vendor/slo-libsonnet/errorburn.libsonnet new file mode 100644 index 0000000..fa67961 --- /dev/null +++ b/monitoring/vendor/slo-libsonnet/errorburn.libsonnet @@ -0,0 +1,135 @@ +local errors = import 'errors.libsonnet'; +local util = import '_util.libsonnet'; +{ + errorburn(param):: { + local slo = { + metric: error 'must set metric for errorburn', + selectors: error 'must set selectors for errorburn', + errorBudget: error 'must set errorBudget for errorburn', + labels: [], + codeSelector: 'code', + } + param, + + local rates = ['5m', '30m', '1h', '2h', '6h', '1d', '3d'], + + local labels = + util.selectorsToLabels(slo.selectors) + + util.selectorsToLabels(slo.labels), + + local errorRatesWithRate = [ + errors.errors({ + metric: slo.metric, + selectors: slo.selectors, + rate: rate, + codeSelector: slo.codeSelector, + }).recordingrule { + // We need to communicate the rate to the errorPercentage step + // They will be remove after that again + labels+: { __tmpRate__: rate }, + } + for rate in rates + ], + + local errorPercentages = [ + { + expr: ||| + sum(%s{%s}) + / + sum(%s{%s}) + ||| % [ + err.record, + std.join(',', slo.selectors + ['status_class="5xx"']), + err.record, + std.join(',', slo.selectors), + ], + record: 'status_class_5xx:%s:ratio_rate%s' % [slo.metric, err.labels.__tmpRate__], + labels: labels, + } + for err in errorRatesWithRate + ], + + // Remove __tmpRate__ label from errorRates rules again + local errorRates = std.map( + function(rule) rule { + local ls = super.labels, + labels: { + [k]: ls[k] + for k in std.objectFields(ls) + if !std.setMember(k, ['__tmpRate__']) + }, + }, + errorRatesWithRate, + ), + + recordingrules: errorRates + errorPercentages, + + local multiBurnRate30d = [ + { + alert: 'ErrorBudgetBurn', + expr: ||| + ( + %s{%s} > (14.4*%f) + and + %s{%s} > (14.4*%f) + ) + or + ( + %s{%s} > (6*%f) + and + %s{%s} > (6*%f) + ) + ||| % [ + errorPercentages[2].record, + std.join(',', slo.selectors), + slo.errorBudget, + errorPercentages[0].record, + std.join(',', slo.selectors), + slo.errorBudget, + errorPercentages[4].record, + std.join(',', slo.selectors), + slo.errorBudget, + errorPercentages[1].record, + std.join(',', slo.selectors), + slo.errorBudget, + ], + labels: labels { + severity: 'critical', + }, + }, + { + alert: 'ErrorBudgetBurn', + expr: ||| + ( + %s{%s} > (3*%f) + and + %s{%s} > (3*%f) + ) + or + ( + %s{%s} > (%f) + and + %s{%s} > (%f) + ) + ||| % [ + errorPercentages[5].record, + std.join(',', slo.selectors), + slo.errorBudget, + errorPercentages[3].record, + std.join(',', slo.selectors), + slo.errorBudget, + errorPercentages[6].record, + std.join(',', slo.selectors), + slo.errorBudget, + errorPercentages[4].record, + std.join(',', slo.selectors), + slo.errorBudget, + ], + labels: labels { + severity: 'warning', + }, + }, + ], + + alerts: multiBurnRate30d, + }, +} diff --git a/monitoring/vendor/slo-libsonnet/errors.libsonnet b/monitoring/vendor/slo-libsonnet/errors.libsonnet new file mode 100644 index 0000000..e9f158e --- /dev/null +++ b/monitoring/vendor/slo-libsonnet/errors.libsonnet @@ -0,0 +1,116 @@ +local util = import '_util.libsonnet'; + +{ + errors(param):: { + local slo = { + metric: error 'must set metric for errors', + selectors: error 'must set selectors for errors', + labels: [], + rate: '5m', + codeSelector: 'code', + } + param, + + local labels = + util.selectorsToLabels(slo.selectors) + + util.selectorsToLabels(slo.labels), + + local recordingrule = { + expr: ||| + sum by (status_class) ( + label_replace( + rate(%s{%s}[%s] + ), "status_class", "${1}xx", "%s", "([0-9])..") + ) + ||| % [ + slo.metric, + std.join(',', slo.selectors), + slo.rate, + slo.codeSelector, + ], + record: 'status_class:%s:rate%s' % [ + slo.metric, + slo.rate, + ], + labels: labels, + }, + recordingrule: recordingrule, + + alertWarning: { + expr: ||| + ( + sum(%s{status_class="5xx"}) + / + sum(%s) + ) > %s + ||| % [ + recordingrule.record, + recordingrule.record, + slo.warning, + ], + 'for': '5m', + labels: labels { + severity: 'warning', + }, + }, + + alertCritical: { + expr: ||| + ( + sum(%s{status_class="5xx"}) + / + sum(%s) + ) > %s + ||| % [ + recordingrule.record, + recordingrule.record, + slo.critical, + ], + 'for': '5m', + labels: labels { + severity: 'critical', + }, + }, + + grafana: { + graph: { + span: 12, + aliasColors: { + '1xx': '#EAB839', + '2xx': '#7EB26D', + '3xx': '#6ED0E0', + '4xx': '#EF843C', + '5xx': '#E24D42', + success: '#7EB26D', + 'error': '#E24D42', + }, + datasource: '$datasource', + legend: { + avg: false, + current: false, + max: false, + min: false, + show: true, + total: false, + values: false, + }, + targets: [ + { + expr: '%s' % recordingrule.record, + format: 'time_series', + intervalFactor: 2, + legendFormat: '{{status_class}}', + refId: 'A', + step: 10, + }, + ], + title: 'HTTP Response Codes', + tooltip: { + shared: true, + sort: 0, + value_type: 'individual', + }, + type: 'graph', + }, + }, + }, +} diff --git a/monitoring/vendor/slo-libsonnet/latency.libsonnet b/monitoring/vendor/slo-libsonnet/latency.libsonnet new file mode 100644 index 0000000..3f66a52 --- /dev/null +++ b/monitoring/vendor/slo-libsonnet/latency.libsonnet @@ -0,0 +1,157 @@ +local util = import '_util.libsonnet'; + +{ + latency(param):: { + local slo = { + metric: error 'must set metric for latency', + selectors: error 'must set selectors for latency', + quantile: error 'must set quantile for latency', + labels: [], + } + param, + + local labels = + util.selectorsToLabels(slo.selectors) + + util.selectorsToLabels(slo.labels), + + recordingrule(quantile=slo.quantile):: { + expr: ||| + histogram_quantile(%.2f, sum(%s_bucket{%s}) by (le)) + ||| % [ + quantile, + slo.metric, + slo.selectors, + ], + record: '%s:histogram_quantile' % slo.metric, + + labels: labels { + quantile: '%.2f' % quantile, + }, + }, + + local _recordingrule = self.recordingrule(), + + alertWarning: { + expr: ||| + %s > %.3f + ||| % [_recordingrule.record, slo.warning], + 'for': '5m', + labels: labels { + severity: 'warning', + }, + }, + + alertCritical: { + expr: ||| + %s > %.3f + ||| % [_recordingrule.record, slo.critical], + 'for': '5m', + labels: labels { + severity: 'critical', + }, + }, + + grafana: { + gauge: { + type: 'gauge', + title: 'P99 Latency', + datasource: '$datasource', + options: { + maxValue: '1.5', // TODO might need to be configurable + minValue: 0, + thresholds: [ + { + color: 'green', + index: 0, + value: null, + }, + { + color: '#EAB839', + index: 1, + value: slo.warning, + }, + { + color: 'red', + index: 2, + value: slo.critical, + }, + ], + valueOptions: { + decimals: null, + stat: 'last', + unit: 'dtdurations', + }, + }, + targets: [ + { + expr: '%s{quantile="%.2f"}' % [ + _recordingrule.record, + slo.quantile, + ], + format: 'time_series', + }, + ], + }, + graph: { + type: 'graph', + title: 'Request Latency', + datasource: '$datasource', + targets: [ + { + expr: 'max(%s) by (quantile)' % _recordingrule.record, + legendFormat: '{{ quantile }}', + }, + ], + yaxes: [ + { + show: true, + min: '0', + max: null, + format: 's', + decimals: 1, + }, + { + show: false, + }, + ], + xaxis: { + show: true, + mode: 'time', + name: null, + values: [], + buckets: null, + }, + yaxis: { + align: false, + alignLevel: null, + }, + lines: true, + fill: 2, + span: 12, + linewidth: 1, + dashes: false, + dashLength: 10, + paceLength: 10, + points: false, + pointradius: 2, + thresholds: [ + { + value: slo.warning, + colorMode: 'warning', + op: 'gt', + fill: true, + line: true, + yaxis: 'left', + }, + { + value: slo.critical, + colorMode: 'critical', + op: 'gt', + fill: true, + line: true, + yaxis: 'left', + }, + ], + }, + }, + }, +} diff --git a/monitoring/vendor/slo-libsonnet/slo.libsonnet b/monitoring/vendor/slo-libsonnet/slo.libsonnet new file mode 100644 index 0000000..06ce223 --- /dev/null +++ b/monitoring/vendor/slo-libsonnet/slo.libsonnet @@ -0,0 +1,3 @@ +(import 'latency.libsonnet') + +(import 'errors.libsonnet') + +(import 'errorburn.libsonnet')