Compare commits

..

33 Commits

Author SHA1 Message Date
Morten Olsen
5ee7a76443 more stuff 2025-09-03 14:33:48 +02:00
mortenolsenzn
683de402ff Merge pull request #1 from morten-olsen/rewrite2
Rewrite2
2025-09-03 12:24:40 +02:00
Morten Olsen
e8e939ad19 fixes 2025-08-22 11:44:53 +02:00
Morten Olsen
1b5b5145b0 stuff 2025-08-22 07:35:50 +02:00
Morten Olsen
cfd2d76873 more 2025-08-20 22:45:30 +02:00
Morten Olsen
9e5081ed9b updates 2025-08-20 14:58:34 +02:00
Morten Olsen
3ab2b1969a stuff 2025-08-19 22:05:41 +02:00
Morten Olsen
a27b563113 rewrite2 2025-08-18 08:02:48 +02:00
Morten Olsen
295472a028 update 2025-08-15 22:01:18 +02:00
Morten Olsen
91298b3cf7 update 2025-08-15 21:20:23 +02:00
Morten Olsen
638c288a5c update 2025-08-15 20:52:17 +02:00
Morten Olsen
2be6bdca84 update 2025-08-15 20:45:28 +02:00
Morten Olsen
f362f4afc4 fix: missing permissions 2025-08-13 09:01:30 +02:00
Morten Olsen
9fadbf75fb publish operator yaml 2025-08-13 08:50:17 +02:00
Morten Olsen
2add15d283 fix: authentik port 2025-08-12 23:25:03 +02:00
Morten Olsen
5426495be5 updates 2025-08-12 23:22:47 +02:00
Morten Olsen
b8bb16ccbb updates 2025-08-12 22:32:09 +02:00
Morten Olsen
d4b56007f1 add authentik connection crd 2025-08-12 08:36:29 +02:00
Morten Olsen
130bfec468 fix reconciliation of db 2025-08-11 20:00:01 +02:00
Morten Olsen
ddb3c79657 fix pg db 2025-08-11 15:00:06 +02:00
Morten Olsen
47cf43b44e Added storage provisioner 2025-08-11 12:07:36 +02:00
Morten Olsen
aa6d14738a simplify 2025-08-07 23:26:33 +02:00
Morten Olsen
9cdbaf7929 stuff 2025-08-07 22:21:33 +02:00
Morten Olsen
cfb90f7c9f more 2025-08-06 21:18:02 +02:00
Morten Olsen
757b2fcfac lot more stuff 2025-08-04 23:44:14 +02:00
Morten Olsen
daf0ea21bb update 2025-08-01 14:47:53 +02:00
Morten Olsen
26b58a59c0 lot of updates 2025-08-01 14:40:16 +02:00
Morten Olsen
a25e0b9ffb updates 2025-08-01 07:52:09 +02:00
Morten Olsen
5782d59f71 add dotenv 2025-07-31 13:23:01 +02:00
Morten Olsen
34bba171ef Migrate to zod 2025-07-31 10:42:09 +02:00
Morten Olsen
85d043aec3 more 2025-07-31 08:51:50 +02:00
Morten Olsen
523637d40f add authentik 2025-07-30 13:42:25 +02:00
Morten Olsen
dd1e5a8124 add deployments 2025-07-28 23:23:34 +02:00
270 changed files with 131676 additions and 2232 deletions

View File

@@ -1,5 +1,5 @@
name-template: "$RESOLVED_VERSION 🌈"
tag-template: "$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:

View File

@@ -71,52 +71,23 @@ jobs:
environment: release
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
- id: create-release
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-config.yml
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
permissions:
contents: read
packages: write
attestations: write
id-token: write
pages: write
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./operator.yaml
asset_name: operator.yaml
asset_content_type: application/yaml

View File

@@ -2,8 +2,10 @@ name: Publish tag
on:
push:
branches:
- 'main'
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v*"
env:
environment: test

4
.gitignore vendored
View File

@@ -32,3 +32,7 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# Finder (MacOS) folder config
.DS_Store
/data/
/cloudflare.yaml

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.13

View File

@@ -1,6 +1,6 @@
FROM node:23-alpine
FROM node:23-slim
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod
COPY . .
CMD ["node", "src/index.ts"]
CMD ["node", "src/index.ts"]

14
Makefile Normal file
View File

@@ -0,0 +1,14 @@
.PHONY: dev-recreate dev-destroy server-install
dev-destroy:
colima delete -f
dev-recreate: dev-destroy
colima start --network-address --kubernetes -m 8 --k3s-arg="--disable helm-controller,local-storage,traefik --docker" # --mount ${PWD}/data:/data:w
flux install --components="source-controller,helm-controller"
setup-flux:
flux install --components="source-controller,helm-controller"
server-install:
curl -sfL https://get.k3s.io | sh -s - --disable traefik,local-storage,helm-controller

View File

@@ -1,15 +0,0 @@
# homelab-operator
To install dependencies:
```bash
bun install
```
To run:
```bash
bun run index.ts
```
This project was created using `bun init` in bun v1.2.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.

View File

@@ -1,14 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "homelab-operator.fullname" . }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "get", "watch", "list"]
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "watch", "list", "patch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "create", "replace"]

View File

@@ -0,0 +1,3 @@
apiVersion: v2
version: 1.0.0
name: ByteStash

View File

@@ -0,0 +1,11 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: HttpService
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.environment }}'
subdomain: '{{ .Values.subdomain }}'
destination:
host: '{{ .Release.Name }}'
port:
number: 80

View File

@@ -0,0 +1,10 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: OidcClient
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.environment }}'
redirectUris:
- path: /api/auth/oidc/callback
subdomain: bytestash
matchingMode: strict

View File

@@ -0,0 +1,11 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: ExternalHttpService
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.environment }}'
subdomain: '{{ .Values.subdomain }}'
destination:
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
port:
number: 80

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: '{{ .Release.Name }}-headless'
labels:
app: '{{ .Release.Name }}'
spec:
clusterIP: None
ports:
- port: 5000
name: http
selector:
app: '{{ .Release.Name }}'

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: '{{ .Release.Name }}'
labels:
app: '{{ .Release.Name }}'
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 5000
protocol: TCP
name: http
selector:
app: '{{ .Release.Name }}'

View File

@@ -0,0 +1,63 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: '{{ .Release.Name }}'
labels:
app: '{{ .Release.Name }}'
spec:
serviceName: '{{ .Release.Name }}-headless'
replicas: 1
selector:
matchLabels:
app: '{{ .Release.Name }}'
template:
metadata:
labels:
app: '{{ .Release.Name }}'
spec:
containers:
- name: '{{ .Release.Name }}'
image: ghcr.io/jordan-dalby/bytestash:latest
ports:
- containerPort: 5000
name: http
env:
- name: OIDC_ENABLED
value: 'true'
- name: OIDC_DISPLAY_NAME
value: OIDC
- name: OIDC_CLIENT_ID
valueFrom:
secretKeyRef:
name: '{{ .Release.Name }}-client'
key: clientId
- name: OIDC_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: '{{ .Release.Name }}-client'
key: clientSecret
- name: OIDC_ISSUER_URL
valueFrom:
secretKeyRef:
name: '{{ .Release.Name }}-client'
key: configuration
volumeMounts:
- mountPath: /data/snippets
name: bytestash-data
# Defines security context for the pod to avoid running as root.
# securityContext:
# runAsUser: 1000
# runAsGroup: 1000
# fsGroup: 1000
volumeClaimTemplates:
- metadata:
name: bytestash-data
spec:
accessModes: ['ReadWriteOnce']
storageClassName: '{{ .Values.environment }}'
resources:
requests:
storage: 5Gi

View File

@@ -0,0 +1,2 @@
environment: dev
subdomain: bytestash

View File

@@ -0,0 +1,3 @@
apiVersion: v2
version: 1.0.0
name: Jellyfin

View File

@@ -0,0 +1,10 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: OidcClient
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.environment }}'
redirectUris:
- path: /api/auth/oidc/callback
subdomain: '{{ .Values.subdomain }}'
matchingMode: strict

View File

@@ -0,0 +1,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: '{{ .Release.Name }}-config'
spec:
accessModes:
- 'ReadWriteOnce'
resources:
requests:
storage: '1Gi'
storageClassName: '{{ .Values.environment }}'

View File

@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: '{{ .Release.Name }}'
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: '{{ .Release.Name }}'
template:
metadata:
labels:
app: '{{ .Release.Name }}'
spec:
containers:
- name: '{{ .Release.Name }}'
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
ports:
- name: http
containerPort: 8096
protocol: TCP
livenessProbe:
tcpSocket:
port: http
readinessProbe:
tcpSocket:
port: http
volumeMounts:
- mountPath: /config
name: config
- mountPath: /media/movies
name: movies
volumes:
- name: config
persistentVolumeClaim:
claimName: '{{ .Release.Name }}-config'
- name: movies
persistentVolumeClaim:
claimName: 'movies'

View File

@@ -0,0 +1,11 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: ExternalHttpService
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.environment }}'
subdomain: '{{ .Values.subdomain }}'
destination:
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
port:
number: 80

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: '{{ .Release.Name }}'
labels:
app: '{{ .Release.Name }}'
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8096
protocol: TCP
name: http
selector:
app: '{{ .Release.Name }}'

View File

@@ -0,0 +1,6 @@
image:
repository: docker.io/jellyfin/jellyfin
tag: latest
pullPolicy: IfNotPresent
environment: dev
subdomain: jellyfin

View File

@@ -0,0 +1,3 @@
apiVersion: v2
version: 1.0.0
name: Ollama

View File

@@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: '{{ .Release.Name }}'
labels:
app: '{{ .Release.Name }}'
spec:
replicas: 1
selector:
matchLabels:
app: '{{ .Release.Name }}'
template:
metadata:
labels:
app: '{{ .Release.Name }}'
spec:
containers:
- name: ollama
image: ghcr.io/ollama/ollama:latest # Official image
imagePullPolicy: IfNotPresent
ports:
- containerPort: 11434
name: http
volumeMounts:
- name: ollama-data
mountPath: /root/.ollama
env:
# If you want to prestart a model, set this env var to the
# model name (e.g., "gpt-4o-mini"). The container will download
# it automatically at startup.
# - name: OLLAMA_MODEL
# value: "gpt-4o-mini"
readinessProbe:
httpGet:
scheme: HTTP
path: /api/status
port: 11434
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 2000m
memory: 4Gi
volumes:
- name: ollama-data
persistentVolumeClaim:
claimName: '{{ .Release.Name }}-data'

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: '{{ .Release.Name }}-data'
spec:
storageClassName: '{{ .Values.environment }}'
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: '{{ .Release.Name }}'
labels:
app: '{{ .Release.Name }}'
spec:
type: LoadBalancer # Set to NodePort/ClusterIP if you prefer
ports:
- name: http
port: 11434
targetPort: http
protocol: TCP
selector:
app: '{{ .Release.Name }}'

View File

@@ -0,0 +1,2 @@
environment: dev
subdomain: bytestash

View File

@@ -0,0 +1,12 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ include "homelab-operator.fullname" . }}-local-path
labels:
{{- include "homelab-operator.labels" . | nindent 4 }}
provisioner: reuse-local-path-provisioner
parameters:
# Add any provisioner-specific parameters here
reclaimPolicy: {{ .Values.storage.reclaimPolicy | default "Retain" }}
allowVolumeExpansion: {{ .Values.storage.allowVolumeExpansion | default false }}
volumeBindingMode: {{ .Values.storage.volumeBindingMode | default "WaitForFirstConsumer" }}

View File

@@ -0,0 +1,32 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "homelab-operator.fullname" . }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "get", "watch", "list"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "watch", "list", "patch", "create", "update", "replace"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "create", "update", "replace", "patch"]

View File

@@ -33,6 +33,14 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: data-volumes
mountPath: {{ .Values.storage.path }}
volumes:
- name: data-volumes
hostPath:
path: {{ .Values.storage.path }}
type: DirectoryOrCreate
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@@ -6,11 +6,17 @@ image:
repository: ghcr.io/morten-olsen/homelab-operator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: main
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
nameOverride: ''
fullnameOverride: ''
storage:
path: /data/volumes
reclaimPolicy: Retain
allowVolumeExpansion: false
volumeBindingMode: WaitForFirstConsumer
serviceAccount:
# Specifies whether a service account should be created
@@ -19,7 +25,7 @@ serviceAccount:
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
name: ''
podAnnotations: {}

View File

@@ -0,0 +1,3 @@
apiVersion: v2
version: 1.0.0
name: Resources

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: books
labels:
type: nfs
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
hostPath: null
nfs:
path: '{{ .Values.books.path }}'
server: '{{ .Values.host }}'
readOnly: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: books
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: movies
labels:
type: nfs
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
hostPath: null
nfs:
path: '{{ .Values.movies.path }}'
server: '{{ .Values.host }}'
readOnly: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: movies
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: music
labels:
type: nfs
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
hostPath: null
nfs:
path: '{{ .Values.music.path }}'
server: '{{ .Values.host }}'
readOnly: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: music
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: podcasts
labels:
type: nfs
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
hostPath: null
nfs:
path: '{{ .Values.podcasts.path }}'
server: '{{ .Values.host }}'
readOnly: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: podcasts
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: tv-shows
labels:
type: nfs
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: manual
hostPath: null
nfs:
path: '{{ .Values.tv-shows.path }}'
server: '{{ .Values.host }}'
readOnly: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tv-shows
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,11 @@
host: 192.168.20.106
movies:
path: /mnt/HDD/Movies
tv-shows:
path: /mnt/HDD/TV-Shows
music:
path: /mnt/HDD/Music2
books:
path: /mnt/HDD/Books
podcats:
path: /mnt/HDD/Podcasts

View File

@@ -1,12 +0,0 @@
name: homelab
services:
postgres:
image: postgres:17
ports:
- 5432:5432
environment:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: ${POSTGRES_DB:-postgres}
volumes:
- $PWD/.data/local/postgres:/var/lib/postgresql/data

View File

@@ -46,6 +46,6 @@ export default tseslint.config(
},
...compat.extends('plugin:prettier/recommended'),
{
ignores: ['**/node_modules/', '**/dist/', '**/.turbo/', '**/generated/'],
ignores: ['**/node_modules/', '**/dist/', '**/.turbo/', '**/generated/', '**/clients/*.types.ts'],
},
);

22
istio-test.yaml Normal file
View File

@@ -0,0 +1,22 @@
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: dev-authentik-override
namespace: dev
spec:
hosts:
- authentik.mortenolsen.nett
ports:
- number: 443
name: https
protocol: HTTPS
- number: 80
name: http
protocol: HTTP
location: MESH_EXTERNAL
resolution: STATIC
endpoints:
- address: 1.1.1.1
ports:
https: 443
http: 80

9
manifests/client.yaml Normal file
View File

@@ -0,0 +1,9 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: OidcClient
metadata:
name: test-client
spec:
environment: dev
redirectUris:
- url: https://localhost:3000/api/v1/authentik/oauth2/callback
matchingMode: strict

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Namespace
metadata:
name: dev
---
apiVersion: homelab.mortenolsen.pro/v1
kind: Environment
metadata:
name: dev
spec:
domain: mortenolsen.net
networkIp: 192.168.64.2
tls:
issuer: lets-encrypt-prod

View File

@@ -0,0 +1,39 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: example-pvc
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: homelab-operator-local-path
---
apiVersion: v1
kind: Pod
metadata:
name: example-pod
namespace: default
spec:
containers:
- name: example-container
image: alpine
command: ["/bin/sh", "-c", "sleep infinity"]
volumeMounts:
- name: example-volume
mountPath: /data
resources:
limits:
memory: 100Mi
cpu: "0.1"
requests:
memory: 50Mi
cpu: "0.05"
volumes:
- name: example-volume
persistentVolumeClaim:
claimName: example-pvc

View File

@@ -0,0 +1,14 @@
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: test-example-com
namespace: dev
spec:
hosts:
- authentik.one.dev.olsen.cloud
# (the address field is optional if you use 'resolution: DNS')
ports:
- number: 80
name: https
protocol: HTTPS
resolution: DNS

35
operator.yaml Normal file
View File

@@ -0,0 +1,35 @@
apiVersion: v1
kind: Namespace
metadata:
name: homelab
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: homelab
namespace: homelab
spec:
interval: 60m
url: https://github.com/morten-olsen/homelab-operator
ref:
branch: main
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: operator
namespace: homelab
spec:
releaseName: operator
interval: 60m
chart:
spec:
chart: charts/operator
sourceRef:
kind: GitRepository
name: homelab
namespace: homelab

View File

@@ -4,15 +4,14 @@
"type": "module",
"private": true,
"devDependencies": {
"@types/bun": "latest",
"nodemon": "^3.1.10",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.32.0",
"@pnpm/find-workspace-packages": "6.0.9",
"@types/deep-equal": "^1.0.4",
"eslint": "9.32.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-prettier": "5.5.3",
"json-schema-to-typescript": "^15.0.4",
"prettier": "3.6.2",
"typescript": "5.8.3",
"typescript-eslint": "8.38.0"
@@ -21,17 +20,37 @@
"typescript": "^5"
},
"dependencies": {
"@goauthentik/api": "2025.6.3-1751754396",
"@kubernetes/client-node": "^1.3.0",
"@sinclair/typebox": "^0.34.38",
"cloudflare": "^4.5.0",
"cron": "^4.3.3",
"debounce": "^2.2.0",
"deep-equal": "^2.2.3",
"dotenv": "^17.2.1",
"eventemitter3": "^5.0.1",
"execa": "^9.6.0",
"knex": "^3.1.0",
"p-queue": "^8.1.0",
"p-retry": "^6.2.1",
"pg": "^8.16.3",
"sqlite3": "^5.1.7"
"sqlite3": "^5.1.7",
"yaml": "^2.8.0",
"zod": "^4.0.14"
},
"imports": {
"#services/*": "./src/services/*",
"#resources/*": "./src/resources/*",
"#bootstrap/*": "./src/bootstrap/*",
"#utils/*": "./src/utils/*"
},
"packageManager": "pnpm@10.6.0",
"pnpm": {
"onlyBuiltDependencies": [
"sqlite3"
]
],
"patchedDependencies": {
"@kubernetes/client-node": "patches/@kubernetes__client-node.patch"
}
},
"scripts": {
"test": "echo 'No tests'",

View File

@@ -0,0 +1,14 @@
diff --git a/dist/gen/models/ObjectSerializer.js b/dist/gen/models/ObjectSerializer.js
index 1d798b6a2d7c059165d1df9fbb77b89a8317ebca..c8bacfdc95be0f0146c6505f89a9372e013afea4 100644
--- a/dist/gen/models/ObjectSerializer.js
+++ b/dist/gen/models/ObjectSerializer.js
@@ -2216,6 +2216,9 @@ export class ObjectSerializer {
return transformedData;
}
else if (type === "Date") {
+ if (typeof data === "string") {
+ return data;
+ }
if (format == "date") {
let month = data.getMonth() + 1;
month = month < 10 ? "0" + month.toString() : month.toString();

1638
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
apiVersion: 'homelab.mortenolsen.pro/v1';
kind: 'PostgresDatabase';
name: 'test2';
namespace: 'playground';
foo: 'bar';
foo: 'bar';
{
}

9
pyproject.toml Normal file
View File

@@ -0,0 +1,9 @@
[project]
name = "homelab-operator"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"kubediagrams>=0.5.0",
]

49
scripts/update-manifests.ts Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env node
import { mkdir, writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import { compile } from 'json-schema-to-typescript';
import { K8sService } from '../src/services/k8s/k8s.ts';
import { Services } from '../src/utils/service.ts';
const services = new Services();
const k8s = services.get(K8sService);
const manifests = await k8s.extensionsApi.listCustomResourceDefinition();
const root = join(import.meta.dirname, '..', 'src', '__generated__', 'resources');
await mkdir(root, { recursive: true });
const firstUpsercase = (input: string) => {
const [first, ...rest] = input.split('');
return [first.toUpperCase(), ...rest].join('');
};
for (const manifest of manifests.items) {
for (const version of manifest.spec.versions) {
try {
const schema = version.schema?.openAPIV3Schema;
if (!schema) {
continue;
}
const cleanedSchema = JSON.parse(JSON.stringify(schema));
const kind = manifest.spec.names.kind;
const typeName = `K8S${kind}${firstUpsercase(version.name)}`;
const jsonLocation = join(root, `${typeName}.json`);
await writeFile(jsonLocation, JSON.stringify(schema, null, 2));
const file = await compile(cleanedSchema, typeName, {
declareExternallyReferenced: true,
additionalProperties: false,
$refOptions: {
continueOnError: true,
},
});
const fileLocation = join(root, `${typeName}.ts`);
await writeFile(fileLocation, file, 'utf8');
} catch (err) {
console.error(err);
console.error(`${manifest.metadata?.name} ${version.name} failed`);
}
}
}

31
skaffold.yaml Normal file
View File

@@ -0,0 +1,31 @@
apiVersion: skaffold/v4beta7
kind: Config
metadata:
name: homelab-operator
build:
# This tells Skaffold to build the image locally using your Docker daemon.
local:
push: false
# This is the crucial part for your workflow. Instead of pushing to a
# registry, it loads the built image directly into your cluster's nodes.
# load: true
artifacts:
# Defines the image to build. It matches the placeholder in deployment.yaml.
- image: homelaboperator
context: . # The build context is the root directory
docker:
dockerfile: Dockerfile
manifests:
helm:
releases:
- name: homelab-operator
chartPath: charts/operator
setValueTemplates:
image.repository: '{{.IMAGE_REPO_homelaboperator}}'
image.tag: '{{.IMAGE_TAG_homelaboperator}}'
deploy:
# Use kubectl to apply the manifests.
kubectl: {}

View File

@@ -0,0 +1,31 @@
{
"description": "Addon is used to track application of a manifest file on disk. It mostly exists so that the wrangler DesiredSet\nApply controller has an object to track as the owner, and ensure that all created resources are tracked when the\nmanifest is modified or removed.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "Spec provides information about the on-disk manifest backing this resource.",
"properties": {
"checksum": {
"description": "Checksum is the SHA256 checksum of the most recently successfully applied manifest file.",
"type": "string"
},
"source": {
"description": "Source is the Path on disk to the manifest file that this Addon tracks.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,43 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Addon is used to track application of a manifest file on disk. It mostly exists so that the wrangler DesiredSet
* Apply controller has an object to track as the owner, and ensure that all created resources are tracked when the
* manifest is modified or removed.
*/
export interface K8SAddonV1 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata?: {};
/**
* Spec provides information about the on-disk manifest backing this resource.
*/
spec?: {
/**
* Checksum is the SHA256 checksum of the most recently successfully applied manifest file.
*/
checksum?: string;
/**
* Source is the Path on disk to the manifest file that this Addon tracks.
*/
source?: string;
};
}

View File

@@ -0,0 +1,376 @@
{
"description": "AppProject provides a logical grouping of applications, providing controls for:\n* where the apps may deploy to (cluster whitelist)\n* what may be deployed (repository whitelist, resource whitelist/blacklist)\n* who can access these applications (roles, OIDC group claims bindings)\n* and what they can do (RBAC policies)\n* automation access to these roles (JWT tokens)",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "AppProjectSpec is the specification of an AppProject",
"properties": {
"clusterResourceBlacklist": {
"description": "ClusterResourceBlacklist contains list of blacklisted cluster level resources",
"items": {
"description": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying\nconcepts during lookup stages without having partially valid types",
"type": "object",
"required": [
"group",
"kind"
],
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
}
}
},
"type": "array"
},
"clusterResourceWhitelist": {
"description": "ClusterResourceWhitelist contains list of whitelisted cluster level resources",
"items": {
"description": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying\nconcepts during lookup stages without having partially valid types",
"type": "object",
"required": [
"group",
"kind"
],
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
}
}
},
"type": "array"
},
"description": {
"description": "Description contains optional project description",
"type": "string"
},
"destinationServiceAccounts": {
"description": "DestinationServiceAccounts holds information about the service accounts to be impersonated for the application sync operation for each destination.",
"items": {
"description": "ApplicationDestinationServiceAccount holds information about the service account to be impersonated for the application sync operation.",
"type": "object",
"required": [
"defaultServiceAccount",
"server"
],
"properties": {
"defaultServiceAccount": {
"description": "DefaultServiceAccount to be used for impersonation during the sync operation",
"type": "string"
},
"namespace": {
"description": "Namespace specifies the target namespace for the application's resources.",
"type": "string"
},
"server": {
"description": "Server specifies the URL of the target cluster's Kubernetes control plane API.",
"type": "string"
}
}
},
"type": "array"
},
"destinations": {
"description": "Destinations contains list of destinations available for deployment",
"items": {
"description": "ApplicationDestination holds information about the application's destination",
"type": "object",
"properties": {
"name": {
"description": "Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.",
"type": "string"
},
"namespace": {
"description": "Namespace specifies the target namespace for the application's resources.\nThe namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace",
"type": "string"
},
"server": {
"description": "Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set.",
"type": "string"
}
}
},
"type": "array"
},
"namespaceResourceBlacklist": {
"description": "NamespaceResourceBlacklist contains list of blacklisted namespace level resources",
"items": {
"description": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying\nconcepts during lookup stages without having partially valid types",
"type": "object",
"required": [
"group",
"kind"
],
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
}
}
},
"type": "array"
},
"namespaceResourceWhitelist": {
"description": "NamespaceResourceWhitelist contains list of whitelisted namespace level resources",
"items": {
"description": "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying\nconcepts during lookup stages without having partially valid types",
"type": "object",
"required": [
"group",
"kind"
],
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
}
}
},
"type": "array"
},
"orphanedResources": {
"description": "OrphanedResources specifies if controller should monitor orphaned resources of apps in this project",
"properties": {
"ignore": {
"description": "Ignore contains a list of resources that are to be excluded from orphaned resources monitoring",
"items": {
"description": "OrphanedResourceKey is a reference to a resource to be ignored from",
"type": "object",
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"type": "array"
},
"warn": {
"description": "Warn indicates if warning condition should be created for apps which have orphaned resources",
"type": "boolean"
}
},
"type": "object"
},
"permitOnlyProjectScopedClusters": {
"description": "PermitOnlyProjectScopedClusters determines whether destinations can only reference clusters which are project-scoped",
"type": "boolean"
},
"roles": {
"description": "Roles are user defined RBAC roles associated with this project",
"items": {
"description": "ProjectRole represents a role that has access to a project",
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"description": "Description is a description of the role",
"type": "string"
},
"groups": {
"description": "Groups are a list of OIDC group claims bound to this role",
"type": "array",
"items": {
"type": "string"
}
},
"jwtTokens": {
"description": "JWTTokens are a list of generated JWT tokens bound to this role",
"type": "array",
"items": {
"description": "JWTToken holds the issuedAt and expiresAt values of a token",
"type": "object",
"required": [
"iat"
],
"properties": {
"exp": {
"type": "integer",
"format": "int64"
},
"iat": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "string"
}
}
}
},
"name": {
"description": "Name is a name for this role",
"type": "string"
},
"policies": {
"description": "Policies Stores a list of casbin formatted strings that define access policies for the role in the project",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"type": "array"
},
"signatureKeys": {
"description": "SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync",
"items": {
"description": "SignatureKey is the specification of a key required to verify commit signatures with",
"type": "object",
"required": [
"keyID"
],
"properties": {
"keyID": {
"description": "The ID of the key in hexadecimal notation",
"type": "string"
}
}
},
"type": "array"
},
"sourceNamespaces": {
"description": "SourceNamespaces defines the namespaces application resources are allowed to be created in",
"items": {
"type": "string"
},
"type": "array"
},
"sourceRepos": {
"description": "SourceRepos contains list of repository URLs which can be used for deployment",
"items": {
"type": "string"
},
"type": "array"
},
"syncWindows": {
"description": "SyncWindows controls when syncs can be run for apps in this project",
"items": {
"description": "SyncWindow contains the kind, time, duration and attributes that are used to assign the syncWindows to apps",
"type": "object",
"properties": {
"andOperator": {
"description": "UseAndOperator use AND operator for matching applications, namespaces and clusters instead of the default OR operator",
"type": "boolean"
},
"applications": {
"description": "Applications contains a list of applications that the window will apply to",
"type": "array",
"items": {
"type": "string"
}
},
"clusters": {
"description": "Clusters contains a list of clusters that the window will apply to",
"type": "array",
"items": {
"type": "string"
}
},
"duration": {
"description": "Duration is the amount of time the sync window will be open",
"type": "string"
},
"kind": {
"description": "Kind defines if the window allows or blocks syncs",
"type": "string"
},
"manualSync": {
"description": "ManualSync enables manual syncs when they would otherwise be blocked",
"type": "boolean"
},
"namespaces": {
"description": "Namespaces contains a list of namespaces that the window will apply to",
"type": "array",
"items": {
"type": "string"
}
},
"schedule": {
"description": "Schedule is the time the window will begin, specified in cron format",
"type": "string"
},
"timeZone": {
"description": "TimeZone of the sync that will be applied to the schedule",
"type": "string"
}
}
},
"type": "array"
}
},
"type": "object"
},
"status": {
"description": "AppProjectStatus contains status information for AppProject CRs",
"properties": {
"jwtTokensByRole": {
"additionalProperties": {
"description": "JWTTokens represents a list of JWT tokens",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"description": "JWTToken holds the issuedAt and expiresAt values of a token",
"type": "object",
"required": [
"iat"
],
"properties": {
"exp": {
"type": "integer",
"format": "int64"
},
"iat": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "string"
}
}
}
}
}
},
"description": "JWTTokensByRole contains a list of JWT tokens issued for a given role",
"type": "object"
}
},
"type": "object"
}
},
"required": [
"metadata",
"spec"
],
"type": "object"
}

View File

@@ -0,0 +1,233 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* AppProject provides a logical grouping of applications, providing controls for:
* * where the apps may deploy to (cluster whitelist)
* * what may be deployed (repository whitelist, resource whitelist/blacklist)
* * who can access these applications (roles, OIDC group claims bindings)
* * and what they can do (RBAC policies)
* * automation access to these roles (JWT tokens)
*/
export interface K8SAppProjectV1Alpha1 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata: {};
/**
* AppProjectSpec is the specification of an AppProject
*/
spec: {
/**
* ClusterResourceBlacklist contains list of blacklisted cluster level resources
*/
clusterResourceBlacklist?: {
group: string;
kind: string;
}[];
/**
* ClusterResourceWhitelist contains list of whitelisted cluster level resources
*/
clusterResourceWhitelist?: {
group: string;
kind: string;
}[];
/**
* Description contains optional project description
*/
description?: string;
/**
* DestinationServiceAccounts holds information about the service accounts to be impersonated for the application sync operation for each destination.
*/
destinationServiceAccounts?: {
/**
* DefaultServiceAccount to be used for impersonation during the sync operation
*/
defaultServiceAccount: string;
/**
* Namespace specifies the target namespace for the application's resources.
*/
namespace?: string;
/**
* Server specifies the URL of the target cluster's Kubernetes control plane API.
*/
server: string;
}[];
/**
* Destinations contains list of destinations available for deployment
*/
destinations?: {
/**
* Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set.
*/
name?: string;
/**
* Namespace specifies the target namespace for the application's resources.
* The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace
*/
namespace?: string;
/**
* Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set.
*/
server?: string;
}[];
/**
* NamespaceResourceBlacklist contains list of blacklisted namespace level resources
*/
namespaceResourceBlacklist?: {
group: string;
kind: string;
}[];
/**
* NamespaceResourceWhitelist contains list of whitelisted namespace level resources
*/
namespaceResourceWhitelist?: {
group: string;
kind: string;
}[];
/**
* OrphanedResources specifies if controller should monitor orphaned resources of apps in this project
*/
orphanedResources?: {
/**
* Ignore contains a list of resources that are to be excluded from orphaned resources monitoring
*/
ignore?: {
group?: string;
kind?: string;
name?: string;
}[];
/**
* Warn indicates if warning condition should be created for apps which have orphaned resources
*/
warn?: boolean;
};
/**
* PermitOnlyProjectScopedClusters determines whether destinations can only reference clusters which are project-scoped
*/
permitOnlyProjectScopedClusters?: boolean;
/**
* Roles are user defined RBAC roles associated with this project
*/
roles?: {
/**
* Description is a description of the role
*/
description?: string;
/**
* Groups are a list of OIDC group claims bound to this role
*/
groups?: string[];
/**
* JWTTokens are a list of generated JWT tokens bound to this role
*/
jwtTokens?: {
exp?: number;
iat: number;
id?: string;
}[];
/**
* Name is a name for this role
*/
name: string;
/**
* Policies Stores a list of casbin formatted strings that define access policies for the role in the project
*/
policies?: string[];
}[];
/**
* SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync
*/
signatureKeys?: {
/**
* The ID of the key in hexadecimal notation
*/
keyID: string;
}[];
/**
* SourceNamespaces defines the namespaces application resources are allowed to be created in
*/
sourceNamespaces?: string[];
/**
* SourceRepos contains list of repository URLs which can be used for deployment
*/
sourceRepos?: string[];
/**
* SyncWindows controls when syncs can be run for apps in this project
*/
syncWindows?: {
/**
* UseAndOperator use AND operator for matching applications, namespaces and clusters instead of the default OR operator
*/
andOperator?: boolean;
/**
* Applications contains a list of applications that the window will apply to
*/
applications?: string[];
/**
* Clusters contains a list of clusters that the window will apply to
*/
clusters?: string[];
/**
* Duration is the amount of time the sync window will be open
*/
duration?: string;
/**
* Kind defines if the window allows or blocks syncs
*/
kind?: string;
/**
* ManualSync enables manual syncs when they would otherwise be blocked
*/
manualSync?: boolean;
/**
* Namespaces contains a list of namespaces that the window will apply to
*/
namespaces?: string[];
/**
* Schedule is the time the window will begin, specified in cron format
*/
schedule?: string;
/**
* TimeZone of the sync that will be applied to the schedule
*/
timeZone?: string;
}[];
};
/**
* AppProjectStatus contains status information for AppProject CRs
*/
status?: {
/**
* JWTTokensByRole contains a list of JWT tokens issued for a given role
*/
jwtTokensByRole?: {
/**
* JWTTokens represents a list of JWT tokens
*/
[k: string]: {
items?: {
exp?: number;
iat: number;
id?: string;
}[];
};
};
};
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,116 @@
{
"properties": {
"spec": {
"properties": {
"authentik": {
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"clientType": {
"_enum": [
"confidential",
"public"
],
"type": "string"
},
"redirectUris": {
"items": {
"type": "object",
"required": [
"url",
"matchingMode"
],
"properties": {
"matchingMode": {
"type": "string",
"enum": [
"strict",
"regex"
]
},
"url": {
"type": "string"
}
}
},
"type": "array"
},
"subMode": {
"_enum": [
"hashed_user_id",
"user_id",
"user_uuid",
"user_username",
"user_email",
"user_upn",
"11184809"
],
"type": "string"
}
},
"required": [
"authentik",
"redirectUris"
],
"type": "object"
},
"status": {
"properties": {
"conditions": {
"items": {
"type": "object",
"required": [
"type",
"status",
"lastTransitionTime"
],
"properties": {
"lastTransitionTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"type": "string"
}
}
},
"type": "array"
},
"observedGeneration": {
"type": "number"
}
},
"required": [
"observedGeneration",
"conditions"
],
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,31 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SAuthentikClientV1 {
spec?: {
authentik: {
name: string;
namespace?: string;
};
clientType?: string;
redirectUris: {
matchingMode: "strict" | "regex";
url: string;
}[];
subMode?: string;
};
status?: {
conditions: {
lastTransitionTime: string;
message?: string;
reason?: string;
status: "True" | "False" | "Unknown";
type: string;
}[];
observedGeneration: number;
};
}

View File

@@ -0,0 +1,78 @@
{
"properties": {
"spec": {
"properties": {
"domain": {
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"subdomain": {
"type": "string"
}
},
"required": [
"domain",
"subdomain"
],
"type": "object"
},
"status": {
"properties": {
"conditions": {
"items": {
"type": "object",
"required": [
"type",
"status",
"lastTransitionTime"
],
"properties": {
"lastTransitionTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"type": "string"
}
}
},
"type": "array"
},
"observedGeneration": {
"type": "number"
}
},
"required": [
"observedGeneration",
"conditions"
],
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,26 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SAuthentikServerV1 {
spec?: {
domain: {
name: string;
namespace?: string;
};
subdomain: string;
};
status?: {
conditions: {
lastTransitionTime: string;
message?: string;
reason?: string;
status: "True" | "False" | "Unknown";
type: string;
}[];
observedGeneration: number;
};
}

View File

@@ -0,0 +1,463 @@
{
"properties": {
"spec": {
"description": "Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html",
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"provider"
]
}
]
}
},
{
"required": [
"provider"
]
}
],
"properties": {
"action": {
"description": "Optional.\n\nValid Options: ALLOW, DENY, AUDIT, CUSTOM",
"_enum": [
"ALLOW",
"DENY",
"AUDIT",
"CUSTOM"
],
"type": "string"
},
"provider": {
"description": "Specifies detailed configuration of the CUSTOM action.",
"properties": {
"name": {
"description": "Specifies the name of the extension provider.",
"type": "string"
}
},
"type": "object"
},
"rules": {
"description": "Optional.",
"items": {
"type": "object",
"properties": {
"from": {
"description": "Optional.",
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"description": "Source specifies the source of a request.",
"type": "object",
"properties": {
"ipBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"namespaces": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notIpBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notNamespaces": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notPrincipals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notRemoteIpBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notRequestPrincipals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"principals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"remoteIpBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"requestPrincipals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"to": {
"description": "Optional.",
"type": "array",
"items": {
"type": "object",
"properties": {
"operation": {
"description": "Operation specifies the operation of a request.",
"type": "object",
"properties": {
"hosts": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"methods": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notHosts": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notMethods": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notPaths": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notPorts": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"paths": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"ports": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"when": {
"description": "Optional.",
"type": "array",
"items": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"description": "The name of an Istio attribute.",
"type": "string"
},
"notValues": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"values": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"type": "array"
},
"selector": {
"description": "Optional.",
"properties": {
"matchLabels": {
"additionalProperties": {
"type": "string",
"maxLength": 63,
"x-kubernetes-validations": [
{
"rule": "!self.contains('*')",
"message": "wildcard not allowed in label value match"
}
]
},
"description": "One or more labels that indicate a specific set of pods/VMs on which a policy should be applied.",
"maxProperties": 4096,
"type": "object",
"x_kubernetes_validations": [
{
"message": "wildcard not allowed in label key match",
"rule": "self.all(key, !key.contains('*'))"
},
{
"message": "key must not be empty",
"rule": "self.all(key, key.size() != 0)"
}
]
}
},
"type": "object"
},
"targetRef": {
"properties": {
"group": {
"description": "group is the group of the target resource.",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"description": "kind is kind of the target resource.",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"description": "name is the name of the target resource.",
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"description": "namespace is the namespace of the referent.",
"type": "string",
"x_kubernetes_validations": [
{
"message": "cross namespace referencing is not currently supported",
"rule": "self.size() == 0"
}
]
}
},
"required": [
"kind",
"name"
],
"type": "object",
"x_kubernetes_validations": [
{
"message": "Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway",
"rule": "[self.group, self.kind] in [['core','Service'], ['','Service'], ['gateway.networking.k8s.io','Gateway'], ['networking.istio.io','ServiceEntry']]"
}
]
},
"targetRefs": {
"description": "Optional.",
"items": {
"type": "object",
"required": [
"kind",
"name"
],
"properties": {
"group": {
"description": "group is the group of the target resource.",
"type": "string",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
},
"kind": {
"description": "kind is kind of the target resource.",
"type": "string",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
},
"name": {
"description": "name is the name of the target resource.",
"type": "string",
"maxLength": 253,
"minLength": 1
},
"namespace": {
"description": "namespace is the namespace of the referent.",
"type": "string",
"x-kubernetes-validations": [
{
"rule": "self.size() == 0",
"message": "cross namespace referencing is not currently supported"
}
]
}
},
"x-kubernetes-validations": [
{
"rule": "[self.group, self.kind] in [['core','Service'], ['','Service'], ['gateway.networking.k8s.io','Gateway'], ['networking.istio.io','ServiceEntry']]",
"message": "Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway"
}
]
},
"maxItems": 16,
"type": "array"
}
},
"type": "object",
"x_kubernetes_validations": [
{
"message": "only one of targetRefs or selector can be set",
"rule": "(has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1"
}
]
},
"status": {
"properties": {
"conditions": {
"description": "Current service state of the resource.",
"items": {
"type": "object",
"properties": {
"lastProbeTime": {
"description": "Last time we probed the condition.",
"type": "string",
"format": "date-time"
},
"lastTransitionTime": {
"description": "Last time the condition transitioned from one status to another.",
"type": "string",
"format": "date-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.",
"type": "string"
},
"type": {
"description": "Type is the type of the condition.",
"type": "string"
}
}
},
"type": "array"
},
"observedGeneration": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "Resource Generation to which the Reconciled Condition refers.",
"x_kubernetes_int_or_string": true
},
"validationMessages": {
"description": "Includes any errors or warnings detected by Istio's analyzers.",
"items": {
"type": "object",
"properties": {
"documentationUrl": {
"description": "A url pointing to the Istio documentation for this specific error type.",
"type": "string"
},
"level": {
"description": "Represents how severe a message is.\n\nValid Options: UNKNOWN, ERROR, WARNING, INFO",
"type": "string",
"enum": [
"UNKNOWN",
"ERROR",
"WARNING",
"INFO"
]
},
"type": {
"type": "object",
"properties": {
"code": {
"description": "A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.",
"type": "string"
},
"name": {
"description": "A human-readable name for the message type.",
"type": "string"
}
}
}
}
},
"type": "array"
}
},
"type": "object",
"x_kubernetes_preserve_unknown_fields": true
}
},
"type": "object"
}

View File

@@ -0,0 +1,75 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SAuthorizationPolicyV1 {
/**
* Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html
*/
spec?: {
[k: string]: unknown;
};
status?: {
/**
* Current service state of the resource.
*/
conditions?: {
/**
* Last time we probed the condition.
*/
lastProbeTime?: string;
/**
* Last time the condition transitioned from one status to another.
*/
lastTransitionTime?: string;
/**
* Human-readable message indicating details about last transition.
*/
message?: string;
/**
* Unique, one-word, CamelCase reason for the condition's last transition.
*/
reason?: string;
/**
* Status is the status of the condition.
*/
status?: string;
/**
* Type is the type of the condition.
*/
type?: string;
}[];
/**
* Resource Generation to which the Reconciled Condition refers.
*/
observedGeneration?: number | string;
/**
* Includes any errors or warnings detected by Istio's analyzers.
*/
validationMessages?: {
/**
* A url pointing to the Istio documentation for this specific error type.
*/
documentationUrl?: string;
/**
* Represents how severe a message is.
*
* Valid Options: UNKNOWN, ERROR, WARNING, INFO
*/
level?: "UNKNOWN" | "ERROR" | "WARNING" | "INFO";
type?: {
/**
* A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.
*/
code?: string;
/**
* A human-readable name for the message type.
*/
name?: string;
};
}[];
};
}

View File

@@ -0,0 +1,463 @@
{
"properties": {
"spec": {
"description": "Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html",
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"provider"
]
}
]
}
},
{
"required": [
"provider"
]
}
],
"properties": {
"action": {
"description": "Optional.\n\nValid Options: ALLOW, DENY, AUDIT, CUSTOM",
"_enum": [
"ALLOW",
"DENY",
"AUDIT",
"CUSTOM"
],
"type": "string"
},
"provider": {
"description": "Specifies detailed configuration of the CUSTOM action.",
"properties": {
"name": {
"description": "Specifies the name of the extension provider.",
"type": "string"
}
},
"type": "object"
},
"rules": {
"description": "Optional.",
"items": {
"type": "object",
"properties": {
"from": {
"description": "Optional.",
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"description": "Source specifies the source of a request.",
"type": "object",
"properties": {
"ipBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"namespaces": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notIpBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notNamespaces": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notPrincipals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notRemoteIpBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notRequestPrincipals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"principals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"remoteIpBlocks": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"requestPrincipals": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"to": {
"description": "Optional.",
"type": "array",
"items": {
"type": "object",
"properties": {
"operation": {
"description": "Operation specifies the operation of a request.",
"type": "object",
"properties": {
"hosts": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"methods": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notHosts": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notMethods": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notPaths": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"notPorts": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"paths": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"ports": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"when": {
"description": "Optional.",
"type": "array",
"items": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"description": "The name of an Istio attribute.",
"type": "string"
},
"notValues": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
},
"values": {
"description": "Optional.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"type": "array"
},
"selector": {
"description": "Optional.",
"properties": {
"matchLabels": {
"additionalProperties": {
"type": "string",
"maxLength": 63,
"x-kubernetes-validations": [
{
"rule": "!self.contains('*')",
"message": "wildcard not allowed in label value match"
}
]
},
"description": "One or more labels that indicate a specific set of pods/VMs on which a policy should be applied.",
"maxProperties": 4096,
"type": "object",
"x_kubernetes_validations": [
{
"message": "wildcard not allowed in label key match",
"rule": "self.all(key, !key.contains('*'))"
},
{
"message": "key must not be empty",
"rule": "self.all(key, key.size() != 0)"
}
]
}
},
"type": "object"
},
"targetRef": {
"properties": {
"group": {
"description": "group is the group of the target resource.",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
"type": "string"
},
"kind": {
"description": "kind is kind of the target resource.",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"description": "name is the name of the target resource.",
"maxLength": 253,
"minLength": 1,
"type": "string"
},
"namespace": {
"description": "namespace is the namespace of the referent.",
"type": "string",
"x_kubernetes_validations": [
{
"message": "cross namespace referencing is not currently supported",
"rule": "self.size() == 0"
}
]
}
},
"required": [
"kind",
"name"
],
"type": "object",
"x_kubernetes_validations": [
{
"message": "Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway",
"rule": "[self.group, self.kind] in [['core','Service'], ['','Service'], ['gateway.networking.k8s.io','Gateway'], ['networking.istio.io','ServiceEntry']]"
}
]
},
"targetRefs": {
"description": "Optional.",
"items": {
"type": "object",
"required": [
"kind",
"name"
],
"properties": {
"group": {
"description": "group is the group of the target resource.",
"type": "string",
"maxLength": 253,
"pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
},
"kind": {
"description": "kind is kind of the target resource.",
"type": "string",
"maxLength": 63,
"minLength": 1,
"pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$"
},
"name": {
"description": "name is the name of the target resource.",
"type": "string",
"maxLength": 253,
"minLength": 1
},
"namespace": {
"description": "namespace is the namespace of the referent.",
"type": "string",
"x-kubernetes-validations": [
{
"rule": "self.size() == 0",
"message": "cross namespace referencing is not currently supported"
}
]
}
},
"x-kubernetes-validations": [
{
"rule": "[self.group, self.kind] in [['core','Service'], ['','Service'], ['gateway.networking.k8s.io','Gateway'], ['networking.istio.io','ServiceEntry']]",
"message": "Support kinds are core/Service, networking.istio.io/ServiceEntry, gateway.networking.k8s.io/Gateway"
}
]
},
"maxItems": 16,
"type": "array"
}
},
"type": "object",
"x_kubernetes_validations": [
{
"message": "only one of targetRefs or selector can be set",
"rule": "(has(self.selector)?1:0)+(has(self.targetRef)?1:0)+(has(self.targetRefs)?1:0)<=1"
}
]
},
"status": {
"properties": {
"conditions": {
"description": "Current service state of the resource.",
"items": {
"type": "object",
"properties": {
"lastProbeTime": {
"description": "Last time we probed the condition.",
"type": "string",
"format": "date-time"
},
"lastTransitionTime": {
"description": "Last time the condition transitioned from one status to another.",
"type": "string",
"format": "date-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.",
"type": "string"
},
"type": {
"description": "Type is the type of the condition.",
"type": "string"
}
}
},
"type": "array"
},
"observedGeneration": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "Resource Generation to which the Reconciled Condition refers.",
"x_kubernetes_int_or_string": true
},
"validationMessages": {
"description": "Includes any errors or warnings detected by Istio's analyzers.",
"items": {
"type": "object",
"properties": {
"documentationUrl": {
"description": "A url pointing to the Istio documentation for this specific error type.",
"type": "string"
},
"level": {
"description": "Represents how severe a message is.\n\nValid Options: UNKNOWN, ERROR, WARNING, INFO",
"type": "string",
"enum": [
"UNKNOWN",
"ERROR",
"WARNING",
"INFO"
]
},
"type": {
"type": "object",
"properties": {
"code": {
"description": "A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.",
"type": "string"
},
"name": {
"description": "A human-readable name for the message type.",
"type": "string"
}
}
}
}
},
"type": "array"
}
},
"type": "object",
"x_kubernetes_preserve_unknown_fields": true
}
},
"type": "object"
}

View File

@@ -0,0 +1,75 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SAuthorizationPolicyV1Beta1 {
/**
* Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html
*/
spec?: {
[k: string]: unknown;
};
status?: {
/**
* Current service state of the resource.
*/
conditions?: {
/**
* Last time we probed the condition.
*/
lastProbeTime?: string;
/**
* Last time the condition transitioned from one status to another.
*/
lastTransitionTime?: string;
/**
* Human-readable message indicating details about last transition.
*/
message?: string;
/**
* Unique, one-word, CamelCase reason for the condition's last transition.
*/
reason?: string;
/**
* Status is the status of the condition.
*/
status?: string;
/**
* Type is the type of the condition.
*/
type?: string;
}[];
/**
* Resource Generation to which the Reconciled Condition refers.
*/
observedGeneration?: number | string;
/**
* Includes any errors or warnings detected by Istio's analyzers.
*/
validationMessages?: {
/**
* A url pointing to the Istio documentation for this specific error type.
*/
documentationUrl?: string;
/**
* Represents how severe a message is.
*
* Valid Options: UNKNOWN, ERROR, WARNING, INFO
*/
level?: "UNKNOWN" | "ERROR" | "WARNING" | "INFO";
type?: {
/**
* A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.
*/
code?: string;
/**
* A human-readable name for the message type.
*/
name?: string;
};
}[];
};
}

View File

@@ -0,0 +1,315 @@
{
"description": "Bucket is the Schema for the buckets API.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "BucketSpec specifies the required configuration to produce an Artifact for\nan object storage bucket.",
"properties": {
"bucketName": {
"description": "BucketName is the name of the object storage bucket.",
"type": "string"
},
"certSecretRef": {
"description": "CertSecretRef can be given the name of a Secret containing\neither or both of\n\n- a PEM-encoded client certificate (`tls.crt`) and private\nkey (`tls.key`);\n- a PEM-encoded CA certificate (`ca.crt`)\n\nand whichever are supplied, will be used for connecting to the\nbucket. The client cert and key are useful if you are\nauthenticating with a certificate; the CA cert is useful if\nyou are using a self-signed server certificate. The Secret must\nbe of type `Opaque` or `kubernetes.io/tls`.\n\nThis field is only supported for the `generic` provider.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"endpoint": {
"description": "Endpoint is the object storage address the BucketName is located at.",
"type": "string"
},
"ignore": {
"description": "Ignore overrides the set of excluded patterns in the .sourceignore format\n(which is the same as .gitignore). If not provided, a default will be used,\nconsult the documentation for your version to find out what those are.",
"type": "string"
},
"insecure": {
"description": "Insecure allows connecting to a non-TLS HTTP Endpoint.",
"type": "boolean"
},
"interval": {
"description": "Interval at which the Bucket Endpoint is checked for updates.\nThis interval is approximate and may be subject to jitter to ensure\nefficient use of resources.",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$",
"type": "string"
},
"prefix": {
"description": "Prefix to use for server-side filtering of files in the Bucket.",
"type": "string"
},
"provider": {
"_default": "generic",
"description": "Provider of the object storage bucket.\nDefaults to 'generic', which expects an S3 (API) compatible object\nstorage.",
"_enum": [
"generic",
"aws",
"gcp",
"azure"
],
"type": "string"
},
"proxySecretRef": {
"description": "ProxySecretRef specifies the Secret containing the proxy configuration\nto use while communicating with the Bucket server.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"region": {
"description": "Region of the Endpoint where the BucketName is located in.",
"type": "string"
},
"secretRef": {
"description": "SecretRef specifies the Secret containing authentication credentials\nfor the Bucket.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"sts": {
"description": "STS specifies the required configuration to use a Security Token\nService for fetching temporary credentials to authenticate in a\nBucket provider.\n\nThis field is only supported for the `aws` and `generic` providers.",
"properties": {
"certSecretRef": {
"description": "CertSecretRef can be given the name of a Secret containing\neither or both of\n\n- a PEM-encoded client certificate (`tls.crt`) and private\nkey (`tls.key`);\n- a PEM-encoded CA certificate (`ca.crt`)\n\nand whichever are supplied, will be used for connecting to the\nSTS endpoint. The client cert and key are useful if you are\nauthenticating with a certificate; the CA cert is useful if\nyou are using a self-signed server certificate. The Secret must\nbe of type `Opaque` or `kubernetes.io/tls`.\n\nThis field is only supported for the `ldap` provider.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"endpoint": {
"description": "Endpoint is the HTTP/S endpoint of the Security Token Service from\nwhere temporary credentials will be fetched.",
"pattern": "^(http|https)://.*$",
"type": "string"
},
"provider": {
"description": "Provider of the Security Token Service.",
"_enum": [
"aws",
"ldap"
],
"type": "string"
},
"secretRef": {
"description": "SecretRef specifies the Secret containing authentication credentials\nfor the STS endpoint. This Secret must contain the fields `username`\nand `password` and is supported only for the `ldap` provider.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"endpoint",
"provider"
],
"type": "object"
},
"suspend": {
"description": "Suspend tells the controller to suspend the reconciliation of this\nBucket.",
"type": "boolean"
},
"timeout": {
"_default": "60s",
"description": "Timeout for fetch operations, defaults to 60s.",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$",
"type": "string"
}
},
"required": [
"bucketName",
"endpoint",
"interval"
],
"type": "object",
"x_kubernetes_validations": [
{
"message": "STS configuration is only supported for the 'aws' and 'generic' Bucket providers",
"rule": "self.provider == 'aws' || self.provider == 'generic' || !has(self.sts)"
},
{
"message": "'aws' is the only supported STS provider for the 'aws' Bucket provider",
"rule": "self.provider != 'aws' || !has(self.sts) || self.sts.provider == 'aws'"
},
{
"message": "'ldap' is the only supported STS provider for the 'generic' Bucket provider",
"rule": "self.provider != 'generic' || !has(self.sts) || self.sts.provider == 'ldap'"
},
{
"message": "spec.sts.secretRef is not required for the 'aws' STS provider",
"rule": "!has(self.sts) || self.sts.provider != 'aws' || !has(self.sts.secretRef)"
},
{
"message": "spec.sts.certSecretRef is not required for the 'aws' STS provider",
"rule": "!has(self.sts) || self.sts.provider != 'aws' || !has(self.sts.certSecretRef)"
}
]
},
"status": {
"_default": {
"observedGeneration": -1
},
"description": "BucketStatus records the observed state of a Bucket.",
"properties": {
"artifact": {
"description": "Artifact represents the last successful Bucket reconciliation.",
"properties": {
"digest": {
"description": "Digest is the digest of the file in the form of '<algorithm>:<checksum>'.",
"pattern": "^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$",
"type": "string"
},
"lastUpdateTime": {
"description": "LastUpdateTime is the timestamp corresponding to the last update of the\nArtifact.",
"format": "date-time",
"type": "string"
},
"metadata": {
"additionalProperties": {
"type": "string"
},
"description": "Metadata holds upstream information such as OCI annotations.",
"type": "object"
},
"path": {
"description": "Path is the relative file path of the Artifact. It can be used to locate\nthe file in the root of the Artifact storage on the local file system of\nthe controller managing the Source.",
"type": "string"
},
"revision": {
"description": "Revision is a human-readable identifier traceable in the origin source\nsystem. It can be a Git commit SHA, Git tag, a Helm chart version, etc.",
"type": "string"
},
"size": {
"description": "Size is the number of bytes in the file.",
"format": "int64",
"type": "integer"
},
"url": {
"description": "URL is the HTTP address of the Artifact as exposed by the controller\nmanaging the Source. It can be used to retrieve the Artifact for\nconsumption, e.g. by another controller applying the Artifact contents.",
"type": "string"
}
},
"required": [
"lastUpdateTime",
"path",
"revision",
"url"
],
"type": "object"
},
"conditions": {
"description": "Conditions holds the conditions for the Bucket.",
"items": {
"description": "Condition contains details for one aspect of the current state of this API Resource.",
"type": "object",
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"properties": {
"lastTransitionTime": {
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.",
"type": "string",
"format": "date-time"
},
"message": {
"description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
"type": "string",
"maxLength": 32768
},
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
"type": "integer",
"format": "int64",
"minimum": 0
},
"reason": {
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
"type": "string",
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"
},
"status": {
"description": "status of the condition, one of True, False, Unknown.",
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
"type": "string",
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}
}
},
"type": "array"
},
"lastHandledReconcileAt": {
"description": "LastHandledReconcileAt holds the value of the most recent\nreconcile request value, so a change of the annotation value\ncan be detected.",
"type": "string"
},
"observedGeneration": {
"description": "ObservedGeneration is the last observed generation of the Bucket object.",
"format": "int64",
"type": "integer"
},
"observedIgnore": {
"description": "ObservedIgnore is the observed exclusion patterns used for constructing\nthe source artifact.",
"type": "string"
},
"url": {
"description": "URL is the dynamic fetch link for the latest Artifact.\nIt is provided on a \"best effort\" basis, and using the precise\nBucketStatus.Artifact data is recommended.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}

278
src/__generated__/resources/K8SBucketV1.ts generated Normal file
View File

@@ -0,0 +1,278 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Bucket is the Schema for the buckets API.
*/
export interface K8SBucketV1 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata?: {};
/**
* BucketSpec specifies the required configuration to produce an Artifact for
* an object storage bucket.
*/
spec?: {
/**
* BucketName is the name of the object storage bucket.
*/
bucketName: string;
/**
* CertSecretRef can be given the name of a Secret containing
* either or both of
*
* - a PEM-encoded client certificate (`tls.crt`) and private
* key (`tls.key`);
* - a PEM-encoded CA certificate (`ca.crt`)
*
* and whichever are supplied, will be used for connecting to the
* bucket. The client cert and key are useful if you are
* authenticating with a certificate; the CA cert is useful if
* you are using a self-signed server certificate. The Secret must
* be of type `Opaque` or `kubernetes.io/tls`.
*
* This field is only supported for the `generic` provider.
*/
certSecretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* Endpoint is the object storage address the BucketName is located at.
*/
endpoint: string;
/**
* Ignore overrides the set of excluded patterns in the .sourceignore format
* (which is the same as .gitignore). If not provided, a default will be used,
* consult the documentation for your version to find out what those are.
*/
ignore?: string;
/**
* Insecure allows connecting to a non-TLS HTTP Endpoint.
*/
insecure?: boolean;
/**
* Interval at which the Bucket Endpoint is checked for updates.
* This interval is approximate and may be subject to jitter to ensure
* efficient use of resources.
*/
interval: string;
/**
* Prefix to use for server-side filtering of files in the Bucket.
*/
prefix?: string;
/**
* Provider of the object storage bucket.
* Defaults to 'generic', which expects an S3 (API) compatible object
* storage.
*/
provider?: string;
/**
* ProxySecretRef specifies the Secret containing the proxy configuration
* to use while communicating with the Bucket server.
*/
proxySecretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* Region of the Endpoint where the BucketName is located in.
*/
region?: string;
/**
* SecretRef specifies the Secret containing authentication credentials
* for the Bucket.
*/
secretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* STS specifies the required configuration to use a Security Token
* Service for fetching temporary credentials to authenticate in a
* Bucket provider.
*
* This field is only supported for the `aws` and `generic` providers.
*/
sts?: {
/**
* CertSecretRef can be given the name of a Secret containing
* either or both of
*
* - a PEM-encoded client certificate (`tls.crt`) and private
* key (`tls.key`);
* - a PEM-encoded CA certificate (`ca.crt`)
*
* and whichever are supplied, will be used for connecting to the
* STS endpoint. The client cert and key are useful if you are
* authenticating with a certificate; the CA cert is useful if
* you are using a self-signed server certificate. The Secret must
* be of type `Opaque` or `kubernetes.io/tls`.
*
* This field is only supported for the `ldap` provider.
*/
certSecretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* Endpoint is the HTTP/S endpoint of the Security Token Service from
* where temporary credentials will be fetched.
*/
endpoint: string;
/**
* Provider of the Security Token Service.
*/
provider: string;
/**
* SecretRef specifies the Secret containing authentication credentials
* for the STS endpoint. This Secret must contain the fields `username`
* and `password` and is supported only for the `ldap` provider.
*/
secretRef?: {
/**
* Name of the referent.
*/
name: string;
};
};
/**
* Suspend tells the controller to suspend the reconciliation of this
* Bucket.
*/
suspend?: boolean;
/**
* Timeout for fetch operations, defaults to 60s.
*/
timeout?: string;
};
/**
* BucketStatus records the observed state of a Bucket.
*/
status?: {
/**
* Artifact represents the last successful Bucket reconciliation.
*/
artifact?: {
/**
* Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
*/
digest?: string;
/**
* LastUpdateTime is the timestamp corresponding to the last update of the
* Artifact.
*/
lastUpdateTime: string;
/**
* Metadata holds upstream information such as OCI annotations.
*/
metadata?: {
[k: string]: string;
};
/**
* Path is the relative file path of the Artifact. It can be used to locate
* the file in the root of the Artifact storage on the local file system of
* the controller managing the Source.
*/
path: string;
/**
* Revision is a human-readable identifier traceable in the origin source
* system. It can be a Git commit SHA, Git tag, a Helm chart version, etc.
*/
revision: string;
/**
* Size is the number of bytes in the file.
*/
size?: number;
/**
* URL is the HTTP address of the Artifact as exposed by the controller
* managing the Source. It can be used to retrieve the Artifact for
* consumption, e.g. by another controller applying the Artifact contents.
*/
url: string;
};
/**
* Conditions holds the conditions for the Bucket.
*/
conditions?: {
/**
* lastTransitionTime is the last time the condition transitioned from one status to another.
* This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
*/
lastTransitionTime: string;
/**
* message is a human readable message indicating details about the transition.
* This may be an empty string.
*/
message: string;
/**
* observedGeneration represents the .metadata.generation that the condition was set based upon.
* For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
* with respect to the current state of the instance.
*/
observedGeneration?: number;
/**
* reason contains a programmatic identifier indicating the reason for the condition's last transition.
* Producers of specific condition types may define expected values and meanings for this field,
* and whether the values are considered a guaranteed API.
* The value should be a CamelCase string.
* This field may not be empty.
*/
reason: string;
/**
* status of the condition, one of True, False, Unknown.
*/
status: "True" | "False" | "Unknown";
/**
* type of condition in CamelCase or in foo.example.com/CamelCase.
*/
type: string;
}[];
/**
* LastHandledReconcileAt holds the value of the most recent
* reconcile request value, so a change of the annotation value
* can be detected.
*/
lastHandledReconcileAt?: string;
/**
* ObservedGeneration is the last observed generation of the Bucket object.
*/
observedGeneration?: number;
/**
* ObservedIgnore is the observed exclusion patterns used for constructing
* the source artifact.
*/
observedIgnore?: string;
/**
* URL is the dynamic fetch link for the latest Artifact.
* It is provided on a "best effort" basis, and using the precise
* BucketStatus.Artifact data is recommended.
*/
url?: string;
};
}

View File

@@ -0,0 +1,219 @@
{
"description": "Bucket is the Schema for the buckets API",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "BucketSpec defines the desired state of an S3 compatible bucket",
"properties": {
"accessFrom": {
"description": "AccessFrom defines an Access Control List for allowing cross-namespace references to this object.",
"properties": {
"namespaceSelectors": {
"description": "NamespaceSelectors is the list of namespace selectors to which this ACL applies.\nItems in this list are evaluated using a logical OR operation.",
"items": {
"description": "NamespaceSelector selects the namespaces to which this ACL applies.\nAn empty map of MatchLabels matches all namespaces in a cluster.",
"type": "object",
"properties": {
"matchLabels": {
"description": "MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"type": "array"
}
},
"required": [
"namespaceSelectors"
],
"type": "object"
},
"bucketName": {
"description": "The bucket name.",
"type": "string"
},
"endpoint": {
"description": "The bucket endpoint address.",
"type": "string"
},
"ignore": {
"description": "Ignore overrides the set of excluded patterns in the .sourceignore format\n(which is the same as .gitignore). If not provided, a default will be used,\nconsult the documentation for your version to find out what those are.",
"type": "string"
},
"insecure": {
"description": "Insecure allows connecting to a non-TLS S3 HTTP endpoint.",
"type": "boolean"
},
"interval": {
"description": "The interval at which to check for bucket updates.",
"type": "string"
},
"provider": {
"_default": "generic",
"description": "The S3 compatible storage provider name, default ('generic').",
"_enum": [
"generic",
"aws",
"gcp"
],
"type": "string"
},
"region": {
"description": "The bucket region.",
"type": "string"
},
"secretRef": {
"description": "The name of the secret containing authentication credentials\nfor the Bucket.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"suspend": {
"description": "This flag tells the controller to suspend the reconciliation of this source.",
"type": "boolean"
},
"timeout": {
"_default": "60s",
"description": "The timeout for download operations, defaults to 60s.",
"type": "string"
}
},
"required": [
"bucketName",
"endpoint",
"interval"
],
"type": "object"
},
"status": {
"_default": {
"observedGeneration": -1
},
"description": "BucketStatus defines the observed state of a bucket",
"properties": {
"artifact": {
"description": "Artifact represents the output of the last successful Bucket sync.",
"properties": {
"checksum": {
"description": "Checksum is the SHA256 checksum of the artifact.",
"type": "string"
},
"lastUpdateTime": {
"description": "LastUpdateTime is the timestamp corresponding to the last update of this\nartifact.",
"format": "date-time",
"type": "string"
},
"path": {
"description": "Path is the relative file path of this artifact.",
"type": "string"
},
"revision": {
"description": "Revision is a human readable identifier traceable in the origin source\nsystem. It can be a Git commit SHA, Git tag, a Helm index timestamp, a Helm\nchart version, etc.",
"type": "string"
},
"url": {
"description": "URL is the HTTP address of this artifact.",
"type": "string"
}
},
"required": [
"lastUpdateTime",
"path",
"url"
],
"type": "object"
},
"conditions": {
"description": "Conditions holds the conditions for the Bucket.",
"items": {
"description": "Condition contains details for one aspect of the current state of this API Resource.",
"type": "object",
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"properties": {
"lastTransitionTime": {
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.",
"type": "string",
"format": "date-time"
},
"message": {
"description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
"type": "string",
"maxLength": 32768
},
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
"type": "integer",
"format": "int64",
"minimum": 0
},
"reason": {
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
"type": "string",
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"
},
"status": {
"description": "status of the condition, one of True, False, Unknown.",
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
"type": "string",
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}
}
},
"type": "array"
},
"lastHandledReconcileAt": {
"description": "LastHandledReconcileAt holds the value of the most recent\nreconcile request value, so a change of the annotation value\ncan be detected.",
"type": "string"
},
"observedGeneration": {
"description": "ObservedGeneration is the last observed generation.",
"format": "int64",
"type": "integer"
},
"url": {
"description": "URL is the download link for the artifact output of the last Bucket sync.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,184 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Bucket is the Schema for the buckets API
*/
export interface K8SBucketV1Beta1 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata?: {};
/**
* BucketSpec defines the desired state of an S3 compatible bucket
*/
spec?: {
/**
* AccessFrom defines an Access Control List for allowing cross-namespace references to this object.
*/
accessFrom?: {
/**
* NamespaceSelectors is the list of namespace selectors to which this ACL applies.
* Items in this list are evaluated using a logical OR operation.
*/
namespaceSelectors: {
/**
* MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
* map is equivalent to 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?: {
[k: string]: string;
};
}[];
};
/**
* The bucket name.
*/
bucketName: string;
/**
* The bucket endpoint address.
*/
endpoint: string;
/**
* Ignore overrides the set of excluded patterns in the .sourceignore format
* (which is the same as .gitignore). If not provided, a default will be used,
* consult the documentation for your version to find out what those are.
*/
ignore?: string;
/**
* Insecure allows connecting to a non-TLS S3 HTTP endpoint.
*/
insecure?: boolean;
/**
* The interval at which to check for bucket updates.
*/
interval: string;
/**
* The S3 compatible storage provider name, default ('generic').
*/
provider?: string;
/**
* The bucket region.
*/
region?: string;
/**
* The name of the secret containing authentication credentials
* for the Bucket.
*/
secretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* This flag tells the controller to suspend the reconciliation of this source.
*/
suspend?: boolean;
/**
* The timeout for download operations, defaults to 60s.
*/
timeout?: string;
};
/**
* BucketStatus defines the observed state of a bucket
*/
status?: {
/**
* Artifact represents the output of the last successful Bucket sync.
*/
artifact?: {
/**
* Checksum is the SHA256 checksum of the artifact.
*/
checksum?: string;
/**
* LastUpdateTime is the timestamp corresponding to the last update of this
* artifact.
*/
lastUpdateTime: string;
/**
* Path is the relative file path of this artifact.
*/
path: string;
/**
* Revision is a human readable identifier traceable in the origin source
* system. It can be a Git commit SHA, Git tag, a Helm index timestamp, a Helm
* chart version, etc.
*/
revision?: string;
/**
* URL is the HTTP address of this artifact.
*/
url: string;
};
/**
* Conditions holds the conditions for the Bucket.
*/
conditions?: {
/**
* lastTransitionTime is the last time the condition transitioned from one status to another.
* This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
*/
lastTransitionTime: string;
/**
* message is a human readable message indicating details about the transition.
* This may be an empty string.
*/
message: string;
/**
* observedGeneration represents the .metadata.generation that the condition was set based upon.
* For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
* with respect to the current state of the instance.
*/
observedGeneration?: number;
/**
* reason contains a programmatic identifier indicating the reason for the condition's last transition.
* Producers of specific condition types may define expected values and meanings for this field,
* and whether the values are considered a guaranteed API.
* The value should be a CamelCase string.
* This field may not be empty.
*/
reason: string;
/**
* status of the condition, one of True, False, Unknown.
*/
status: "True" | "False" | "Unknown";
/**
* type of condition in CamelCase or in foo.example.com/CamelCase.
*/
type: string;
}[];
/**
* LastHandledReconcileAt holds the value of the most recent
* reconcile request value, so a change of the annotation value
* can be detected.
*/
lastHandledReconcileAt?: string;
/**
* ObservedGeneration is the last observed generation.
*/
observedGeneration?: number;
/**
* URL is the download link for the artifact output of the last Bucket sync.
*/
url?: string;
};
}

View File

@@ -0,0 +1,341 @@
{
"description": "Bucket is the Schema for the buckets API.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "BucketSpec specifies the required configuration to produce an Artifact for\nan object storage bucket.",
"properties": {
"accessFrom": {
"description": "AccessFrom specifies an Access Control List for allowing cross-namespace\nreferences to this object.\nNOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092",
"properties": {
"namespaceSelectors": {
"description": "NamespaceSelectors is the list of namespace selectors to which this ACL applies.\nItems in this list are evaluated using a logical OR operation.",
"items": {
"description": "NamespaceSelector selects the namespaces to which this ACL applies.\nAn empty map of MatchLabels matches all namespaces in a cluster.",
"type": "object",
"properties": {
"matchLabels": {
"description": "MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"type": "array"
}
},
"required": [
"namespaceSelectors"
],
"type": "object"
},
"bucketName": {
"description": "BucketName is the name of the object storage bucket.",
"type": "string"
},
"certSecretRef": {
"description": "CertSecretRef can be given the name of a Secret containing\neither or both of\n\n- a PEM-encoded client certificate (`tls.crt`) and private\nkey (`tls.key`);\n- a PEM-encoded CA certificate (`ca.crt`)\n\nand whichever are supplied, will be used for connecting to the\nbucket. The client cert and key are useful if you are\nauthenticating with a certificate; the CA cert is useful if\nyou are using a self-signed server certificate. The Secret must\nbe of type `Opaque` or `kubernetes.io/tls`.\n\nThis field is only supported for the `generic` provider.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"endpoint": {
"description": "Endpoint is the object storage address the BucketName is located at.",
"type": "string"
},
"ignore": {
"description": "Ignore overrides the set of excluded patterns in the .sourceignore format\n(which is the same as .gitignore). If not provided, a default will be used,\nconsult the documentation for your version to find out what those are.",
"type": "string"
},
"insecure": {
"description": "Insecure allows connecting to a non-TLS HTTP Endpoint.",
"type": "boolean"
},
"interval": {
"description": "Interval at which the Bucket Endpoint is checked for updates.\nThis interval is approximate and may be subject to jitter to ensure\nefficient use of resources.",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$",
"type": "string"
},
"prefix": {
"description": "Prefix to use for server-side filtering of files in the Bucket.",
"type": "string"
},
"provider": {
"_default": "generic",
"description": "Provider of the object storage bucket.\nDefaults to 'generic', which expects an S3 (API) compatible object\nstorage.",
"_enum": [
"generic",
"aws",
"gcp",
"azure"
],
"type": "string"
},
"proxySecretRef": {
"description": "ProxySecretRef specifies the Secret containing the proxy configuration\nto use while communicating with the Bucket server.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"region": {
"description": "Region of the Endpoint where the BucketName is located in.",
"type": "string"
},
"secretRef": {
"description": "SecretRef specifies the Secret containing authentication credentials\nfor the Bucket.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"sts": {
"description": "STS specifies the required configuration to use a Security Token\nService for fetching temporary credentials to authenticate in a\nBucket provider.\n\nThis field is only supported for the `aws` and `generic` providers.",
"properties": {
"certSecretRef": {
"description": "CertSecretRef can be given the name of a Secret containing\neither or both of\n\n- a PEM-encoded client certificate (`tls.crt`) and private\nkey (`tls.key`);\n- a PEM-encoded CA certificate (`ca.crt`)\n\nand whichever are supplied, will be used for connecting to the\nSTS endpoint. The client cert and key are useful if you are\nauthenticating with a certificate; the CA cert is useful if\nyou are using a self-signed server certificate. The Secret must\nbe of type `Opaque` or `kubernetes.io/tls`.\n\nThis field is only supported for the `ldap` provider.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"endpoint": {
"description": "Endpoint is the HTTP/S endpoint of the Security Token Service from\nwhere temporary credentials will be fetched.",
"pattern": "^(http|https)://.*$",
"type": "string"
},
"provider": {
"description": "Provider of the Security Token Service.",
"_enum": [
"aws",
"ldap"
],
"type": "string"
},
"secretRef": {
"description": "SecretRef specifies the Secret containing authentication credentials\nfor the STS endpoint. This Secret must contain the fields `username`\nand `password` and is supported only for the `ldap` provider.",
"properties": {
"name": {
"description": "Name of the referent.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"endpoint",
"provider"
],
"type": "object"
},
"suspend": {
"description": "Suspend tells the controller to suspend the reconciliation of this\nBucket.",
"type": "boolean"
},
"timeout": {
"_default": "60s",
"description": "Timeout for fetch operations, defaults to 60s.",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$",
"type": "string"
}
},
"required": [
"bucketName",
"endpoint",
"interval"
],
"type": "object",
"x_kubernetes_validations": [
{
"message": "STS configuration is only supported for the 'aws' and 'generic' Bucket providers",
"rule": "self.provider == 'aws' || self.provider == 'generic' || !has(self.sts)"
},
{
"message": "'aws' is the only supported STS provider for the 'aws' Bucket provider",
"rule": "self.provider != 'aws' || !has(self.sts) || self.sts.provider == 'aws'"
},
{
"message": "'ldap' is the only supported STS provider for the 'generic' Bucket provider",
"rule": "self.provider != 'generic' || !has(self.sts) || self.sts.provider == 'ldap'"
},
{
"message": "spec.sts.secretRef is not required for the 'aws' STS provider",
"rule": "!has(self.sts) || self.sts.provider != 'aws' || !has(self.sts.secretRef)"
},
{
"message": "spec.sts.certSecretRef is not required for the 'aws' STS provider",
"rule": "!has(self.sts) || self.sts.provider != 'aws' || !has(self.sts.certSecretRef)"
}
]
},
"status": {
"_default": {
"observedGeneration": -1
},
"description": "BucketStatus records the observed state of a Bucket.",
"properties": {
"artifact": {
"description": "Artifact represents the last successful Bucket reconciliation.",
"properties": {
"digest": {
"description": "Digest is the digest of the file in the form of '<algorithm>:<checksum>'.",
"pattern": "^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$",
"type": "string"
},
"lastUpdateTime": {
"description": "LastUpdateTime is the timestamp corresponding to the last update of the\nArtifact.",
"format": "date-time",
"type": "string"
},
"metadata": {
"additionalProperties": {
"type": "string"
},
"description": "Metadata holds upstream information such as OCI annotations.",
"type": "object"
},
"path": {
"description": "Path is the relative file path of the Artifact. It can be used to locate\nthe file in the root of the Artifact storage on the local file system of\nthe controller managing the Source.",
"type": "string"
},
"revision": {
"description": "Revision is a human-readable identifier traceable in the origin source\nsystem. It can be a Git commit SHA, Git tag, a Helm chart version, etc.",
"type": "string"
},
"size": {
"description": "Size is the number of bytes in the file.",
"format": "int64",
"type": "integer"
},
"url": {
"description": "URL is the HTTP address of the Artifact as exposed by the controller\nmanaging the Source. It can be used to retrieve the Artifact for\nconsumption, e.g. by another controller applying the Artifact contents.",
"type": "string"
}
},
"required": [
"lastUpdateTime",
"path",
"revision",
"url"
],
"type": "object"
},
"conditions": {
"description": "Conditions holds the conditions for the Bucket.",
"items": {
"description": "Condition contains details for one aspect of the current state of this API Resource.",
"type": "object",
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"properties": {
"lastTransitionTime": {
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.",
"type": "string",
"format": "date-time"
},
"message": {
"description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
"type": "string",
"maxLength": 32768
},
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
"type": "integer",
"format": "int64",
"minimum": 0
},
"reason": {
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
"type": "string",
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"
},
"status": {
"description": "status of the condition, one of True, False, Unknown.",
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
"type": "string",
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}
}
},
"type": "array"
},
"lastHandledReconcileAt": {
"description": "LastHandledReconcileAt holds the value of the most recent\nreconcile request value, so a change of the annotation value\ncan be detected.",
"type": "string"
},
"observedGeneration": {
"description": "ObservedGeneration is the last observed generation of the Bucket object.",
"format": "int64",
"type": "integer"
},
"observedIgnore": {
"description": "ObservedIgnore is the observed exclusion patterns used for constructing\nthe source artifact.",
"type": "string"
},
"url": {
"description": "URL is the dynamic fetch link for the latest Artifact.\nIt is provided on a \"best effort\" basis, and using the precise\nBucketStatus.Artifact data is recommended.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,299 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Bucket is the Schema for the buckets API.
*/
export interface K8SBucketV1Beta2 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata?: {};
/**
* BucketSpec specifies the required configuration to produce an Artifact for
* an object storage bucket.
*/
spec?: {
/**
* AccessFrom specifies an Access Control List for allowing cross-namespace
* references to this object.
* NOTE: Not implemented, provisional as of https://github.com/fluxcd/flux2/pull/2092
*/
accessFrom?: {
/**
* NamespaceSelectors is the list of namespace selectors to which this ACL applies.
* Items in this list are evaluated using a logical OR operation.
*/
namespaceSelectors: {
/**
* MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
* map is equivalent to 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?: {
[k: string]: string;
};
}[];
};
/**
* BucketName is the name of the object storage bucket.
*/
bucketName: string;
/**
* CertSecretRef can be given the name of a Secret containing
* either or both of
*
* - a PEM-encoded client certificate (`tls.crt`) and private
* key (`tls.key`);
* - a PEM-encoded CA certificate (`ca.crt`)
*
* and whichever are supplied, will be used for connecting to the
* bucket. The client cert and key are useful if you are
* authenticating with a certificate; the CA cert is useful if
* you are using a self-signed server certificate. The Secret must
* be of type `Opaque` or `kubernetes.io/tls`.
*
* This field is only supported for the `generic` provider.
*/
certSecretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* Endpoint is the object storage address the BucketName is located at.
*/
endpoint: string;
/**
* Ignore overrides the set of excluded patterns in the .sourceignore format
* (which is the same as .gitignore). If not provided, a default will be used,
* consult the documentation for your version to find out what those are.
*/
ignore?: string;
/**
* Insecure allows connecting to a non-TLS HTTP Endpoint.
*/
insecure?: boolean;
/**
* Interval at which the Bucket Endpoint is checked for updates.
* This interval is approximate and may be subject to jitter to ensure
* efficient use of resources.
*/
interval: string;
/**
* Prefix to use for server-side filtering of files in the Bucket.
*/
prefix?: string;
/**
* Provider of the object storage bucket.
* Defaults to 'generic', which expects an S3 (API) compatible object
* storage.
*/
provider?: string;
/**
* ProxySecretRef specifies the Secret containing the proxy configuration
* to use while communicating with the Bucket server.
*/
proxySecretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* Region of the Endpoint where the BucketName is located in.
*/
region?: string;
/**
* SecretRef specifies the Secret containing authentication credentials
* for the Bucket.
*/
secretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* STS specifies the required configuration to use a Security Token
* Service for fetching temporary credentials to authenticate in a
* Bucket provider.
*
* This field is only supported for the `aws` and `generic` providers.
*/
sts?: {
/**
* CertSecretRef can be given the name of a Secret containing
* either or both of
*
* - a PEM-encoded client certificate (`tls.crt`) and private
* key (`tls.key`);
* - a PEM-encoded CA certificate (`ca.crt`)
*
* and whichever are supplied, will be used for connecting to the
* STS endpoint. The client cert and key are useful if you are
* authenticating with a certificate; the CA cert is useful if
* you are using a self-signed server certificate. The Secret must
* be of type `Opaque` or `kubernetes.io/tls`.
*
* This field is only supported for the `ldap` provider.
*/
certSecretRef?: {
/**
* Name of the referent.
*/
name: string;
};
/**
* Endpoint is the HTTP/S endpoint of the Security Token Service from
* where temporary credentials will be fetched.
*/
endpoint: string;
/**
* Provider of the Security Token Service.
*/
provider: string;
/**
* SecretRef specifies the Secret containing authentication credentials
* for the STS endpoint. This Secret must contain the fields `username`
* and `password` and is supported only for the `ldap` provider.
*/
secretRef?: {
/**
* Name of the referent.
*/
name: string;
};
};
/**
* Suspend tells the controller to suspend the reconciliation of this
* Bucket.
*/
suspend?: boolean;
/**
* Timeout for fetch operations, defaults to 60s.
*/
timeout?: string;
};
/**
* BucketStatus records the observed state of a Bucket.
*/
status?: {
/**
* Artifact represents the last successful Bucket reconciliation.
*/
artifact?: {
/**
* Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
*/
digest?: string;
/**
* LastUpdateTime is the timestamp corresponding to the last update of the
* Artifact.
*/
lastUpdateTime: string;
/**
* Metadata holds upstream information such as OCI annotations.
*/
metadata?: {
[k: string]: string;
};
/**
* Path is the relative file path of the Artifact. It can be used to locate
* the file in the root of the Artifact storage on the local file system of
* the controller managing the Source.
*/
path: string;
/**
* Revision is a human-readable identifier traceable in the origin source
* system. It can be a Git commit SHA, Git tag, a Helm chart version, etc.
*/
revision: string;
/**
* Size is the number of bytes in the file.
*/
size?: number;
/**
* URL is the HTTP address of the Artifact as exposed by the controller
* managing the Source. It can be used to retrieve the Artifact for
* consumption, e.g. by another controller applying the Artifact contents.
*/
url: string;
};
/**
* Conditions holds the conditions for the Bucket.
*/
conditions?: {
/**
* lastTransitionTime is the last time the condition transitioned from one status to another.
* This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
*/
lastTransitionTime: string;
/**
* message is a human readable message indicating details about the transition.
* This may be an empty string.
*/
message: string;
/**
* observedGeneration represents the .metadata.generation that the condition was set based upon.
* For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
* with respect to the current state of the instance.
*/
observedGeneration?: number;
/**
* reason contains a programmatic identifier indicating the reason for the condition's last transition.
* Producers of specific condition types may define expected values and meanings for this field,
* and whether the values are considered a guaranteed API.
* The value should be a CamelCase string.
* This field may not be empty.
*/
reason: string;
/**
* status of the condition, one of True, False, Unknown.
*/
status: "True" | "False" | "Unknown";
/**
* type of condition in CamelCase or in foo.example.com/CamelCase.
*/
type: string;
}[];
/**
* LastHandledReconcileAt holds the value of the most recent
* reconcile request value, so a change of the annotation value
* can be detected.
*/
lastHandledReconcileAt?: string;
/**
* ObservedGeneration is the last observed generation of the Bucket object.
*/
observedGeneration?: number;
/**
* ObservedIgnore is the observed exclusion patterns used for constructing
* the source artifact.
*/
observedIgnore?: string;
/**
* URL is the dynamic fetch link for the latest Artifact.
* It is provided on a "best effort" basis, and using the precise
* BucketStatus.Artifact data is recommended.
*/
url?: string;
};
}

View File

@@ -0,0 +1,185 @@
{
"description": "A CertificateRequest is used to request a signed certificate from one of the\nconfigured issuers.\n\nAll fields within the CertificateRequest's `spec` are immutable after creation.\nA CertificateRequest will either succeed or fail, as denoted by its `Ready` status\ncondition and its `status.failureTime` field.\n\nA CertificateRequest is a one-shot resource, meaning it represents a single\npoint in time request for a certificate and cannot be re-used.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "Specification of the desired state of the CertificateRequest resource.\nhttps://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
"properties": {
"duration": {
"description": "Requested 'duration' (i.e. lifetime) of the Certificate. Note that the\nissuer may choose to ignore the requested duration, just like any other\nrequested attribute.",
"type": "string"
},
"extra": {
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Extra contains extra attributes of the user that created the CertificateRequest.\nPopulated by the cert-manager webhook on creation and immutable.",
"type": "object"
},
"groups": {
"description": "Groups contains group membership of the user that created the CertificateRequest.\nPopulated by the cert-manager webhook on creation and immutable.",
"items": {
"type": "string"
},
"type": "array",
"x_kubernetes_list_type": "atomic"
},
"isCA": {
"description": "Requested basic constraints isCA value. Note that the issuer may choose\nto ignore the requested isCA value, just like any other requested attribute.\n\nNOTE: If the CSR in the `Request` field has a BasicConstraints extension,\nit must have the same isCA value as specified here.\n\nIf true, this will automatically add the `cert sign` usage to the list\nof requested `usages`.",
"type": "boolean"
},
"issuerRef": {
"description": "Reference to the issuer responsible for issuing the certificate.\nIf the issuer is namespace-scoped, it must be in the same namespace\nas the Certificate. If the issuer is cluster-scoped, it can be used\nfrom any namespace.\n\nThe `name` field of the reference must always be specified.",
"properties": {
"group": {
"description": "Group of the resource being referred to.",
"type": "string"
},
"kind": {
"description": "Kind of the resource being referred to.",
"type": "string"
},
"name": {
"description": "Name of the resource being referred to.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"request": {
"description": "The PEM-encoded X.509 certificate signing request to be submitted to the\nissuer for signing.\n\nIf the CSR has a BasicConstraints extension, its isCA attribute must\nmatch the `isCA` value of this CertificateRequest.\nIf the CSR has a KeyUsage extension, its key usages must match the\nkey usages in the `usages` field of this CertificateRequest.\nIf the CSR has a ExtKeyUsage extension, its extended key usages\nmust match the extended key usages in the `usages` field of this\nCertificateRequest.",
"format": "byte",
"type": "string"
},
"uid": {
"description": "UID contains the uid of the user that created the CertificateRequest.\nPopulated by the cert-manager webhook on creation and immutable.",
"type": "string"
},
"usages": {
"description": "Requested key usages and extended key usages.\n\nNOTE: If the CSR in the `Request` field has uses the KeyUsage or\nExtKeyUsage extension, these extensions must have the same values\nas specified here without any additional values.\n\nIf unset, defaults to `digital signature` and `key encipherment`.",
"items": {
"description": "KeyUsage specifies valid usage contexts for keys.\nSee:\nhttps://tools.ietf.org/html/rfc5280#section-4.2.1.3\nhttps://tools.ietf.org/html/rfc5280#section-4.2.1.12\n\nValid KeyUsage values are as follows:\n\"signing\",\n\"digital signature\",\n\"content commitment\",\n\"key encipherment\",\n\"key agreement\",\n\"data encipherment\",\n\"cert sign\",\n\"crl sign\",\n\"encipher only\",\n\"decipher only\",\n\"any\",\n\"server auth\",\n\"client auth\",\n\"code signing\",\n\"email protection\",\n\"s/mime\",\n\"ipsec end system\",\n\"ipsec tunnel\",\n\"ipsec user\",\n\"timestamping\",\n\"ocsp signing\",\n\"microsoft sgc\",\n\"netscape sgc\"",
"type": "string",
"enum": [
"signing",
"digital signature",
"content commitment",
"key encipherment",
"key agreement",
"data encipherment",
"cert sign",
"crl sign",
"encipher only",
"decipher only",
"any",
"server auth",
"client auth",
"code signing",
"email protection",
"s/mime",
"ipsec end system",
"ipsec tunnel",
"ipsec user",
"timestamping",
"ocsp signing",
"microsoft sgc",
"netscape sgc"
]
},
"type": "array"
},
"username": {
"description": "Username contains the name of the user that created the CertificateRequest.\nPopulated by the cert-manager webhook on creation and immutable.",
"type": "string"
}
},
"required": [
"issuerRef",
"request"
],
"type": "object"
},
"status": {
"description": "Status of the CertificateRequest.\nThis is set and managed automatically.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
"properties": {
"ca": {
"description": "The PEM encoded X.509 certificate of the signer, also known as the CA\n(Certificate Authority).\nThis is set on a best-effort basis by different issuers.\nIf not set, the CA is assumed to be unknown/not available.",
"format": "byte",
"type": "string"
},
"certificate": {
"description": "The PEM encoded X.509 certificate resulting from the certificate\nsigning request.\nIf not set, the CertificateRequest has either not been completed or has\nfailed. More information on failure can be found by checking the\n`conditions` field.",
"format": "byte",
"type": "string"
},
"conditions": {
"description": "List of status conditions to indicate the status of a CertificateRequest.\nKnown condition types are `Ready`, `InvalidRequest`, `Approved` and `Denied`.",
"items": {
"description": "CertificateRequestCondition contains condition information for a CertificateRequest.",
"type": "object",
"required": [
"status",
"type"
],
"properties": {
"lastTransitionTime": {
"description": "LastTransitionTime is the timestamp corresponding to the last status\nchange of this condition.",
"type": "string",
"format": "date-time"
},
"message": {
"description": "Message is a human readable description of the details of the last\ntransition, complementing reason.",
"type": "string"
},
"reason": {
"description": "Reason is a brief machine readable explanation for the condition's last\ntransition.",
"type": "string"
},
"status": {
"description": "Status of the condition, one of (`True`, `False`, `Unknown`).",
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"description": "Type of the condition, known values are (`Ready`, `InvalidRequest`,\n`Approved`, `Denied`).",
"type": "string"
}
}
},
"type": "array",
"x_kubernetes_list_map_keys": [
"type"
],
"x_kubernetes_list_type": "map"
},
"failureTime": {
"description": "FailureTime stores the time that this CertificateRequest failed. This is\nused to influence garbage collection and back-off.",
"format": "date-time",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,208 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* A CertificateRequest is used to request a signed certificate from one of the
* configured issuers.
*
* All fields within the CertificateRequest's `spec` are immutable after creation.
* A CertificateRequest will either succeed or fail, as denoted by its `Ready` status
* condition and its `status.failureTime` field.
*
* A CertificateRequest is a one-shot resource, meaning it represents a single
* point in time request for a certificate and cannot be re-used.
*/
export interface K8SCertificateRequestV1 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata?: {};
/**
* Specification of the desired state of the CertificateRequest resource.
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
spec?: {
/**
* Requested 'duration' (i.e. lifetime) of the Certificate. Note that the
* issuer may choose to ignore the requested duration, just like any other
* requested attribute.
*/
duration?: string;
/**
* Extra contains extra attributes of the user that created the CertificateRequest.
* Populated by the cert-manager webhook on creation and immutable.
*/
extra?: {
[k: string]: string[];
};
/**
* Groups contains group membership of the user that created the CertificateRequest.
* Populated by the cert-manager webhook on creation and immutable.
*/
groups?: string[];
/**
* Requested basic constraints isCA value. Note that the issuer may choose
* to ignore the requested isCA value, just like any other requested attribute.
*
* NOTE: If the CSR in the `Request` field has a BasicConstraints extension,
* it must have the same isCA value as specified here.
*
* If true, this will automatically add the `cert sign` usage to the list
* of requested `usages`.
*/
isCA?: boolean;
/**
* Reference to the issuer responsible for issuing the certificate.
* If the issuer is namespace-scoped, it must be in the same namespace
* as the Certificate. If the issuer is cluster-scoped, it can be used
* from any namespace.
*
* The `name` field of the reference must always be specified.
*/
issuerRef: {
/**
* Group of the resource being referred to.
*/
group?: string;
/**
* Kind of the resource being referred to.
*/
kind?: string;
/**
* Name of the resource being referred to.
*/
name: string;
};
/**
* The PEM-encoded X.509 certificate signing request to be submitted to the
* issuer for signing.
*
* If the CSR has a BasicConstraints extension, its isCA attribute must
* match the `isCA` value of this CertificateRequest.
* If the CSR has a KeyUsage extension, its key usages must match the
* key usages in the `usages` field of this CertificateRequest.
* If the CSR has a ExtKeyUsage extension, its extended key usages
* must match the extended key usages in the `usages` field of this
* CertificateRequest.
*/
request: string;
/**
* UID contains the uid of the user that created the CertificateRequest.
* Populated by the cert-manager webhook on creation and immutable.
*/
uid?: string;
/**
* Requested key usages and extended key usages.
*
* NOTE: If the CSR in the `Request` field has uses the KeyUsage or
* ExtKeyUsage extension, these extensions must have the same values
* as specified here without any additional values.
*
* If unset, defaults to `digital signature` and `key encipherment`.
*/
usages?: (
| "signing"
| "digital signature"
| "content commitment"
| "key encipherment"
| "key agreement"
| "data encipherment"
| "cert sign"
| "crl sign"
| "encipher only"
| "decipher only"
| "any"
| "server auth"
| "client auth"
| "code signing"
| "email protection"
| "s/mime"
| "ipsec end system"
| "ipsec tunnel"
| "ipsec user"
| "timestamping"
| "ocsp signing"
| "microsoft sgc"
| "netscape sgc"
)[];
/**
* Username contains the name of the user that created the CertificateRequest.
* Populated by the cert-manager webhook on creation and immutable.
*/
username?: string;
};
/**
* Status of the CertificateRequest.
* This is set and managed automatically.
* Read-only.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
status?: {
/**
* The PEM encoded X.509 certificate of the signer, also known as the CA
* (Certificate Authority).
* This is set on a best-effort basis by different issuers.
* If not set, the CA is assumed to be unknown/not available.
*/
ca?: string;
/**
* The PEM encoded X.509 certificate resulting from the certificate
* signing request.
* If not set, the CertificateRequest has either not been completed or has
* failed. More information on failure can be found by checking the
* `conditions` field.
*/
certificate?: string;
/**
* List of status conditions to indicate the status of a CertificateRequest.
* Known condition types are `Ready`, `InvalidRequest`, `Approved` and `Denied`.
*/
conditions?: {
/**
* LastTransitionTime is the timestamp corresponding to the last status
* change of this condition.
*/
lastTransitionTime?: string;
/**
* Message is a human readable description of the details of the last
* transition, complementing reason.
*/
message?: string;
/**
* Reason is a brief machine readable explanation for the condition's last
* transition.
*/
reason?: string;
/**
* Status of the condition, one of (`True`, `False`, `Unknown`).
*/
status: "True" | "False" | "Unknown";
/**
* Type of the condition, known values are (`Ready`, `InvalidRequest`,
* `Approved`, `Denied`).
*/
type: string;
}[];
/**
* FailureTime stores the time that this CertificateRequest failed. This is
* used to influence garbage collection and back-off.
*/
failureTime?: string;
};
}

View File

@@ -0,0 +1,564 @@
{
"description": "A Certificate resource should be created to ensure an up to date and signed\nX.509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`.\n\nThe stored certificate will be renewed before it expires (as configured by `spec.renewBefore`).",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "Specification of the desired state of the Certificate resource.\nhttps://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
"properties": {
"additionalOutputFormats": {
"description": "Defines extra output formats of the private key and signed certificate chain\nto be written to this Certificate's target Secret.",
"items": {
"description": "CertificateAdditionalOutputFormat defines an additional output format of a\nCertificate resource. These contain supplementary data formats of the signed\ncertificate chain and paired private key.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"description": "Type is the name of the format type that should be written to the\nCertificate's target Secret.",
"type": "string",
"enum": [
"DER",
"CombinedPEM"
]
}
}
},
"type": "array"
},
"commonName": {
"description": "Requested common name X509 certificate subject attribute.\nMore info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\nNOTE: TLS clients will ignore this value when any subject alternative name is\nset (see https://tools.ietf.org/html/rfc6125#section-6.4.4).\n\nShould have a length of 64 characters or fewer to avoid generating invalid CSRs.\nCannot be set if the `literalSubject` field is set.",
"type": "string"
},
"dnsNames": {
"description": "Requested DNS subject alternative names.",
"items": {
"type": "string"
},
"type": "array"
},
"duration": {
"description": "Requested 'duration' (i.e. lifetime) of the Certificate. Note that the\nissuer may choose to ignore the requested duration, just like any other\nrequested attribute.\n\nIf unset, this defaults to 90 days.\nMinimum accepted duration is 1 hour.\nValue must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration.",
"type": "string"
},
"emailAddresses": {
"description": "Requested email subject alternative names.",
"items": {
"type": "string"
},
"type": "array"
},
"encodeUsagesInRequest": {
"description": "Whether the KeyUsage and ExtKeyUsage extensions should be set in the encoded CSR.\n\nThis option defaults to true, and should only be disabled if the target\nissuer does not support CSRs with these X509 KeyUsage/ ExtKeyUsage extensions.",
"type": "boolean"
},
"ipAddresses": {
"description": "Requested IP address subject alternative names.",
"items": {
"type": "string"
},
"type": "array"
},
"isCA": {
"description": "Requested basic constraints isCA value.\nThe isCA value is used to set the `isCA` field on the created CertificateRequest\nresources. Note that the issuer may choose to ignore the requested isCA value, just\nlike any other requested attribute.\n\nIf true, this will automatically add the `cert sign` usage to the list\nof requested `usages`.",
"type": "boolean"
},
"issuerRef": {
"description": "Reference to the issuer responsible for issuing the certificate.\nIf the issuer is namespace-scoped, it must be in the same namespace\nas the Certificate. If the issuer is cluster-scoped, it can be used\nfrom any namespace.\n\nThe `name` field of the reference must always be specified.",
"properties": {
"group": {
"description": "Group of the resource being referred to.",
"type": "string"
},
"kind": {
"description": "Kind of the resource being referred to.",
"type": "string"
},
"name": {
"description": "Name of the resource being referred to.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"keystores": {
"description": "Additional keystore output formats to be stored in the Certificate's Secret.",
"properties": {
"jks": {
"description": "JKS configures options for storing a JKS keystore in the\n`spec.secretName` Secret resource.",
"properties": {
"alias": {
"description": "Alias specifies the alias of the key in the keystore, required by the JKS format.\nIf not provided, the default alias `certificate` will be used.",
"type": "string"
},
"create": {
"description": "Create enables JKS keystore creation for the Certificate.\nIf true, a file named `keystore.jks` will be created in the target\nSecret resource, encrypted using the password stored in\n`passwordSecretRef` or `password`.\nThe keystore file will be updated immediately.\nIf the issuer provided a CA certificate, a file named `truststore.jks`\nwill also be created in the target Secret resource, encrypted using the\npassword stored in `passwordSecretRef`\ncontaining the issuing Certificate Authority",
"type": "boolean"
},
"password": {
"description": "Password provides a literal password used to encrypt the JKS keystore.\nMutually exclusive with passwordSecretRef.\nOne of password or passwordSecretRef must provide a password with a non-zero length.",
"type": "string"
},
"passwordSecretRef": {
"description": "PasswordSecretRef is a reference to a non-empty key in a Secret resource\ncontaining the password used to encrypt the JKS keystore.\nMutually exclusive with password.\nOne of password or passwordSecretRef must provide a password with a non-zero length.",
"properties": {
"key": {
"description": "The key of the entry in the Secret resource's `data` field to be used.\nSome instances of this field may be defaulted, in others it may be\nrequired.",
"type": "string"
},
"name": {
"description": "Name of the resource being referred to.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
},
"required": [
"create"
],
"type": "object"
},
"pkcs12": {
"description": "PKCS12 configures options for storing a PKCS12 keystore in the\n`spec.secretName` Secret resource.",
"properties": {
"create": {
"description": "Create enables PKCS12 keystore creation for the Certificate.\nIf true, a file named `keystore.p12` will be created in the target\nSecret resource, encrypted using the password stored in\n`passwordSecretRef` or in `password`.\nThe keystore file will be updated immediately.\nIf the issuer provided a CA certificate, a file named `truststore.p12` will\nalso be created in the target Secret resource, encrypted using the\npassword stored in `passwordSecretRef` containing the issuing Certificate\nAuthority",
"type": "boolean"
},
"password": {
"description": "Password provides a literal password used to encrypt the PKCS#12 keystore.\nMutually exclusive with passwordSecretRef.\nOne of password or passwordSecretRef must provide a password with a non-zero length.",
"type": "string"
},
"passwordSecretRef": {
"description": "PasswordSecretRef is a reference to a non-empty key in a Secret resource\ncontaining the password used to encrypt the PKCS#12 keystore.\nMutually exclusive with password.\nOne of password or passwordSecretRef must provide a password with a non-zero length.",
"properties": {
"key": {
"description": "The key of the entry in the Secret resource's `data` field to be used.\nSome instances of this field may be defaulted, in others it may be\nrequired.",
"type": "string"
},
"name": {
"description": "Name of the resource being referred to.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"profile": {
"description": "Profile specifies the key and certificate encryption algorithms and the HMAC algorithm\nused to create the PKCS12 keystore. Default value is `LegacyRC2` for backward compatibility.\n\nIf provided, allowed values are:\n`LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20.\n`LegacyDES`: Less secure algorithm. Use this option for maximal compatibility.\n`Modern2023`: Secure algorithm. Use this option in case you have to always use secure algorithms\n(e.g., because of company policy). Please note that the security of the algorithm is not that important\nin reality, because the unencrypted certificate and private key are also stored in the Secret.",
"_enum": [
"LegacyRC2",
"LegacyDES",
"Modern2023"
],
"type": "string"
}
},
"required": [
"create"
],
"type": "object"
}
},
"type": "object"
},
"literalSubject": {
"description": "Requested X.509 certificate subject, represented using the LDAP \"String\nRepresentation of a Distinguished Name\" [1].\nImportant: the LDAP string format also specifies the order of the attributes\nin the subject, this is important when issuing certs for LDAP authentication.\nExample: `CN=foo,DC=corp,DC=example,DC=com`\nMore info [1]: https://datatracker.ietf.org/doc/html/rfc4514\nMore info: https://github.com/cert-manager/cert-manager/issues/3203\nMore info: https://github.com/cert-manager/cert-manager/issues/4424\n\nCannot be set if the `subject` or `commonName` field is set.",
"type": "string"
},
"nameConstraints": {
"description": "x.509 certificate NameConstraint extension which MUST NOT be used in a non-CA certificate.\nMore Info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10\n\nThis is an Alpha Feature and is only enabled with the\n`--feature-gates=NameConstraints=true` option set on both\nthe controller and webhook components.",
"properties": {
"critical": {
"description": "if true then the name constraints are marked critical.",
"type": "boolean"
},
"excluded": {
"description": "Excluded contains the constraints which must be disallowed. Any name matching a\nrestriction in the excluded field is invalid regardless\nof information appearing in the permitted",
"properties": {
"dnsDomains": {
"description": "DNSDomains is a list of DNS domains that are permitted or excluded.",
"items": {
"type": "string"
},
"type": "array"
},
"emailAddresses": {
"description": "EmailAddresses is a list of Email Addresses that are permitted or excluded.",
"items": {
"type": "string"
},
"type": "array"
},
"ipRanges": {
"description": "IPRanges is a list of IP Ranges that are permitted or excluded.\nThis should be a valid CIDR notation.",
"items": {
"type": "string"
},
"type": "array"
},
"uriDomains": {
"description": "URIDomains is a list of URI domains that are permitted or excluded.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"permitted": {
"description": "Permitted contains the constraints in which the names must be located.",
"properties": {
"dnsDomains": {
"description": "DNSDomains is a list of DNS domains that are permitted or excluded.",
"items": {
"type": "string"
},
"type": "array"
},
"emailAddresses": {
"description": "EmailAddresses is a list of Email Addresses that are permitted or excluded.",
"items": {
"type": "string"
},
"type": "array"
},
"ipRanges": {
"description": "IPRanges is a list of IP Ranges that are permitted or excluded.\nThis should be a valid CIDR notation.",
"items": {
"type": "string"
},
"type": "array"
},
"uriDomains": {
"description": "URIDomains is a list of URI domains that are permitted or excluded.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
},
"otherNames": {
"description": "`otherNames` is an escape hatch for SAN that allows any type. We currently restrict the support to string like otherNames, cf RFC 5280 p 37\nAny UTF8 String valued otherName can be passed with by setting the keys oid: x.x.x.x and UTF8Value: somevalue for `otherName`.\nMost commonly this would be UPN set with oid: 1.3.6.1.4.1.311.20.2.3\nYou should ensure that any OID passed is valid for the UTF8String type as we do not explicitly validate this.",
"items": {
"type": "object",
"properties": {
"oid": {
"description": "OID is the object identifier for the otherName SAN.\nThe object identifier must be expressed as a dotted string, for\nexample, \"1.2.840.113556.1.4.221\".",
"type": "string"
},
"utf8Value": {
"description": "utf8Value is the string value of the otherName SAN.\nThe utf8Value accepts any valid UTF8 string to set as value for the otherName SAN.",
"type": "string"
}
}
},
"type": "array"
},
"privateKey": {
"description": "Private key options. These include the key algorithm and size, the used\nencoding and the rotation policy.",
"properties": {
"algorithm": {
"description": "Algorithm is the private key algorithm of the corresponding private key\nfor this certificate.\n\nIf provided, allowed values are either `RSA`, `ECDSA` or `Ed25519`.\nIf `algorithm` is specified and `size` is not provided,\nkey size of 2048 will be used for `RSA` key algorithm and\nkey size of 256 will be used for `ECDSA` key algorithm.\nkey size is ignored when using the `Ed25519` key algorithm.",
"_enum": [
"RSA",
"ECDSA",
"Ed25519"
],
"type": "string"
},
"encoding": {
"description": "The private key cryptography standards (PKCS) encoding for this\ncertificate's private key to be encoded in.\n\nIf provided, allowed values are `PKCS1` and `PKCS8` standing for PKCS#1\nand PKCS#8, respectively.\nDefaults to `PKCS1` if not specified.",
"_enum": [
"PKCS1",
"PKCS8"
],
"type": "string"
},
"rotationPolicy": {
"description": "RotationPolicy controls how private keys should be regenerated when a\nre-issuance is being processed.\n\nIf set to `Never`, a private key will only be generated if one does not\nalready exist in the target `spec.secretName`. If one does exist but it\ndoes not have the correct algorithm or size, a warning will be raised\nto await user intervention.\nIf set to `Always`, a private key matching the specified requirements\nwill be generated whenever a re-issuance occurs.\nDefault is `Always`.\nThe default was changed from `Never` to `Always` in cert-manager >=v1.18.0.\nThe new default can be disabled by setting the\n`--feature-gates=DefaultPrivateKeyRotationPolicyAlways=false` option on\nthe controller component.",
"_enum": [
"Never",
"Always"
],
"type": "string"
},
"size": {
"description": "Size is the key bit size of the corresponding private key for this certificate.\n\nIf `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`,\nand will default to `2048` if not specified.\nIf `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`,\nand will default to `256` if not specified.\nIf `algorithm` is set to `Ed25519`, Size is ignored.\nNo other values are allowed.",
"type": "integer"
}
},
"type": "object"
},
"renewBefore": {
"description": "How long before the currently issued certificate's expiry cert-manager should\nrenew the certificate. For example, if a certificate is valid for 60 minutes,\nand `renewBefore=10m`, cert-manager will begin to attempt to renew the certificate\n50 minutes after it was issued (i.e. when there are 10 minutes remaining until\nthe certificate is no longer valid).\n\nNOTE: The actual lifetime of the issued certificate is used to determine the\nrenewal time. If an issuer returns a certificate with a different lifetime than\nthe one requested, cert-manager will use the lifetime of the issued certificate.\n\nIf unset, this defaults to 1/3 of the issued certificate's lifetime.\nMinimum accepted value is 5 minutes.\nValue must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration.\nCannot be set if the `renewBeforePercentage` field is set.",
"type": "string"
},
"renewBeforePercentage": {
"description": "`renewBeforePercentage` is like `renewBefore`, except it is a relative percentage\nrather than an absolute duration. For example, if a certificate is valid for 60\nminutes, and `renewBeforePercentage=25`, cert-manager will begin to attempt to\nrenew the certificate 45 minutes after it was issued (i.e. when there are 15\nminutes (25%) remaining until the certificate is no longer valid).\n\nNOTE: The actual lifetime of the issued certificate is used to determine the\nrenewal time. If an issuer returns a certificate with a different lifetime than\nthe one requested, cert-manager will use the lifetime of the issued certificate.\n\nValue must be an integer in the range (0,100). The minimum effective\n`renewBefore` derived from the `renewBeforePercentage` and `duration` fields is 5\nminutes.\nCannot be set if the `renewBefore` field is set.",
"format": "int32",
"type": "integer"
},
"revisionHistoryLimit": {
"description": "The maximum number of CertificateRequest revisions that are maintained in\nthe Certificate's history. Each revision represents a single `CertificateRequest`\ncreated by this Certificate, either when it was created, renewed, or Spec\nwas changed. Revisions will be removed by oldest first if the number of\nrevisions exceeds this number.\n\nIf set, revisionHistoryLimit must be a value of `1` or greater.\nDefault value is `1`.",
"format": "int32",
"type": "integer"
},
"secretName": {
"description": "Name of the Secret resource that will be automatically created and\nmanaged by this Certificate resource. It will be populated with a\nprivate key and certificate, signed by the denoted issuer. The Secret\nresource lives in the same namespace as the Certificate resource.",
"type": "string"
},
"secretTemplate": {
"description": "Defines annotations and labels to be copied to the Certificate's Secret.\nLabels and annotations on the Secret will be changed as they appear on the\nSecretTemplate when added or removed. SecretTemplate annotations are added\nin conjunction with, and cannot overwrite, the base set of annotations\ncert-manager sets on the Certificate's Secret.",
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
},
"description": "Annotations is a key value map to be copied to the target Kubernetes Secret.",
"type": "object"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Labels is a key value map to be copied to the target Kubernetes Secret.",
"type": "object"
}
},
"type": "object"
},
"signatureAlgorithm": {
"description": "Signature algorithm to use.\nAllowed values for RSA keys: SHA256WithRSA, SHA384WithRSA, SHA512WithRSA.\nAllowed values for ECDSA keys: ECDSAWithSHA256, ECDSAWithSHA384, ECDSAWithSHA512.\nAllowed values for Ed25519 keys: PureEd25519.",
"_enum": [
"SHA256WithRSA",
"SHA384WithRSA",
"SHA512WithRSA",
"ECDSAWithSHA256",
"ECDSAWithSHA384",
"ECDSAWithSHA512",
"PureEd25519"
],
"type": "string"
},
"subject": {
"description": "Requested set of X509 certificate subject attributes.\nMore info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\n\nThe common name attribute is specified separately in the `commonName` field.\nCannot be set if the `literalSubject` field is set.",
"properties": {
"countries": {
"description": "Countries to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
},
"localities": {
"description": "Cities to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
},
"organizationalUnits": {
"description": "Organizational Units to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
},
"organizations": {
"description": "Organizations to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
},
"postalCodes": {
"description": "Postal codes to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
},
"provinces": {
"description": "State/Provinces to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
},
"serialNumber": {
"description": "Serial number to be used on the Certificate.",
"type": "string"
},
"streetAddresses": {
"description": "Street addresses to be used on the Certificate.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"uris": {
"description": "Requested URI subject alternative names.",
"items": {
"type": "string"
},
"type": "array"
},
"usages": {
"description": "Requested key usages and extended key usages.\nThese usages are used to set the `usages` field on the created CertificateRequest\nresources. If `encodeUsagesInRequest` is unset or set to `true`, the usages\nwill additionally be encoded in the `request` field which contains the CSR blob.\n\nIf unset, defaults to `digital signature` and `key encipherment`.",
"items": {
"description": "KeyUsage specifies valid usage contexts for keys.\nSee:\nhttps://tools.ietf.org/html/rfc5280#section-4.2.1.3\nhttps://tools.ietf.org/html/rfc5280#section-4.2.1.12\n\nValid KeyUsage values are as follows:\n\"signing\",\n\"digital signature\",\n\"content commitment\",\n\"key encipherment\",\n\"key agreement\",\n\"data encipherment\",\n\"cert sign\",\n\"crl sign\",\n\"encipher only\",\n\"decipher only\",\n\"any\",\n\"server auth\",\n\"client auth\",\n\"code signing\",\n\"email protection\",\n\"s/mime\",\n\"ipsec end system\",\n\"ipsec tunnel\",\n\"ipsec user\",\n\"timestamping\",\n\"ocsp signing\",\n\"microsoft sgc\",\n\"netscape sgc\"",
"type": "string",
"enum": [
"signing",
"digital signature",
"content commitment",
"key encipherment",
"key agreement",
"data encipherment",
"cert sign",
"crl sign",
"encipher only",
"decipher only",
"any",
"server auth",
"client auth",
"code signing",
"email protection",
"s/mime",
"ipsec end system",
"ipsec tunnel",
"ipsec user",
"timestamping",
"ocsp signing",
"microsoft sgc",
"netscape sgc"
]
},
"type": "array"
}
},
"required": [
"issuerRef",
"secretName"
],
"type": "object"
},
"status": {
"description": "Status of the Certificate.\nThis is set and managed automatically.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
"properties": {
"conditions": {
"description": "List of status conditions to indicate the status of certificates.\nKnown condition types are `Ready` and `Issuing`.",
"items": {
"description": "CertificateCondition contains condition information for a Certificate.",
"type": "object",
"required": [
"status",
"type"
],
"properties": {
"lastTransitionTime": {
"description": "LastTransitionTime is the timestamp corresponding to the last status\nchange of this condition.",
"type": "string",
"format": "date-time"
},
"message": {
"description": "Message is a human readable description of the details of the last\ntransition, complementing reason.",
"type": "string"
},
"observedGeneration": {
"description": "If set, this represents the .metadata.generation that the condition was\nset based upon.\nFor instance, if .metadata.generation is currently 12, but the\n.status.condition[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the Certificate.",
"type": "integer",
"format": "int64"
},
"reason": {
"description": "Reason is a brief machine readable explanation for the condition's last\ntransition.",
"type": "string"
},
"status": {
"description": "Status of the condition, one of (`True`, `False`, `Unknown`).",
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"description": "Type of the condition, known values are (`Ready`, `Issuing`).",
"type": "string"
}
}
},
"type": "array",
"x_kubernetes_list_map_keys": [
"type"
],
"x_kubernetes_list_type": "map"
},
"failedIssuanceAttempts": {
"description": "The number of continuous failed issuance attempts up till now. This\nfield gets removed (if set) on a successful issuance and gets set to\n1 if unset and an issuance has failed. If an issuance has failed, the\ndelay till the next issuance will be calculated using formula\ntime.Hour * 2 ^ (failedIssuanceAttempts - 1).",
"type": "integer"
},
"lastFailureTime": {
"description": "LastFailureTime is set only if the latest issuance for this\nCertificate failed and contains the time of the failure. If an\nissuance has failed, the delay till the next issuance will be\ncalculated using formula time.Hour * 2 ^ (failedIssuanceAttempts -\n1). If the latest issuance has succeeded this field will be unset.",
"format": "date-time",
"type": "string"
},
"nextPrivateKeySecretName": {
"description": "The name of the Secret resource containing the private key to be used\nfor the next certificate iteration.\nThe keymanager controller will automatically set this field if the\n`Issuing` condition is set to `True`.\nIt will automatically unset this field when the Issuing condition is\nnot set or False.",
"type": "string"
},
"notAfter": {
"description": "The expiration time of the certificate stored in the secret named\nby this resource in `spec.secretName`.",
"format": "date-time",
"type": "string"
},
"notBefore": {
"description": "The time after which the certificate stored in the secret named\nby this resource in `spec.secretName` is valid.",
"format": "date-time",
"type": "string"
},
"renewalTime": {
"description": "RenewalTime is the time at which the certificate will be next\nrenewed.\nIf not set, no upcoming renewal is scheduled.",
"format": "date-time",
"type": "string"
},
"revision": {
"description": "The current 'revision' of the certificate as issued.\n\nWhen a CertificateRequest resource is created, it will have the\n`cert-manager.io/certificate-revision` set to one greater than the\ncurrent value of this field.\n\nUpon issuance, this field will be set to the value of the annotation\non the CertificateRequest resource used to issue the certificate.\n\nPersisting the value on the CertificateRequest resource allows the\ncertificates controller to know whether a request is part of an old\nissuance or if it is part of the ongoing revision's issuance by\nchecking if the revision value in the annotation is greater than this\nfield.",
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,634 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* A Certificate resource should be created to ensure an up to date and signed
* X.509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`.
*
* The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`).
*/
export interface K8SCertificateV1 {
/**
* APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string;
/**
* Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string;
metadata?: {};
/**
* Specification of the desired state of the Certificate resource.
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
spec?: {
/**
* Defines extra output formats of the private key and signed certificate chain
* to be written to this Certificate's target Secret.
*/
additionalOutputFormats?: {
/**
* Type is the name of the format type that should be written to the
* Certificate's target Secret.
*/
type: "DER" | "CombinedPEM";
}[];
/**
* Requested common name X509 certificate subject attribute.
* More info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
* NOTE: TLS clients will ignore this value when any subject alternative name is
* set (see https://tools.ietf.org/html/rfc6125#section-6.4.4).
*
* Should have a length of 64 characters or fewer to avoid generating invalid CSRs.
* Cannot be set if the `literalSubject` field is set.
*/
commonName?: string;
/**
* Requested DNS subject alternative names.
*/
dnsNames?: string[];
/**
* Requested 'duration' (i.e. lifetime) of the Certificate. Note that the
* issuer may choose to ignore the requested duration, just like any other
* requested attribute.
*
* If unset, this defaults to 90 days.
* Minimum accepted duration is 1 hour.
* Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration.
*/
duration?: string;
/**
* Requested email subject alternative names.
*/
emailAddresses?: string[];
/**
* Whether the KeyUsage and ExtKeyUsage extensions should be set in the encoded CSR.
*
* This option defaults to true, and should only be disabled if the target
* issuer does not support CSRs with these X509 KeyUsage/ ExtKeyUsage extensions.
*/
encodeUsagesInRequest?: boolean;
/**
* Requested IP address subject alternative names.
*/
ipAddresses?: string[];
/**
* Requested basic constraints isCA value.
* The isCA value is used to set the `isCA` field on the created CertificateRequest
* resources. Note that the issuer may choose to ignore the requested isCA value, just
* like any other requested attribute.
*
* If true, this will automatically add the `cert sign` usage to the list
* of requested `usages`.
*/
isCA?: boolean;
/**
* Reference to the issuer responsible for issuing the certificate.
* If the issuer is namespace-scoped, it must be in the same namespace
* as the Certificate. If the issuer is cluster-scoped, it can be used
* from any namespace.
*
* The `name` field of the reference must always be specified.
*/
issuerRef: {
/**
* Group of the resource being referred to.
*/
group?: string;
/**
* Kind of the resource being referred to.
*/
kind?: string;
/**
* Name of the resource being referred to.
*/
name: string;
};
/**
* Additional keystore output formats to be stored in the Certificate's Secret.
*/
keystores?: {
/**
* JKS configures options for storing a JKS keystore in the
* `spec.secretName` Secret resource.
*/
jks?: {
/**
* Alias specifies the alias of the key in the keystore, required by the JKS format.
* If not provided, the default alias `certificate` will be used.
*/
alias?: string;
/**
* Create enables JKS keystore creation for the Certificate.
* If true, a file named `keystore.jks` will be created in the target
* Secret resource, encrypted using the password stored in
* `passwordSecretRef` or `password`.
* The keystore file will be updated immediately.
* If the issuer provided a CA certificate, a file named `truststore.jks`
* will also be created in the target Secret resource, encrypted using the
* password stored in `passwordSecretRef`
* containing the issuing Certificate Authority
*/
create: boolean;
/**
* Password provides a literal password used to encrypt the JKS keystore.
* Mutually exclusive with passwordSecretRef.
* One of password or passwordSecretRef must provide a password with a non-zero length.
*/
password?: string;
/**
* PasswordSecretRef is a reference to a non-empty key in a Secret resource
* containing the password used to encrypt the JKS keystore.
* Mutually exclusive with password.
* One of password or passwordSecretRef must provide a password with a non-zero length.
*/
passwordSecretRef?: {
/**
* The key of the entry in the Secret resource's `data` field to be used.
* Some instances of this field may be defaulted, in others it may be
* required.
*/
key?: string;
/**
* Name of the resource being referred to.
* More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
*/
name: string;
};
};
/**
* PKCS12 configures options for storing a PKCS12 keystore in the
* `spec.secretName` Secret resource.
*/
pkcs12?: {
/**
* Create enables PKCS12 keystore creation for the Certificate.
* If true, a file named `keystore.p12` will be created in the target
* Secret resource, encrypted using the password stored in
* `passwordSecretRef` or in `password`.
* The keystore file will be updated immediately.
* If the issuer provided a CA certificate, a file named `truststore.p12` will
* also be created in the target Secret resource, encrypted using the
* password stored in `passwordSecretRef` containing the issuing Certificate
* Authority
*/
create: boolean;
/**
* Password provides a literal password used to encrypt the PKCS#12 keystore.
* Mutually exclusive with passwordSecretRef.
* One of password or passwordSecretRef must provide a password with a non-zero length.
*/
password?: string;
/**
* PasswordSecretRef is a reference to a non-empty key in a Secret resource
* containing the password used to encrypt the PKCS#12 keystore.
* Mutually exclusive with password.
* One of password or passwordSecretRef must provide a password with a non-zero length.
*/
passwordSecretRef?: {
/**
* The key of the entry in the Secret resource's `data` field to be used.
* Some instances of this field may be defaulted, in others it may be
* required.
*/
key?: string;
/**
* Name of the resource being referred to.
* More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
*/
name: string;
};
/**
* Profile specifies the key and certificate encryption algorithms and the HMAC algorithm
* used to create the PKCS12 keystore. Default value is `LegacyRC2` for backward compatibility.
*
* If provided, allowed values are:
* `LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20.
* `LegacyDES`: Less secure algorithm. Use this option for maximal compatibility.
* `Modern2023`: Secure algorithm. Use this option in case you have to always use secure algorithms
* (e.g., because of company policy). Please note that the security of the algorithm is not that important
* in reality, because the unencrypted certificate and private key are also stored in the Secret.
*/
profile?: string;
};
};
/**
* Requested X.509 certificate subject, represented using the LDAP "String
* Representation of a Distinguished Name" [1].
* Important: the LDAP string format also specifies the order of the attributes
* in the subject, this is important when issuing certs for LDAP authentication.
* Example: `CN=foo,DC=corp,DC=example,DC=com`
* More info [1]: https://datatracker.ietf.org/doc/html/rfc4514
* More info: https://github.com/cert-manager/cert-manager/issues/3203
* More info: https://github.com/cert-manager/cert-manager/issues/4424
*
* Cannot be set if the `subject` or `commonName` field is set.
*/
literalSubject?: string;
/**
* x.509 certificate NameConstraint extension which MUST NOT be used in a non-CA certificate.
* More Info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10
*
* This is an Alpha Feature and is only enabled with the
* `--feature-gates=NameConstraints=true` option set on both
* the controller and webhook components.
*/
nameConstraints?: {
/**
* if true then the name constraints are marked critical.
*/
critical?: boolean;
/**
* Excluded contains the constraints which must be disallowed. Any name matching a
* restriction in the excluded field is invalid regardless
* of information appearing in the permitted
*/
excluded?: {
/**
* DNSDomains is a list of DNS domains that are permitted or excluded.
*/
dnsDomains?: string[];
/**
* EmailAddresses is a list of Email Addresses that are permitted or excluded.
*/
emailAddresses?: string[];
/**
* IPRanges is a list of IP Ranges that are permitted or excluded.
* This should be a valid CIDR notation.
*/
ipRanges?: string[];
/**
* URIDomains is a list of URI domains that are permitted or excluded.
*/
uriDomains?: string[];
};
/**
* Permitted contains the constraints in which the names must be located.
*/
permitted?: {
/**
* DNSDomains is a list of DNS domains that are permitted or excluded.
*/
dnsDomains?: string[];
/**
* EmailAddresses is a list of Email Addresses that are permitted or excluded.
*/
emailAddresses?: string[];
/**
* IPRanges is a list of IP Ranges that are permitted or excluded.
* This should be a valid CIDR notation.
*/
ipRanges?: string[];
/**
* URIDomains is a list of URI domains that are permitted or excluded.
*/
uriDomains?: string[];
};
};
/**
* `otherNames` is an escape hatch for SAN that allows any type. We currently restrict the support to string like otherNames, cf RFC 5280 p 37
* Any UTF8 String valued otherName can be passed with by setting the keys oid: x.x.x.x and UTF8Value: somevalue for `otherName`.
* Most commonly this would be UPN set with oid: 1.3.6.1.4.1.311.20.2.3
* You should ensure that any OID passed is valid for the UTF8String type as we do not explicitly validate this.
*/
otherNames?: {
/**
* OID is the object identifier for the otherName SAN.
* The object identifier must be expressed as a dotted string, for
* example, "1.2.840.113556.1.4.221".
*/
oid?: string;
/**
* utf8Value is the string value of the otherName SAN.
* The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN.
*/
utf8Value?: string;
}[];
/**
* Private key options. These include the key algorithm and size, the used
* encoding and the rotation policy.
*/
privateKey?: {
/**
* Algorithm is the private key algorithm of the corresponding private key
* for this certificate.
*
* If provided, allowed values are either `RSA`, `ECDSA` or `Ed25519`.
* If `algorithm` is specified and `size` is not provided,
* key size of 2048 will be used for `RSA` key algorithm and
* key size of 256 will be used for `ECDSA` key algorithm.
* key size is ignored when using the `Ed25519` key algorithm.
*/
algorithm?: string;
/**
* The private key cryptography standards (PKCS) encoding for this
* certificate's private key to be encoded in.
*
* If provided, allowed values are `PKCS1` and `PKCS8` standing for PKCS#1
* and PKCS#8, respectively.
* Defaults to `PKCS1` if not specified.
*/
encoding?: string;
/**
* RotationPolicy controls how private keys should be regenerated when a
* re-issuance is being processed.
*
* If set to `Never`, a private key will only be generated if one does not
* already exist in the target `spec.secretName`. If one does exist but it
* does not have the correct algorithm or size, a warning will be raised
* to await user intervention.
* If set to `Always`, a private key matching the specified requirements
* will be generated whenever a re-issuance occurs.
* Default is `Always`.
* The default was changed from `Never` to `Always` in cert-manager >=v1.18.0.
* The new default can be disabled by setting the
* `--feature-gates=DefaultPrivateKeyRotationPolicyAlways=false` option on
* the controller component.
*/
rotationPolicy?: string;
/**
* Size is the key bit size of the corresponding private key for this certificate.
*
* If `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`,
* and will default to `2048` if not specified.
* If `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`,
* and will default to `256` if not specified.
* If `algorithm` is set to `Ed25519`, Size is ignored.
* No other values are allowed.
*/
size?: number;
};
/**
* How long before the currently issued certificate's expiry cert-manager should
* renew the certificate. For example, if a certificate is valid for 60 minutes,
* and `renewBefore=10m`, cert-manager will begin to attempt to renew the certificate
* 50 minutes after it was issued (i.e. when there are 10 minutes remaining until
* the certificate is no longer valid).
*
* NOTE: The actual lifetime of the issued certificate is used to determine the
* renewal time. If an issuer returns a certificate with a different lifetime than
* the one requested, cert-manager will use the lifetime of the issued certificate.
*
* If unset, this defaults to 1/3 of the issued certificate's lifetime.
* Minimum accepted value is 5 minutes.
* Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration.
* Cannot be set if the `renewBeforePercentage` field is set.
*/
renewBefore?: string;
/**
* `renewBeforePercentage` is like `renewBefore`, except it is a relative percentage
* rather than an absolute duration. For example, if a certificate is valid for 60
* minutes, and `renewBeforePercentage=25`, cert-manager will begin to attempt to
* renew the certificate 45 minutes after it was issued (i.e. when there are 15
* minutes (25%) remaining until the certificate is no longer valid).
*
* NOTE: The actual lifetime of the issued certificate is used to determine the
* renewal time. If an issuer returns a certificate with a different lifetime than
* the one requested, cert-manager will use the lifetime of the issued certificate.
*
* Value must be an integer in the range (0,100). The minimum effective
* `renewBefore` derived from the `renewBeforePercentage` and `duration` fields is 5
* minutes.
* Cannot be set if the `renewBefore` field is set.
*/
renewBeforePercentage?: number;
/**
* The maximum number of CertificateRequest revisions that are maintained in
* the Certificate's history. Each revision represents a single `CertificateRequest`
* created by this Certificate, either when it was created, renewed, or Spec
* was changed. Revisions will be removed by oldest first if the number of
* revisions exceeds this number.
*
* If set, revisionHistoryLimit must be a value of `1` or greater.
* Default value is `1`.
*/
revisionHistoryLimit?: number;
/**
* Name of the Secret resource that will be automatically created and
* managed by this Certificate resource. It will be populated with a
* private key and certificate, signed by the denoted issuer. The Secret
* resource lives in the same namespace as the Certificate resource.
*/
secretName: string;
/**
* Defines annotations and labels to be copied to the Certificate's Secret.
* Labels and annotations on the Secret will be changed as they appear on the
* SecretTemplate when added or removed. SecretTemplate annotations are added
* in conjunction with, and cannot overwrite, the base set of annotations
* cert-manager sets on the Certificate's Secret.
*/
secretTemplate?: {
/**
* Annotations is a key value map to be copied to the target Kubernetes Secret.
*/
annotations?: {
[k: string]: string;
};
/**
* Labels is a key value map to be copied to the target Kubernetes Secret.
*/
labels?: {
[k: string]: string;
};
};
/**
* Signature algorithm to use.
* Allowed values for RSA keys: SHA256WithRSA, SHA384WithRSA, SHA512WithRSA.
* Allowed values for ECDSA keys: ECDSAWithSHA256, ECDSAWithSHA384, ECDSAWithSHA512.
* Allowed values for Ed25519 keys: PureEd25519.
*/
signatureAlgorithm?: string;
/**
* Requested set of X509 certificate subject attributes.
* More info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
*
* The common name attribute is specified separately in the `commonName` field.
* Cannot be set if the `literalSubject` field is set.
*/
subject?: {
/**
* Countries to be used on the Certificate.
*/
countries?: string[];
/**
* Cities to be used on the Certificate.
*/
localities?: string[];
/**
* Organizational Units to be used on the Certificate.
*/
organizationalUnits?: string[];
/**
* Organizations to be used on the Certificate.
*/
organizations?: string[];
/**
* Postal codes to be used on the Certificate.
*/
postalCodes?: string[];
/**
* State/Provinces to be used on the Certificate.
*/
provinces?: string[];
/**
* Serial number to be used on the Certificate.
*/
serialNumber?: string;
/**
* Street addresses to be used on the Certificate.
*/
streetAddresses?: string[];
};
/**
* Requested URI subject alternative names.
*/
uris?: string[];
/**
* Requested key usages and extended key usages.
* These usages are used to set the `usages` field on the created CertificateRequest
* resources. If `encodeUsagesInRequest` is unset or set to `true`, the usages
* will additionally be encoded in the `request` field which contains the CSR blob.
*
* If unset, defaults to `digital signature` and `key encipherment`.
*/
usages?: (
| "signing"
| "digital signature"
| "content commitment"
| "key encipherment"
| "key agreement"
| "data encipherment"
| "cert sign"
| "crl sign"
| "encipher only"
| "decipher only"
| "any"
| "server auth"
| "client auth"
| "code signing"
| "email protection"
| "s/mime"
| "ipsec end system"
| "ipsec tunnel"
| "ipsec user"
| "timestamping"
| "ocsp signing"
| "microsoft sgc"
| "netscape sgc"
)[];
};
/**
* Status of the Certificate.
* This is set and managed automatically.
* Read-only.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
*/
status?: {
/**
* List of status conditions to indicate the status of certificates.
* Known condition types are `Ready` and `Issuing`.
*/
conditions?: {
/**
* LastTransitionTime is the timestamp corresponding to the last status
* change of this condition.
*/
lastTransitionTime?: string;
/**
* Message is a human readable description of the details of the last
* transition, complementing reason.
*/
message?: string;
/**
* If set, this represents the .metadata.generation that the condition was
* set based upon.
* For instance, if .metadata.generation is currently 12, but the
* .status.condition[x].observedGeneration is 9, the condition is out of date
* with respect to the current state of the Certificate.
*/
observedGeneration?: number;
/**
* Reason is a brief machine readable explanation for the condition's last
* transition.
*/
reason?: string;
/**
* Status of the condition, one of (`True`, `False`, `Unknown`).
*/
status: "True" | "False" | "Unknown";
/**
* Type of the condition, known values are (`Ready`, `Issuing`).
*/
type: string;
}[];
/**
* The number of continuous failed issuance attempts up till now. This
* field gets removed (if set) on a successful issuance and gets set to
* 1 if unset and an issuance has failed. If an issuance has failed, the
* delay till the next issuance will be calculated using formula
* time.Hour * 2 ^ (failedIssuanceAttempts - 1).
*/
failedIssuanceAttempts?: number;
/**
* LastFailureTime is set only if the latest issuance for this
* Certificate failed and contains the time of the failure. If an
* issuance has failed, the delay till the next issuance will be
* calculated using formula time.Hour * 2 ^ (failedIssuanceAttempts -
* 1). If the latest issuance has succeeded this field will be unset.
*/
lastFailureTime?: string;
/**
* The name of the Secret resource containing the private key to be used
* for the next certificate iteration.
* The keymanager controller will automatically set this field if the
* `Issuing` condition is set to `True`.
* It will automatically unset this field when the Issuing condition is
* not set or False.
*/
nextPrivateKeySecretName?: string;
/**
* The expiration time of the certificate stored in the secret named
* by this resource in `spec.secretName`.
*/
notAfter?: string;
/**
* The time after which the certificate stored in the secret named
* by this resource in `spec.secretName` is valid.
*/
notBefore?: string;
/**
* RenewalTime is the time at which the certificate will be next
* renewed.
* If not set, no upcoming renewal is scheduled.
*/
renewalTime?: string;
/**
* The current 'revision' of the certificate as issued.
*
* When a CertificateRequest resource is created, it will have the
* `cert-manager.io/certificate-revision` set to one greater than the
* current value of this field.
*
* Upon issuance, this field will be set to the value of the annotation
* on the CertificateRequest resource used to issue the certificate.
*
* Persisting the value on the CertificateRequest resource allows the
* certificates controller to know whether a request is part of an old
* issuance or if it is part of the ongoing revision's issuance by
* checking if the revision value in the annotation is greater than this
* field.
*/
revision?: number;
};
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,852 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SDestinationRuleV1 {
/**
* Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html
*/
spec?: {
/**
* A list of namespaces to which this destination rule is exported.
*/
exportTo?: string[];
/**
* The name of a service from the service registry.
*/
host: string;
/**
* One or more named sets that represent individual versions of a service.
*/
subsets?: {
/**
* Labels apply a filter over the endpoints of a service in the service registry.
*/
labels?: {
[k: string]: string;
};
/**
* Name of the subset.
*/
name: string;
/**
* Traffic policies that apply to this subset.
*/
trafficPolicy?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Traffic policies specific to individual ports.
*
* @maxItems 4096
*/
portLevelSettings?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Specifies the number of a port on the destination service on which this policy is being applied.
*/
port?: {
number?: number;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
}[];
/**
* The upstream PROXY protocol settings.
*/
proxyProtocol?: {
/**
* The PROXY protocol version to use.
*
* Valid Options: V1, V2
*/
version?: "V1" | "V2";
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
/**
* Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule.
*/
tunnel?: {
/**
* Specifies which protocol to use for tunneling the downstream connection.
*/
protocol?: string;
/**
* Specifies a host to which the downstream connection is tunneled.
*/
targetHost: string;
/**
* Specifies a port to which the downstream connection is tunneled.
*/
targetPort: number;
};
};
}[];
/**
* Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection).
*/
trafficPolicy?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: string;
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Traffic policies specific to individual ports.
*
* @maxItems 4096
*/
portLevelSettings?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Specifies the number of a port on the destination service on which this policy is being applied.
*/
port?: {
number?: number;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
}[];
/**
* The upstream PROXY protocol settings.
*/
proxyProtocol?: {
/**
* The PROXY protocol version to use.
*
* Valid Options: V1, V2
*/
version?: string;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
/**
* Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule.
*/
tunnel?: {
/**
* Specifies which protocol to use for tunneling the downstream connection.
*/
protocol?: string;
/**
* Specifies a host to which the downstream connection is tunneled.
*/
targetHost: string;
/**
* Specifies a port to which the downstream connection is tunneled.
*/
targetPort: number;
};
};
/**
* Criteria used to select the specific set of pods/VMs on which this `DestinationRule` configuration should be applied.
*/
workloadSelector?: {
/**
* One or more labels that indicate a specific set of pods/VMs on which a policy should be applied.
*/
matchLabels?: {
[k: string]: string;
};
};
};
status?: {
/**
* Current service state of the resource.
*/
conditions?: {
/**
* Last time we probed the condition.
*/
lastProbeTime?: string;
/**
* Last time the condition transitioned from one status to another.
*/
lastTransitionTime?: string;
/**
* Human-readable message indicating details about last transition.
*/
message?: string;
/**
* Unique, one-word, CamelCase reason for the condition's last transition.
*/
reason?: string;
/**
* Status is the status of the condition.
*/
status?: string;
/**
* Type is the type of the condition.
*/
type?: string;
}[];
/**
* Resource Generation to which the Reconciled Condition refers.
*/
observedGeneration?: number | string;
/**
* Includes any errors or warnings detected by Istio's analyzers.
*/
validationMessages?: {
/**
* A url pointing to the Istio documentation for this specific error type.
*/
documentationUrl?: string;
/**
* Represents how severe a message is.
*
* Valid Options: UNKNOWN, ERROR, WARNING, INFO
*/
level?: "UNKNOWN" | "ERROR" | "WARNING" | "INFO";
type?: {
/**
* A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.
*/
code?: string;
/**
* A human-readable name for the message type.
*/
name?: string;
};
}[];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,852 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SDestinationRuleV1Alpha3 {
/**
* Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html
*/
spec?: {
/**
* A list of namespaces to which this destination rule is exported.
*/
exportTo?: string[];
/**
* The name of a service from the service registry.
*/
host: string;
/**
* One or more named sets that represent individual versions of a service.
*/
subsets?: {
/**
* Labels apply a filter over the endpoints of a service in the service registry.
*/
labels?: {
[k: string]: string;
};
/**
* Name of the subset.
*/
name: string;
/**
* Traffic policies that apply to this subset.
*/
trafficPolicy?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Traffic policies specific to individual ports.
*
* @maxItems 4096
*/
portLevelSettings?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Specifies the number of a port on the destination service on which this policy is being applied.
*/
port?: {
number?: number;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
}[];
/**
* The upstream PROXY protocol settings.
*/
proxyProtocol?: {
/**
* The PROXY protocol version to use.
*
* Valid Options: V1, V2
*/
version?: "V1" | "V2";
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
/**
* Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule.
*/
tunnel?: {
/**
* Specifies which protocol to use for tunneling the downstream connection.
*/
protocol?: string;
/**
* Specifies a host to which the downstream connection is tunneled.
*/
targetHost: string;
/**
* Specifies a port to which the downstream connection is tunneled.
*/
targetPort: number;
};
};
}[];
/**
* Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection).
*/
trafficPolicy?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: string;
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Traffic policies specific to individual ports.
*
* @maxItems 4096
*/
portLevelSettings?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Specifies the number of a port on the destination service on which this policy is being applied.
*/
port?: {
number?: number;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
}[];
/**
* The upstream PROXY protocol settings.
*/
proxyProtocol?: {
/**
* The PROXY protocol version to use.
*
* Valid Options: V1, V2
*/
version?: string;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
/**
* Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule.
*/
tunnel?: {
/**
* Specifies which protocol to use for tunneling the downstream connection.
*/
protocol?: string;
/**
* Specifies a host to which the downstream connection is tunneled.
*/
targetHost: string;
/**
* Specifies a port to which the downstream connection is tunneled.
*/
targetPort: number;
};
};
/**
* Criteria used to select the specific set of pods/VMs on which this `DestinationRule` configuration should be applied.
*/
workloadSelector?: {
/**
* One or more labels that indicate a specific set of pods/VMs on which a policy should be applied.
*/
matchLabels?: {
[k: string]: string;
};
};
};
status?: {
/**
* Current service state of the resource.
*/
conditions?: {
/**
* Last time we probed the condition.
*/
lastProbeTime?: string;
/**
* Last time the condition transitioned from one status to another.
*/
lastTransitionTime?: string;
/**
* Human-readable message indicating details about last transition.
*/
message?: string;
/**
* Unique, one-word, CamelCase reason for the condition's last transition.
*/
reason?: string;
/**
* Status is the status of the condition.
*/
status?: string;
/**
* Type is the type of the condition.
*/
type?: string;
}[];
/**
* Resource Generation to which the Reconciled Condition refers.
*/
observedGeneration?: number | string;
/**
* Includes any errors or warnings detected by Istio's analyzers.
*/
validationMessages?: {
/**
* A url pointing to the Istio documentation for this specific error type.
*/
documentationUrl?: string;
/**
* Represents how severe a message is.
*
* Valid Options: UNKNOWN, ERROR, WARNING, INFO
*/
level?: "UNKNOWN" | "ERROR" | "WARNING" | "INFO";
type?: {
/**
* A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.
*/
code?: string;
/**
* A human-readable name for the message type.
*/
name?: string;
};
}[];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,852 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SDestinationRuleV1Beta1 {
/**
* Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html
*/
spec?: {
/**
* A list of namespaces to which this destination rule is exported.
*/
exportTo?: string[];
/**
* The name of a service from the service registry.
*/
host: string;
/**
* One or more named sets that represent individual versions of a service.
*/
subsets?: {
/**
* Labels apply a filter over the endpoints of a service in the service registry.
*/
labels?: {
[k: string]: string;
};
/**
* Name of the subset.
*/
name: string;
/**
* Traffic policies that apply to this subset.
*/
trafficPolicy?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Traffic policies specific to individual ports.
*
* @maxItems 4096
*/
portLevelSettings?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Specifies the number of a port on the destination service on which this policy is being applied.
*/
port?: {
number?: number;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
}[];
/**
* The upstream PROXY protocol settings.
*/
proxyProtocol?: {
/**
* The PROXY protocol version to use.
*
* Valid Options: V1, V2
*/
version?: "V1" | "V2";
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
/**
* Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule.
*/
tunnel?: {
/**
* Specifies which protocol to use for tunneling the downstream connection.
*/
protocol?: string;
/**
* Specifies a host to which the downstream connection is tunneled.
*/
targetHost: string;
/**
* Specifies a port to which the downstream connection is tunneled.
*/
targetPort: number;
};
};
}[];
/**
* Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection).
*/
trafficPolicy?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: string;
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Traffic policies specific to individual ports.
*
* @maxItems 4096
*/
portLevelSettings?: {
connectionPool?: {
/**
* HTTP connection pool settings.
*/
http?: {
/**
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
* Valid Options: DEFAULT, DO_NOT_UPGRADE, UPGRADE
*/
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE";
/**
* Maximum number of requests that will be queued while waiting for a ready connection pool connection.
*/
http1MaxPendingRequests?: number;
/**
* Maximum number of active requests to a destination.
*/
http2MaxRequests?: number;
/**
* The idle timeout for upstream connection pool connections.
*/
idleTimeout?: string;
/**
* The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
*/
maxConcurrentStreams?: number;
/**
* Maximum number of requests per connection to a backend.
*/
maxRequestsPerConnection?: number;
/**
* Maximum number of retries that can be outstanding to all hosts in a cluster at a given time.
*/
maxRetries?: number;
/**
* If set to true, client protocol will be preserved while initiating connection to backend.
*/
useClientProtocol?: boolean;
};
/**
* Settings common to both HTTP and TCP upstream connections.
*/
tcp?: {
/**
* TCP connection timeout.
*/
connectTimeout?: string;
/**
* The idle timeout for TCP connections.
*/
idleTimeout?: string;
/**
* The maximum duration of a connection.
*/
maxConnectionDuration?: string;
/**
* Maximum number of HTTP1 /TCP connections to a destination host.
*/
maxConnections?: number;
/**
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*/
tcpKeepalive?: {
/**
* The time duration between keep-alive probes.
*/
interval?: string;
/**
* Maximum number of keepalive probes to send without response before deciding the connection is dead.
*/
probes?: number;
/**
* The time duration a connection needs to be idle before keep-alive probes start being sent.
*/
time?: string;
};
};
};
/**
* Settings controlling the load balancer algorithms.
*/
loadBalancer?: {
[k: string]: unknown;
};
outlierDetection?: {
/**
* Minimum ejection duration.
*/
baseEjectionTime?: string;
/**
* Number of 5xx errors before a host is ejected from the connection pool.
*/
consecutive5xxErrors?: number;
consecutiveErrors?: number;
/**
* Number of gateway errors before a host is ejected from the connection pool.
*/
consecutiveGatewayErrors?: number;
/**
* The number of consecutive locally originated failures before ejection occurs.
*/
consecutiveLocalOriginFailures?: number;
/**
* Time interval between ejection sweep analysis.
*/
interval?: string;
/**
* Maximum % of hosts in the load balancing pool for the upstream service that can be ejected.
*/
maxEjectionPercent?: number;
/**
* Outlier detection will be enabled as long as the associated load balancing pool has at least `minHealthPercent` hosts in healthy mode.
*/
minHealthPercent?: number;
/**
* Determines whether to distinguish local origin failures from external errors.
*/
splitExternalLocalOriginErrors?: boolean;
};
/**
* Specifies the number of a port on the destination service on which this policy is being applied.
*/
port?: {
number?: number;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL";
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
}[];
/**
* The upstream PROXY protocol settings.
*/
proxyProtocol?: {
/**
* The PROXY protocol version to use.
*
* Valid Options: V1, V2
*/
version?: string;
};
/**
* TLS related settings for connections to the upstream service.
*/
tls?: {
/**
* OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.
*/
caCertificates?: string;
/**
* OPTIONAL: The path to the file containing the certificate revocation list (CRL) to use in verifying a presented server certificate.
*/
caCrl?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
clientCertificate?: string;
/**
* The name of the secret that holds the TLS certs for the client including the CA certificates.
*/
credentialName?: string;
/**
* `insecureSkipVerify` specifies whether the proxy should skip verifying the CA signature and SAN for the server certificate corresponding to the host.
*/
insecureSkipVerify?: boolean;
/**
* Indicates whether connections to this port should be secured using TLS.
*
* Valid Options: DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
*/
mode?: string;
/**
* REQUIRED if mode is `MUTUAL`.
*/
privateKey?: string;
/**
* SNI string to present to the server during TLS handshake.
*/
sni?: string;
/**
* A list of alternate names to verify the subject identity in the certificate.
*/
subjectAltNames?: string[];
};
/**
* Configuration of tunneling TCP over other transport or application layers for the host configured in the DestinationRule.
*/
tunnel?: {
/**
* Specifies which protocol to use for tunneling the downstream connection.
*/
protocol?: string;
/**
* Specifies a host to which the downstream connection is tunneled.
*/
targetHost: string;
/**
* Specifies a port to which the downstream connection is tunneled.
*/
targetPort: number;
};
};
/**
* Criteria used to select the specific set of pods/VMs on which this `DestinationRule` configuration should be applied.
*/
workloadSelector?: {
/**
* One or more labels that indicate a specific set of pods/VMs on which a policy should be applied.
*/
matchLabels?: {
[k: string]: string;
};
};
};
status?: {
/**
* Current service state of the resource.
*/
conditions?: {
/**
* Last time we probed the condition.
*/
lastProbeTime?: string;
/**
* Last time the condition transitioned from one status to another.
*/
lastTransitionTime?: string;
/**
* Human-readable message indicating details about last transition.
*/
message?: string;
/**
* Unique, one-word, CamelCase reason for the condition's last transition.
*/
reason?: string;
/**
* Status is the status of the condition.
*/
status?: string;
/**
* Type is the type of the condition.
*/
type?: string;
}[];
/**
* Resource Generation to which the Reconciled Condition refers.
*/
observedGeneration?: number | string;
/**
* Includes any errors or warnings detected by Istio's analyzers.
*/
validationMessages?: {
/**
* A url pointing to the Istio documentation for this specific error type.
*/
documentationUrl?: string;
/**
* Represents how severe a message is.
*
* Valid Options: UNKNOWN, ERROR, WARNING, INFO
*/
level?: "UNKNOWN" | "ERROR" | "WARNING" | "INFO";
type?: {
/**
* A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type.
*/
code?: string;
/**
* A human-readable name for the message type.
*/
name?: string;
};
}[];
};
}

View File

@@ -0,0 +1,94 @@
{
"properties": {
"spec": {
"properties": {
"destination": {
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"port": {
"properties": {
"number": {
"type": "number"
}
},
"required": [
"number"
],
"type": "object"
}
},
"required": [
"name",
"port"
],
"type": "object"
},
"domain": {
"type": "string"
},
"subdomain": {
"type": "string"
}
},
"required": [
"domain",
"subdomain",
"destination"
],
"type": "object"
},
"status": {
"properties": {
"conditions": {
"items": {
"type": "object",
"required": [
"type",
"status",
"lastTransitionTime"
],
"properties": {
"lastTransitionTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"type": "string"
}
}
},
"type": "array"
},
"observedGeneration": {
"type": "number"
}
},
"required": [
"observedGeneration",
"conditions"
],
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,30 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SDomainEndpointV1 {
spec?: {
destination: {
name: string;
namespace?: string;
port: {
number: number;
};
};
domain: string;
subdomain: string;
};
status?: {
conditions: {
lastTransitionTime: string;
message?: string;
reason?: string;
status: "True" | "False" | "Unknown";
type: string;
}[];
observedGeneration: number;
};
}

View File

@@ -0,0 +1,63 @@
{
"properties": {
"spec": {
"properties": {
"domain": {
"type": "string"
}
},
"required": [
"domain"
],
"type": "object"
},
"status": {
"properties": {
"conditions": {
"items": {
"type": "object",
"required": [
"type",
"status",
"lastTransitionTime"
],
"properties": {
"lastTransitionTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"True",
"False",
"Unknown"
]
},
"type": {
"type": "string"
}
}
},
"type": "array"
},
"observedGeneration": {
"type": "number"
}
},
"required": [
"observedGeneration",
"conditions"
],
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,22 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export interface K8SDomainV1 {
spec?: {
domain: string;
};
status?: {
conditions: {
lastTransitionTime: string;
message?: string;
reason?: string;
status: "True" | "False" | "Unknown";
type: string;
}[];
observedGeneration: number;
};
}

View File

@@ -0,0 +1,128 @@
{
"description": "ETCDSnapshot tracks a point-in-time snapshot of the etcd datastore.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"type": "object"
},
"spec": {
"description": "Spec defines properties of an etcd snapshot file",
"properties": {
"location": {
"description": "Location is the absolute file:// or s3:// URI address of the snapshot.",
"type": "string"
},
"metadata": {
"additionalProperties": {
"type": "string"
},
"description": "Metadata contains point-in-time snapshot of the contents of the\nk3s-etcd-snapshot-extra-metadata ConfigMap's data field, at the time the\nsnapshot was taken. This is intended to contain data about cluster state\nthat may be important for an external system to have available when restoring\nthe snapshot.",
"type": "object"
},
"nodeName": {
"description": "NodeName contains the name of the node that took the snapshot.",
"type": "string"
},
"s3": {
"description": "S3 contains extra metadata about the S3 storage system holding the\nsnapshot. This is guaranteed to be set for all snapshots uploaded to S3.\nIf not specified, the snapshot was not uploaded to S3.",
"properties": {
"bucket": {
"description": "Bucket is the bucket holding the snapshot",
"type": "string"
},
"bucketLookup": {
"description": "BucketLookup is the bucket lookup type, one of 'auto', 'dns', 'path'. Default if empty is 'auto'.",
"type": "string"
},
"endpoint": {
"description": "Endpoint is the host or host:port of the S3 service",
"type": "string"
},
"endpointCA": {
"description": "EndpointCA is the path on disk to the S3 service's trusted CA list. Leave empty to use the OS CA bundle.",
"type": "string"
},
"insecure": {
"description": "Insecure is true if the S3 service uses HTTP instead of HTTPS",
"type": "boolean"
},
"prefix": {
"description": "Prefix is the prefix in which the snapshot file is stored.",
"type": "string"
},
"region": {
"description": "Region is the region of the S3 service",
"type": "string"
},
"skipSSLVerify": {
"description": "SkipSSLVerify is true if TLS certificate verification is disabled",
"type": "boolean"
}
},
"type": "object"
},
"snapshotName": {
"description": "SnapshotName contains the base name of the snapshot file. CLI actions that act\non snapshots stored locally or within a pre-configured S3 bucket and\nprefix usually take the snapshot name as their argument.",
"type": "string"
}
},
"required": [
"location",
"nodeName",
"snapshotName"
],
"type": "object"
},
"status": {
"description": "Status represents current information about a snapshot.",
"properties": {
"creationTime": {
"description": "CreationTime is the timestamp when the snapshot was taken by etcd.",
"format": "date-time",
"type": "string"
},
"error": {
"description": "Error is the last observed error during snapshot creation, if any.\nIf the snapshot is retried, this field will be cleared on success.",
"properties": {
"message": {
"description": "Message is a string detailing the encountered error during snapshot creation if specified.\nNOTE: message may be logged, and it should not contain sensitive information.",
"type": "string"
},
"time": {
"description": "Time is the timestamp when the error was encountered.",
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"readyToUse": {
"description": "ReadyToUse indicates that the snapshot is available to be restored.",
"type": "boolean"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "Size is the size of the snapshot file, in bytes. If not specified, the snapshot failed.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"x_kubernetes_int_or_string": true
}
},
"type": "object"
}
},
"type": "object"
}

Some files were not shown because too many files have changed in this diff Show More