···11+FROM golang:1.25-alpine AS builder
22+33+WORKDIR /workspace
44+55+COPY go.mod go.sum ./
66+RUN go mod download
77+88+COPY cmd/ cmd/
99+COPY api/ api/
1010+COPY internal/ internal/
1111+1212+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager cmd/main.go
1313+1414+FROM gcr.io/distroless/static:nonroot
1515+1616+WORKDIR /
1717+COPY --from=builder /workspace/manager .
1818+USER 65532:65532
1919+2020+ENTRYPOINT ["/manager"]
+201
LICENSE
···11+ Apache License
22+ Version 2.0, January 2004
33+ http://www.apache.org/licenses/
44+55+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
66+77+ 1. Definitions.
88+99+ "License" shall mean the terms and conditions for use, reproduction,
1010+ and distribution as defined by Sections 1 through 9 of this document.
1111+1212+ "Licensor" shall mean the copyright owner or entity authorized by
1313+ the copyright owner that is granting the License.
1414+1515+ "Legal Entity" shall mean the union of the acting entity and all
1616+ other entities that control, are controlled by, or are under common
1717+ control with that entity. For the purposes of this definition,
1818+ "control" means (i) the power, direct or indirect, to cause the
1919+ direction or management of such entity, whether by contract or
2020+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
2121+ outstanding shares, or (iii) beneficial ownership of such entity.
2222+2323+ "You" (or "Your") shall mean an individual or Legal Entity
2424+ exercising permissions granted by this License.
2525+2626+ "Source" form shall mean the preferred form for making modifications,
2727+ including but not limited to software source code, documentation
2828+ source, and configuration files.
2929+3030+ "Object" form shall mean any form resulting from mechanical
3131+ transformation or translation of a Source form, including but
3232+ not limited to compiled object code, generated documentation,
3333+ and conversions to other media types.
3434+3535+ "Work" shall mean the work of authorship, whether in Source or
3636+ Object form, made available under the License, as indicated by a
3737+ copyright notice that is included in or attached to the work
3838+ (an example is provided in the Appendix below).
3939+4040+ "Derivative Works" shall mean any work, whether in Source or Object
4141+ form, that is based on (or derived from) the Work and for which the
4242+ editorial revisions, annotations, elaborations, or other modifications
4343+ represent, as a whole, an original work of authorship. For the purposes
4444+ of this License, Derivative Works shall not include works that remain
4545+ separable from, or merely link (or bind by name) to the interfaces of,
4646+ the Work and Derivative Works thereof.
4747+4848+ "Contribution" shall mean any work of authorship, including
4949+ the original version of the Work and any modifications or additions
5050+ to that Work or Derivative Works thereof, that is intentionally
5151+ submitted to Licensor for inclusion in the Work by the copyright owner
5252+ or by an individual or Legal Entity authorized to submit on behalf of
5353+ the copyright owner. For the purposes of this definition, "submitted"
5454+ means any form of electronic, verbal, or written communication sent
5555+ to the Licensor or its representatives, including but not limited to
5656+ communication on electronic mailing lists, source code control systems,
5757+ and issue tracking systems that are managed by, or on behalf of, the
5858+ Licensor for the purpose of discussing and improving the Work, but
5959+ excluding communication that is conspicuously marked or otherwise
6060+ designated in writing by the copyright owner as "Not a Contribution."
6161+6262+ "Contributor" shall mean Licensor and any individual or Legal Entity
6363+ on behalf of whom a Contribution has been received by Licensor and
6464+ subsequently incorporated within the Work.
6565+6666+ 2. Grant of Copyright License. Subject to the terms and conditions of
6767+ this License, each Contributor hereby grants to You a perpetual,
6868+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6969+ copyright license to reproduce, prepare Derivative Works of,
7070+ publicly display, publicly perform, sublicense, and distribute the
7171+ Work and such Derivative Works in Source or Object form.
7272+7373+ 3. Grant of Patent License. Subject to the terms and conditions of
7474+ this License, each Contributor hereby grants to You a perpetual,
7575+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
7676+ (except as stated in this section) patent license to make, have made,
7777+ use, offer to sell, sell, import, and otherwise transfer the Work,
7878+ where such license applies only to those patent claims licensable
7979+ by such Contributor that are necessarily infringed by their
8080+ Contribution(s) alone or by combination of their Contribution(s)
8181+ with the Work to which such Contribution(s) was submitted. If You
8282+ institute patent litigation against any entity (including a
8383+ cross-claim or counterclaim in a lawsuit) alleging that the Work
8484+ or a Contribution incorporated within the Work constitutes direct
8585+ or contributory patent infringement, then any patent licenses
8686+ granted to You under this License for that Work shall terminate
8787+ as of the date such litigation is filed.
8888+8989+ 4. Redistribution. You may reproduce and distribute copies of the
9090+ Work or Derivative Works thereof in any medium, with or without
9191+ modifications, and in Source or Object form, provided that You
9292+ meet the following conditions:
9393+9494+ (a) You must give any other recipients of the Work or
9595+ Derivative Works a copy of this License; and
9696+9797+ (b) You must cause any modified files to carry prominent notices
9898+ stating that You changed the files; and
9999+100100+ (c) You must retain, in the Source form of any Derivative Works
101101+ that You distribute, all copyright, patent, trademark, and
102102+ attribution notices from the Source form of the Work,
103103+ excluding those notices that do not pertain to any part of
104104+ the Derivative Works; and
105105+106106+ (d) If the Work includes a "NOTICE" text file as part of its
107107+ distribution, then any Derivative Works that You distribute must
108108+ include a readable copy of the attribution notices contained
109109+ within such NOTICE file, excluding those notices that do not
110110+ pertain to any part of the Derivative Works, in at least one
111111+ of the following places: within a NOTICE text file distributed
112112+ as part of the Derivative Works; within the Source form or
113113+ documentation, if provided along with the Derivative Works; or,
114114+ within a display generated by the Derivative Works, if and
115115+ wherever such third-party notices normally appear. The contents
116116+ of the NOTICE file are for informational purposes only and
117117+ do not modify the License. You may add Your own attribution
118118+ notices within Derivative Works that You distribute, alongside
119119+ or as an addendum to the NOTICE text from the Work, provided
120120+ that such additional attribution notices cannot be construed
121121+ as modifying the License.
122122+123123+ You may add Your own copyright statement to Your modifications and
124124+ may provide additional or different license terms and conditions
125125+ for use, reproduction, or distribution of Your modifications, or
126126+ for any such Derivative Works as a whole, provided Your use,
127127+ reproduction, and distribution of the Work otherwise complies with
128128+ the conditions stated in this License.
129129+130130+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131131+ any Contribution intentionally submitted for inclusion in the Work
132132+ by You to the Licensor shall be under the terms and conditions of
133133+ this License, without any additional terms or conditions.
134134+ Notwithstanding the above, nothing herein shall supersede or modify
135135+ the terms of any separate license agreement you may have executed
136136+ with Licensor regarding such Contributions.
137137+138138+ 6. Trademarks. This License does not grant permission to use the trade
139139+ names, trademarks, service marks, or product names of the Licensor,
140140+ except as required for reasonable and customary use in describing the
141141+ origin of the Work and reproducing the content of the NOTICE file.
142142+143143+ 7. Disclaimer of Warranty. Unless required by applicable law or
144144+ agreed to in writing, Licensor provides the Work (and each
145145+ Contributor provides its Contributions) on an "AS IS" BASIS,
146146+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147147+ implied, including, without limitation, any warranties or conditions
148148+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149149+ PARTICULAR PURPOSE. You are solely responsible for determining the
150150+ appropriateness of using or redistributing the Work and assume any
151151+ risks associated with Your exercise of permissions under this License.
152152+153153+ 8. Limitation of Liability. In no event and under no legal theory,
154154+ whether in tort (including negligence), contract, or otherwise,
155155+ unless required by applicable law (such as deliberate and grossly
156156+ negligent acts) or agreed to in writing, shall any Contributor be
157157+ liable to You for damages, including any direct, indirect, special,
158158+ incidental, or consequential damages of any character arising as a
159159+ result of this License or out of the use or inability to use the
160160+ Work (including but not limited to damages for loss of goodwill,
161161+ work stoppage, computer failure or malfunction, or any and all
162162+ other commercial damages or losses), even if such Contributor
163163+ has been advised of the possibility of such damages.
164164+165165+ 9. Accepting Warranty or Additional Liability. While redistributing
166166+ the Work or Derivative Works thereof, You may choose to offer,
167167+ and charge a fee for, acceptance of support, warranty, indemnity,
168168+ or other liability obligations and/or rights consistent with this
169169+ License. However, in accepting such obligations, You may act only
170170+ on Your own behalf and on Your sole responsibility, not on behalf
171171+ of any other Contributor, and only if You agree to indemnify,
172172+ defend, and hold each Contributor harmless for any liability
173173+ incurred by, or claims asserted against, such Contributor by reason
174174+ of your accepting any such warranty or additional liability.
175175+176176+ END OF TERMS AND CONDITIONS
177177+178178+ APPENDIX: How to apply the Apache License to your work.
179179+180180+ To apply the Apache License to your work, attach the following
181181+ boilerplate notice, with the fields enclosed by brackets "[]"
182182+ replaced with your own identifying information. (Don't include
183183+ the brackets!) The text should be enclosed in the appropriate
184184+ comment syntax for the file format. We also recommend that a
185185+ file or class name and description of purpose be included on the
186186+ same "printed page" as the copyright notice for easier
187187+ identification within third-party archives.
188188+189189+ Copyright [yyyy] [name of copyright owner]
190190+191191+ Licensed under the Apache License, Version 2.0 (the "License");
192192+ you may not use this file except in compliance with the License.
193193+ You may obtain a copy of the License at
194194+195195+ http://www.apache.org/licenses/LICENSE-2.0
196196+197197+ Unless required by applicable law or agreed to in writing, software
198198+ distributed under the License is distributed on an "AS IS" BASIS,
199199+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200+ See the License for the specific language governing permissions and
201201+ limitations under the License.
+44
Makefile
···11+.PHONY: all build test docker-build docker-push install uninstall deploy undeploy manifests generate fmt vet run \
22+ lint ci ensure-hooks clean tidy deps help unit cover
33+44+IMG ?= knot-operator:latest
55+NAMESPACE ?= knot-operator-system
66+VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
77+88+LDFLAGS = -ldflags "-X main.Version=${VERSION}"
99+CGO_ENABLED = 0
1010+GTEST_ARGS = -v -race -timeout=10m
1111+1212+CONTROLLER_GEN ?= $(shell which controller-gen 2>/dev/null || echo "controller-gen")
1313+1414+all: build
1515+1616+fmt:
1717+ go fmt ./...
1818+1919+vet:
2020+ go vet ./...
2121+2222+test: fmt vet unit
2323+2424+unit:
2525+ go test $(GTEST_ARGS) ./...
2626+2727+cover:
2828+ go test $(GTEST_ARGS) -coverprofile=cover.out ./...
2929+ go tool cover -func=cover.out
3030+3131+run: fmt vet
3232+ go run ./cmd/main.go
3333+3434+lint:
3535+ @echo "Running pre-commit for all files..."
3636+ pre-commit run --all-files
3737+ @echo "Pre-commit checks passed."
3838+3939+generate: manifests ## Generate all code and manifests
4040+ $(CONTROLLER_GEN) object paths="./..."
4141+4242+manifests: ## Generate CRD manifests
4343+ $(CONTROLLER_GEN) crd paths="./api/..." output:crd:artifacts:config=config/crd
4444+ $(CONTROLLER_GEN) rbac:roleName=knot-operator paths="./internal/controller/..." output:rbac:dir=config/rbac
···11+package v1alpha1
22+33+import (
44+ corev1 "k8s.io/api/core/v1"
55+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
66+)
77+88+// KnotSpec defines the desired state of Knot
99+type KnotSpec struct {
1010+ // Image is the container image to use for the Knot server
1111+ // +kubebuilder:default="docker.io/tngl/knot:v1.10.0-alpha"
1212+ Image string `json:"image,omitempty"`
1313+1414+ // ImagePullPolicy defines the pull policy for the container image
1515+ // +kubebuilder:default="IfNotPresent"
1616+ ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
1717+1818+ // Replicas is the number of Knot server instances to run
1919+ // +kubebuilder:default=1
2020+ // +kubebuilder:validation:Minimum=1
2121+ Replicas int32 `json:"replicas,omitempty"`
2222+2323+ // Hostname is the public hostname for the Knot server (e.g., knot.example.com)
2424+ // +kubebuilder:validation:Required
2525+ Hostname string `json:"hostname"`
2626+2727+ // Owner is the DID identifier of the server owner
2828+ // +kubebuilder:validation:Required
2929+ Owner string `json:"owner"`
3030+3131+ // AppviewEndpoint is the appview endpoint URL
3232+ // +kubebuilder:default="https://tangled.org"
3333+ AppviewEndpoint string `json:"appviewEndpoint,omitempty"`
3434+3535+ // Storage configures persistent storage for repositories and database
3636+ Storage KnotStorageSpec `json:"storage,omitempty"`
3737+3838+ // Resources defines compute resource requirements
3939+ Resources corev1.ResourceRequirements `json:"resources,omitempty"`
4040+4141+ // ServiceAccountName is the name of the ServiceAccount to use
4242+ ServiceAccountName string `json:"serviceAccountName,omitempty"`
4343+4444+ // NodeSelector for pod scheduling
4545+ NodeSelector map[string]string `json:"nodeSelector,omitempty"`
4646+4747+ // Tolerations for pod scheduling
4848+ Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
4949+5050+ // Affinity rules for pod scheduling
5151+ Affinity *corev1.Affinity `json:"affinity,omitempty"`
5252+5353+ // Ingress configures external access (Kubernetes Ingress)
5454+ Ingress *KnotIngressSpec `json:"ingress,omitempty"`
5555+5656+ // OpenShift contains OpenShift-specific configuration
5757+ OpenShift *KnotOpenShiftSpec `json:"openshift,omitempty"`
5858+5959+ // SSH configures the SSH server for git operations
6060+ SSH *KnotSSHSpec `json:"ssh,omitempty"`
6161+6262+ // ExtraEnv allows adding additional environment variables
6363+ ExtraEnv []corev1.EnvVar `json:"extraEnv,omitempty"`
6464+}
6565+6666+// KnotStorageSpec defines storage configuration
6767+type KnotStorageSpec struct {
6868+ // RepoStorageClass is the StorageClass for repository storage
6969+ RepoStorageClass string `json:"repoStorageClass,omitempty"`
7070+7171+ // RepoSize is the size of the repository PVC
7272+ // +kubebuilder:default="10Gi"
7373+ RepoSize string `json:"repoSize,omitempty"`
7474+7575+ // DBStorageClass is the StorageClass for database storage
7676+ DBStorageClass string `json:"dbStorageClass,omitempty"`
7777+7878+ // DBSize is the size of the database PVC
7979+ // +kubebuilder:default="1Gi"
8080+ DBSize string `json:"dbSize,omitempty"`
8181+8282+ // RepoPath is the path where repositories are stored
8383+ // +kubebuilder:default="/data/repos"
8484+ RepoPath string `json:"repoPath,omitempty"`
8585+8686+ // DBPath is the path where the database is stored
8787+ // +kubebuilder:default="/data/db"
8888+ DBPath string `json:"dbPath,omitempty"`
8989+}
9090+9191+// KnotIngressSpec defines Kubernetes Ingress configuration
9292+type KnotIngressSpec struct {
9393+ // Enabled enables Ingress creation
9494+ Enabled bool `json:"enabled,omitempty"`
9595+9696+ // IngressClassName is the IngressClass to use
9797+ IngressClassName string `json:"ingressClassName,omitempty"`
9898+9999+ // Annotations to add to the Ingress
100100+ Annotations map[string]string `json:"annotations,omitempty"`
101101+102102+ // TLS configures TLS for the Ingress
103103+ TLS *KnotIngressTLSSpec `json:"tls,omitempty"`
104104+}
105105+106106+// KnotIngressTLSSpec defines TLS configuration for Ingress
107107+type KnotIngressTLSSpec struct {
108108+ // Enabled enables TLS
109109+ Enabled bool `json:"enabled,omitempty"`
110110+111111+ // SecretName is the name of the TLS secret
112112+ SecretName string `json:"secretName,omitempty"`
113113+}
114114+115115+// KnotOpenShiftSpec defines OpenShift-specific configuration
116116+type KnotOpenShiftSpec struct {
117117+ // Route configures OpenShift Route creation
118118+ Route *KnotRouteSpec `json:"route,omitempty"`
119119+120120+ // SCC configures Security Context Constraints
121121+ SCC *KnotSCCSpec `json:"scc,omitempty"`
122122+}
123123+124124+// KnotRouteSpec defines OpenShift Route configuration
125125+type KnotRouteSpec struct {
126126+ // Enabled enables Route creation
127127+ Enabled bool `json:"enabled,omitempty"`
128128+129129+ // Annotations to add to the Route
130130+ Annotations map[string]string `json:"annotations,omitempty"`
131131+132132+ // TLS configures TLS termination for the Route
133133+ TLS *KnotRouteTLSSpec `json:"tls,omitempty"`
134134+135135+ // WildcardPolicy specifies the wildcard policy (None, Subdomain)
136136+ // +kubebuilder:default="None"
137137+ WildcardPolicy string `json:"wildcardPolicy,omitempty"`
138138+}
139139+140140+// KnotRouteTLSSpec defines TLS configuration for OpenShift Routes
141141+type KnotRouteTLSSpec struct {
142142+ // Termination specifies the TLS termination type (edge, passthrough, reencrypt)
143143+ // +kubebuilder:default="edge"
144144+ // +kubebuilder:validation:Enum=edge;passthrough;reencrypt
145145+ Termination string `json:"termination,omitempty"`
146146+147147+ // InsecureEdgeTerminationPolicy specifies behavior for insecure connections
148148+ // +kubebuilder:default="Redirect"
149149+ // +kubebuilder:validation:Enum=Allow;Redirect;None
150150+ InsecureEdgeTerminationPolicy string `json:"insecureEdgeTerminationPolicy,omitempty"`
151151+152152+ // Certificate is the PEM-encoded certificate
153153+ Certificate string `json:"certificate,omitempty"`
154154+155155+ // Key is the PEM-encoded private key
156156+ Key string `json:"key,omitempty"`
157157+158158+ // CACertificate is the PEM-encoded CA certificate
159159+ CACertificate string `json:"caCertificate,omitempty"`
160160+161161+ // DestinationCACertificate is used for reencrypt termination
162162+ DestinationCACertificate string `json:"destinationCACertificate,omitempty"`
163163+}
164164+165165+// KnotSCCSpec defines Security Context Constraints configuration
166166+type KnotSCCSpec struct {
167167+ // Name is the name of the SCC to use or create
168168+ // +kubebuilder:default="knot-scc"
169169+ Name string `json:"name,omitempty"`
170170+171171+ // Create specifies whether to create a custom SCC
172172+ Create bool `json:"create,omitempty"`
173173+174174+ // RunAsUser specifies the run as user strategy
175175+ // +kubebuilder:default="MustRunAsNonRoot"
176176+ RunAsUser string `json:"runAsUser,omitempty"`
177177+178178+ // SELinuxContext specifies the SELinux context strategy
179179+ // +kubebuilder:default="MustRunAs"
180180+ SELinuxContext string `json:"seLinuxContext,omitempty"`
181181+182182+ // FSGroup specifies the fs group strategy
183183+ // +kubebuilder:default="MustRunAs"
184184+ FSGroup string `json:"fsGroup,omitempty"`
185185+186186+ // SupplementalGroups specifies the supplemental groups strategy
187187+ // +kubebuilder:default="RunAsAny"
188188+ SupplementalGroups string `json:"supplementalGroups,omitempty"`
189189+190190+ // AllowPrivilegedContainer allows privileged containers
191191+ // +kubebuilder:default=false
192192+ AllowPrivilegedContainer bool `json:"allowPrivilegedContainer,omitempty"`
193193+194194+ // AllowHostNetwork allows host network access
195195+ // +kubebuilder:default=false
196196+ AllowHostNetwork bool `json:"allowHostNetwork,omitempty"`
197197+198198+ // AllowHostPorts allows host port binding
199199+ // +kubebuilder:default=false
200200+ AllowHostPorts bool `json:"allowHostPorts,omitempty"`
201201+202202+ // AllowHostPID allows host PID namespace
203203+ // +kubebuilder:default=false
204204+ AllowHostPID bool `json:"allowHostPID,omitempty"`
205205+206206+ // AllowHostIPC allows host IPC namespace
207207+ // +kubebuilder:default=false
208208+ AllowHostIPC bool `json:"allowHostIPC,omitempty"`
209209+210210+ // ReadOnlyRootFilesystem requires read-only root filesystem
211211+ // +kubebuilder:default=false
212212+ ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
213213+214214+ // Volumes specifies allowed volume types
215215+ Volumes []string `json:"volumes,omitempty"`
216216+}
217217+218218+// KnotSSHSpec defines SSH server configuration
219219+type KnotSSHSpec struct {
220220+ // Enabled enables SSH access for git operations
221221+ Enabled bool `json:"enabled,omitempty"`
222222+223223+ // Port is the SSH port to expose
224224+ // +kubebuilder:default=22
225225+ Port int32 `json:"port,omitempty"`
226226+227227+ // ServiceType is the Kubernetes Service type for SSH
228228+ // +kubebuilder:default="LoadBalancer"
229229+ ServiceType corev1.ServiceType `json:"serviceType,omitempty"`
230230+231231+ // LoadBalancerIP is the static IP for LoadBalancer type services
232232+ LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
233233+234234+ // NodePort is the port to use when ServiceType is NodePort
235235+ NodePort int32 `json:"nodePort,omitempty"`
236236+237237+ // Annotations to add to the SSH Service
238238+ Annotations map[string]string `json:"annotations,omitempty"`
239239+}
240240+241241+// KnotStatus defines the observed state of Knot
242242+type KnotStatus struct {
243243+ // Phase represents the current phase of the Knot deployment
244244+ // +kubebuilder:validation:Enum=Pending;Running;Failed;Unknown
245245+ Phase string `json:"phase,omitempty"`
246246+247247+ // Conditions represent the latest available observations
248248+ Conditions []metav1.Condition `json:"conditions,omitempty"`
249249+250250+ // ReadyReplicas is the number of ready replicas
251251+ ReadyReplicas int32 `json:"readyReplicas,omitempty"`
252252+253253+ // AvailableReplicas is the number of available replicas
254254+ AvailableReplicas int32 `json:"availableReplicas,omitempty"`
255255+256256+ // URL is the external URL of the Knot server
257257+ URL string `json:"url,omitempty"`
258258+259259+ // SSHURL is the SSH URL for git operations
260260+ SSHURL string `json:"sshURL,omitempty"`
261261+262262+ // ObservedGeneration is the most recent generation observed
263263+ ObservedGeneration int64 `json:"observedGeneration,omitempty"`
264264+}
265265+266266+// +kubebuilder:object:root=true
267267+// +kubebuilder:subresource:status
268268+// +kubebuilder:resource:shortName=kt
269269+// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase"
270270+// +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.url"
271271+// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas"
272272+// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
273273+274274+// Knot is the Schema for the knots API
275275+type Knot struct {
276276+ metav1.TypeMeta `json:",inline"`
277277+ metav1.ObjectMeta `json:"metadata,omitempty"`
278278+279279+ Spec KnotSpec `json:"spec,omitempty"`
280280+ Status KnotStatus `json:"status,omitempty"`
281281+}
282282+283283+// +kubebuilder:object:root=true
284284+285285+// KnotList contains a list of Knot
286286+type KnotList struct {
287287+ metav1.TypeMeta `json:",inline"`
288288+ metav1.ListMeta `json:"metadata,omitempty"`
289289+ Items []Knot `json:"items"`
290290+}
291291+292292+func init() {
293293+ SchemeBuilder.Register(&Knot{}, &KnotList{})
294294+}
+316
api/v1alpha1/zz_generated.deepcopy.go
···11+//go:build !ignore_autogenerated
22+33+// Code generated by controller-gen. DO NOT EDIT.
44+55+package v1alpha1
66+77+import (
88+ "k8s.io/api/core/v1"
99+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010+ runtime "k8s.io/apimachinery/pkg/runtime"
1111+)
1212+1313+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
1414+func (in *Knot) DeepCopyInto(out *Knot) {
1515+ *out = *in
1616+ out.TypeMeta = in.TypeMeta
1717+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
1818+ in.Spec.DeepCopyInto(&out.Spec)
1919+ in.Status.DeepCopyInto(&out.Status)
2020+}
2121+2222+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Knot.
2323+func (in *Knot) DeepCopy() *Knot {
2424+ if in == nil {
2525+ return nil
2626+ }
2727+ out := new(Knot)
2828+ in.DeepCopyInto(out)
2929+ return out
3030+}
3131+3232+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
3333+func (in *Knot) DeepCopyObject() runtime.Object {
3434+ if c := in.DeepCopy(); c != nil {
3535+ return c
3636+ }
3737+ return nil
3838+}
3939+4040+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
4141+func (in *KnotIngressSpec) DeepCopyInto(out *KnotIngressSpec) {
4242+ *out = *in
4343+ if in.Annotations != nil {
4444+ in, out := &in.Annotations, &out.Annotations
4545+ *out = make(map[string]string, len(*in))
4646+ for key, val := range *in {
4747+ (*out)[key] = val
4848+ }
4949+ }
5050+ if in.TLS != nil {
5151+ in, out := &in.TLS, &out.TLS
5252+ *out = new(KnotIngressTLSSpec)
5353+ **out = **in
5454+ }
5555+}
5656+5757+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotIngressSpec.
5858+func (in *KnotIngressSpec) DeepCopy() *KnotIngressSpec {
5959+ if in == nil {
6060+ return nil
6161+ }
6262+ out := new(KnotIngressSpec)
6363+ in.DeepCopyInto(out)
6464+ return out
6565+}
6666+6767+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
6868+func (in *KnotIngressTLSSpec) DeepCopyInto(out *KnotIngressTLSSpec) {
6969+ *out = *in
7070+}
7171+7272+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotIngressTLSSpec.
7373+func (in *KnotIngressTLSSpec) DeepCopy() *KnotIngressTLSSpec {
7474+ if in == nil {
7575+ return nil
7676+ }
7777+ out := new(KnotIngressTLSSpec)
7878+ in.DeepCopyInto(out)
7979+ return out
8080+}
8181+8282+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
8383+func (in *KnotList) DeepCopyInto(out *KnotList) {
8484+ *out = *in
8585+ out.TypeMeta = in.TypeMeta
8686+ in.ListMeta.DeepCopyInto(&out.ListMeta)
8787+ if in.Items != nil {
8888+ in, out := &in.Items, &out.Items
8989+ *out = make([]Knot, len(*in))
9090+ for i := range *in {
9191+ (*in)[i].DeepCopyInto(&(*out)[i])
9292+ }
9393+ }
9494+}
9595+9696+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotList.
9797+func (in *KnotList) DeepCopy() *KnotList {
9898+ if in == nil {
9999+ return nil
100100+ }
101101+ out := new(KnotList)
102102+ in.DeepCopyInto(out)
103103+ return out
104104+}
105105+106106+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
107107+func (in *KnotList) DeepCopyObject() runtime.Object {
108108+ if c := in.DeepCopy(); c != nil {
109109+ return c
110110+ }
111111+ return nil
112112+}
113113+114114+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
115115+func (in *KnotOpenShiftSpec) DeepCopyInto(out *KnotOpenShiftSpec) {
116116+ *out = *in
117117+ if in.Route != nil {
118118+ in, out := &in.Route, &out.Route
119119+ *out = new(KnotRouteSpec)
120120+ (*in).DeepCopyInto(*out)
121121+ }
122122+ if in.SCC != nil {
123123+ in, out := &in.SCC, &out.SCC
124124+ *out = new(KnotSCCSpec)
125125+ (*in).DeepCopyInto(*out)
126126+ }
127127+}
128128+129129+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotOpenShiftSpec.
130130+func (in *KnotOpenShiftSpec) DeepCopy() *KnotOpenShiftSpec {
131131+ if in == nil {
132132+ return nil
133133+ }
134134+ out := new(KnotOpenShiftSpec)
135135+ in.DeepCopyInto(out)
136136+ return out
137137+}
138138+139139+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
140140+func (in *KnotRouteSpec) DeepCopyInto(out *KnotRouteSpec) {
141141+ *out = *in
142142+ if in.Annotations != nil {
143143+ in, out := &in.Annotations, &out.Annotations
144144+ *out = make(map[string]string, len(*in))
145145+ for key, val := range *in {
146146+ (*out)[key] = val
147147+ }
148148+ }
149149+ if in.TLS != nil {
150150+ in, out := &in.TLS, &out.TLS
151151+ *out = new(KnotRouteTLSSpec)
152152+ **out = **in
153153+ }
154154+}
155155+156156+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotRouteSpec.
157157+func (in *KnotRouteSpec) DeepCopy() *KnotRouteSpec {
158158+ if in == nil {
159159+ return nil
160160+ }
161161+ out := new(KnotRouteSpec)
162162+ in.DeepCopyInto(out)
163163+ return out
164164+}
165165+166166+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
167167+func (in *KnotRouteTLSSpec) DeepCopyInto(out *KnotRouteTLSSpec) {
168168+ *out = *in
169169+}
170170+171171+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotRouteTLSSpec.
172172+func (in *KnotRouteTLSSpec) DeepCopy() *KnotRouteTLSSpec {
173173+ if in == nil {
174174+ return nil
175175+ }
176176+ out := new(KnotRouteTLSSpec)
177177+ in.DeepCopyInto(out)
178178+ return out
179179+}
180180+181181+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
182182+func (in *KnotSCCSpec) DeepCopyInto(out *KnotSCCSpec) {
183183+ *out = *in
184184+ if in.Volumes != nil {
185185+ in, out := &in.Volumes, &out.Volumes
186186+ *out = make([]string, len(*in))
187187+ copy(*out, *in)
188188+ }
189189+}
190190+191191+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotSCCSpec.
192192+func (in *KnotSCCSpec) DeepCopy() *KnotSCCSpec {
193193+ if in == nil {
194194+ return nil
195195+ }
196196+ out := new(KnotSCCSpec)
197197+ in.DeepCopyInto(out)
198198+ return out
199199+}
200200+201201+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
202202+func (in *KnotSSHSpec) DeepCopyInto(out *KnotSSHSpec) {
203203+ *out = *in
204204+ if in.Annotations != nil {
205205+ in, out := &in.Annotations, &out.Annotations
206206+ *out = make(map[string]string, len(*in))
207207+ for key, val := range *in {
208208+ (*out)[key] = val
209209+ }
210210+ }
211211+}
212212+213213+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotSSHSpec.
214214+func (in *KnotSSHSpec) DeepCopy() *KnotSSHSpec {
215215+ if in == nil {
216216+ return nil
217217+ }
218218+ out := new(KnotSSHSpec)
219219+ in.DeepCopyInto(out)
220220+ return out
221221+}
222222+223223+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
224224+func (in *KnotSpec) DeepCopyInto(out *KnotSpec) {
225225+ *out = *in
226226+ out.Storage = in.Storage
227227+ in.Resources.DeepCopyInto(&out.Resources)
228228+ if in.NodeSelector != nil {
229229+ in, out := &in.NodeSelector, &out.NodeSelector
230230+ *out = make(map[string]string, len(*in))
231231+ for key, val := range *in {
232232+ (*out)[key] = val
233233+ }
234234+ }
235235+ if in.Tolerations != nil {
236236+ in, out := &in.Tolerations, &out.Tolerations
237237+ *out = make([]v1.Toleration, len(*in))
238238+ for i := range *in {
239239+ (*in)[i].DeepCopyInto(&(*out)[i])
240240+ }
241241+ }
242242+ if in.Affinity != nil {
243243+ in, out := &in.Affinity, &out.Affinity
244244+ *out = new(v1.Affinity)
245245+ (*in).DeepCopyInto(*out)
246246+ }
247247+ if in.Ingress != nil {
248248+ in, out := &in.Ingress, &out.Ingress
249249+ *out = new(KnotIngressSpec)
250250+ (*in).DeepCopyInto(*out)
251251+ }
252252+ if in.OpenShift != nil {
253253+ in, out := &in.OpenShift, &out.OpenShift
254254+ *out = new(KnotOpenShiftSpec)
255255+ (*in).DeepCopyInto(*out)
256256+ }
257257+ if in.SSH != nil {
258258+ in, out := &in.SSH, &out.SSH
259259+ *out = new(KnotSSHSpec)
260260+ (*in).DeepCopyInto(*out)
261261+ }
262262+ if in.ExtraEnv != nil {
263263+ in, out := &in.ExtraEnv, &out.ExtraEnv
264264+ *out = make([]v1.EnvVar, len(*in))
265265+ for i := range *in {
266266+ (*in)[i].DeepCopyInto(&(*out)[i])
267267+ }
268268+ }
269269+}
270270+271271+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotSpec.
272272+func (in *KnotSpec) DeepCopy() *KnotSpec {
273273+ if in == nil {
274274+ return nil
275275+ }
276276+ out := new(KnotSpec)
277277+ in.DeepCopyInto(out)
278278+ return out
279279+}
280280+281281+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
282282+func (in *KnotStatus) DeepCopyInto(out *KnotStatus) {
283283+ *out = *in
284284+ if in.Conditions != nil {
285285+ in, out := &in.Conditions, &out.Conditions
286286+ *out = make([]metav1.Condition, len(*in))
287287+ for i := range *in {
288288+ (*in)[i].DeepCopyInto(&(*out)[i])
289289+ }
290290+ }
291291+}
292292+293293+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotStatus.
294294+func (in *KnotStatus) DeepCopy() *KnotStatus {
295295+ if in == nil {
296296+ return nil
297297+ }
298298+ out := new(KnotStatus)
299299+ in.DeepCopyInto(out)
300300+ return out
301301+}
302302+303303+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
304304+func (in *KnotStorageSpec) DeepCopyInto(out *KnotStorageSpec) {
305305+ *out = *in
306306+}
307307+308308+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnotStorageSpec.
309309+func (in *KnotStorageSpec) DeepCopy() *KnotStorageSpec {
310310+ if in == nil {
311311+ return nil
312312+ }
313313+ out := new(KnotStorageSpec)
314314+ in.DeepCopyInto(out)
315315+ return out
316316+}
+96
cmd/main.go
···11+package main
22+33+import (
44+ "flag"
55+ "os"
66+77+ "k8s.io/apimachinery/pkg/runtime"
88+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
99+ clientgoscheme "k8s.io/client-go/kubernetes/scheme"
1010+ ctrl "sigs.k8s.io/controller-runtime"
1111+ "sigs.k8s.io/controller-runtime/pkg/healthz"
1212+ "sigs.k8s.io/controller-runtime/pkg/log/zap"
1313+ metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
1414+1515+ tangledv1alpha1 "github.com/josie/knot-operator/api/v1alpha1"
1616+ "github.com/josie/knot-operator/internal/controller"
1717+)
1818+1919+var (
2020+ scheme = runtime.NewScheme()
2121+ setupLog = ctrl.Log.WithName("setup")
2222+)
2323+2424+func init() {
2525+ utilruntime.Must(clientgoscheme.AddToScheme(scheme))
2626+ utilruntime.Must(tangledv1alpha1.AddToScheme(scheme))
2727+}
2828+2929+func main() {
3030+ var metricsAddr string
3131+ var enableLeaderElection bool
3232+ var probeAddr string
3333+3434+ flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
3535+ flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
3636+ flag.BoolVar(&enableLeaderElection, "leader-elect", false,
3737+ "Enable leader election for controller manager. "+
3838+ "Enabling this will ensure there is only one active controller manager.")
3939+4040+ opts := zap.Options{
4141+ Development: true,
4242+ }
4343+ opts.BindFlags(flag.CommandLine)
4444+ flag.Parse()
4545+4646+ ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
4747+4848+ mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
4949+ Scheme: scheme,
5050+ Metrics: metricsserver.Options{
5151+ BindAddress: metricsAddr,
5252+ },
5353+ HealthProbeBindAddress: probeAddr,
5454+ LeaderElection: enableLeaderElection,
5555+ LeaderElectionID: "knot-operator.tangled.org",
5656+ })
5757+ if err != nil {
5858+ setupLog.Error(err, "unable to start manager")
5959+ os.Exit(1)
6060+ }
6161+6262+ ctx := ctrl.SetupSignalHandler()
6363+6464+ reconciler := &controller.KnotReconciler{
6565+ Client: mgr.GetClient(),
6666+ Scheme: mgr.GetScheme(),
6767+ }
6868+6969+ reconciler.IsOpenShift = reconciler.DetectOpenShift(ctx)
7070+7171+ if reconciler.IsOpenShift {
7272+ setupLog.Info("OpenShift detected, enabling Route and SCC support")
7373+ } else {
7474+ setupLog.Info("Running on standard Kubernetes")
7575+ }
7676+7777+ if err = reconciler.SetupWithManager(mgr); err != nil {
7878+ setupLog.Error(err, "unable to create controller", "controller", "Knot")
7979+ os.Exit(1)
8080+ }
8181+8282+ if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
8383+ setupLog.Error(err, "unable to set up health check")
8484+ os.Exit(1)
8585+ }
8686+ if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
8787+ setupLog.Error(err, "unable to set up ready check")
8888+ os.Exit(1)
8989+ }
9090+9191+ setupLog.Info("starting manager")
9292+ if err := mgr.Start(ctx); err != nil {
9393+ setupLog.Error(err, "problem running manager")
9494+ os.Exit(1)
9595+ }
9696+}
+1552
config/crd/_knots.yaml
···11+---
22+apiVersion: apiextensions.k8s.io/v1
33+kind: CustomResourceDefinition
44+metadata:
55+ annotations:
66+ controller-gen.kubebuilder.io/version: v0.20.0
77+ name: knots.
88+spec:
99+ group: ""
1010+ names:
1111+ kind: Knot
1212+ listKind: KnotList
1313+ plural: knots
1414+ shortNames:
1515+ - kt
1616+ singular: knot
1717+ scope: Namespaced
1818+ versions:
1919+ - additionalPrinterColumns:
2020+ - jsonPath: .status.phase
2121+ name: Phase
2222+ type: string
2323+ - jsonPath: .status.url
2424+ name: URL
2525+ type: string
2626+ - jsonPath: .status.readyReplicas
2727+ name: Ready
2828+ type: integer
2929+ - jsonPath: .metadata.creationTimestamp
3030+ name: Age
3131+ type: date
3232+ name: ""
3333+ schema:
3434+ openAPIV3Schema:
3535+ description: Knot is the Schema for the knots API
3636+ properties:
3737+ apiVersion:
3838+ description: |-
3939+ APIVersion defines the versioned schema of this representation of an object.
4040+ Servers should convert recognized schemas to the latest internal value, and
4141+ may reject unrecognized values.
4242+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
4343+ type: string
4444+ kind:
4545+ description: |-
4646+ Kind is a string value representing the REST resource this object represents.
4747+ Servers may infer this from the endpoint the client submits requests to.
4848+ Cannot be updated.
4949+ In CamelCase.
5050+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
5151+ type: string
5252+ metadata:
5353+ type: object
5454+ spec:
5555+ description: KnotSpec defines the desired state of Knot
5656+ properties:
5757+ affinity:
5858+ description: Affinity rules for pod scheduling
5959+ properties:
6060+ nodeAffinity:
6161+ description: Describes node affinity scheduling rules for the
6262+ pod.
6363+ properties:
6464+ preferredDuringSchedulingIgnoredDuringExecution:
6565+ description: |-
6666+ The scheduler will prefer to schedule pods to nodes that satisfy
6767+ the affinity expressions specified by this field, but it may choose
6868+ a node that violates one or more of the expressions. The node that is
6969+ most preferred is the one with the greatest sum of weights, i.e.
7070+ for each node that meets all of the scheduling requirements (resource
7171+ request, requiredDuringScheduling affinity expressions, etc.),
7272+ compute a sum by iterating through the elements of this field and adding
7373+ "weight" to the sum if the node matches the corresponding matchExpressions; the
7474+ node(s) with the highest sum are the most preferred.
7575+ items:
7676+ description: |-
7777+ An empty preferred scheduling term matches all objects with implicit weight 0
7878+ (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
7979+ properties:
8080+ preference:
8181+ description: A node selector term, associated with the
8282+ corresponding weight.
8383+ properties:
8484+ matchExpressions:
8585+ description: A list of node selector requirements
8686+ by node's labels.
8787+ items:
8888+ description: |-
8989+ A node selector requirement is a selector that contains values, a key, and an operator
9090+ that relates the key and values.
9191+ properties:
9292+ key:
9393+ description: The label key that the selector
9494+ applies to.
9595+ type: string
9696+ operator:
9797+ description: |-
9898+ Represents a key's relationship to a set of values.
9999+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
100100+ type: string
101101+ values:
102102+ description: |-
103103+ An array of string values. If the operator is In or NotIn,
104104+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
105105+ the values array must be empty. If the operator is Gt or Lt, the values
106106+ array must have a single element, which will be interpreted as an integer.
107107+ This array is replaced during a strategic merge patch.
108108+ items:
109109+ type: string
110110+ type: array
111111+ x-kubernetes-list-type: atomic
112112+ required:
113113+ - key
114114+ - operator
115115+ type: object
116116+ type: array
117117+ x-kubernetes-list-type: atomic
118118+ matchFields:
119119+ description: A list of node selector requirements
120120+ by node's fields.
121121+ items:
122122+ description: |-
123123+ A node selector requirement is a selector that contains values, a key, and an operator
124124+ that relates the key and values.
125125+ properties:
126126+ key:
127127+ description: The label key that the selector
128128+ applies to.
129129+ type: string
130130+ operator:
131131+ description: |-
132132+ Represents a key's relationship to a set of values.
133133+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
134134+ type: string
135135+ values:
136136+ description: |-
137137+ An array of string values. If the operator is In or NotIn,
138138+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
139139+ the values array must be empty. If the operator is Gt or Lt, the values
140140+ array must have a single element, which will be interpreted as an integer.
141141+ This array is replaced during a strategic merge patch.
142142+ items:
143143+ type: string
144144+ type: array
145145+ x-kubernetes-list-type: atomic
146146+ required:
147147+ - key
148148+ - operator
149149+ type: object
150150+ type: array
151151+ x-kubernetes-list-type: atomic
152152+ type: object
153153+ x-kubernetes-map-type: atomic
154154+ weight:
155155+ description: Weight associated with matching the corresponding
156156+ nodeSelectorTerm, in the range 1-100.
157157+ format: int32
158158+ type: integer
159159+ required:
160160+ - preference
161161+ - weight
162162+ type: object
163163+ type: array
164164+ x-kubernetes-list-type: atomic
165165+ requiredDuringSchedulingIgnoredDuringExecution:
166166+ description: |-
167167+ If the affinity requirements specified by this field are not met at
168168+ scheduling time, the pod will not be scheduled onto the node.
169169+ If the affinity requirements specified by this field cease to be met
170170+ at some point during pod execution (e.g. due to an update), the system
171171+ may or may not try to eventually evict the pod from its node.
172172+ properties:
173173+ nodeSelectorTerms:
174174+ description: Required. A list of node selector terms.
175175+ The terms are ORed.
176176+ items:
177177+ description: |-
178178+ A null or empty node selector term matches no objects. The requirements of
179179+ them are ANDed.
180180+ The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
181181+ properties:
182182+ matchExpressions:
183183+ description: A list of node selector requirements
184184+ by node's labels.
185185+ items:
186186+ description: |-
187187+ A node selector requirement is a selector that contains values, a key, and an operator
188188+ that relates the key and values.
189189+ properties:
190190+ key:
191191+ description: The label key that the selector
192192+ applies to.
193193+ type: string
194194+ operator:
195195+ description: |-
196196+ Represents a key's relationship to a set of values.
197197+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
198198+ type: string
199199+ values:
200200+ description: |-
201201+ An array of string values. If the operator is In or NotIn,
202202+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
203203+ the values array must be empty. If the operator is Gt or Lt, the values
204204+ array must have a single element, which will be interpreted as an integer.
205205+ This array is replaced during a strategic merge patch.
206206+ items:
207207+ type: string
208208+ type: array
209209+ x-kubernetes-list-type: atomic
210210+ required:
211211+ - key
212212+ - operator
213213+ type: object
214214+ type: array
215215+ x-kubernetes-list-type: atomic
216216+ matchFields:
217217+ description: A list of node selector requirements
218218+ by node's fields.
219219+ items:
220220+ description: |-
221221+ A node selector requirement is a selector that contains values, a key, and an operator
222222+ that relates the key and values.
223223+ properties:
224224+ key:
225225+ description: The label key that the selector
226226+ applies to.
227227+ type: string
228228+ operator:
229229+ description: |-
230230+ Represents a key's relationship to a set of values.
231231+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
232232+ type: string
233233+ values:
234234+ description: |-
235235+ An array of string values. If the operator is In or NotIn,
236236+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
237237+ the values array must be empty. If the operator is Gt or Lt, the values
238238+ array must have a single element, which will be interpreted as an integer.
239239+ This array is replaced during a strategic merge patch.
240240+ items:
241241+ type: string
242242+ type: array
243243+ x-kubernetes-list-type: atomic
244244+ required:
245245+ - key
246246+ - operator
247247+ type: object
248248+ type: array
249249+ x-kubernetes-list-type: atomic
250250+ type: object
251251+ x-kubernetes-map-type: atomic
252252+ type: array
253253+ x-kubernetes-list-type: atomic
254254+ required:
255255+ - nodeSelectorTerms
256256+ type: object
257257+ x-kubernetes-map-type: atomic
258258+ type: object
259259+ podAffinity:
260260+ description: Describes pod affinity scheduling rules (e.g. co-locate
261261+ this pod in the same node, zone, etc. as some other pod(s)).
262262+ properties:
263263+ preferredDuringSchedulingIgnoredDuringExecution:
264264+ description: |-
265265+ The scheduler will prefer to schedule pods to nodes that satisfy
266266+ the affinity expressions specified by this field, but it may choose
267267+ a node that violates one or more of the expressions. The node that is
268268+ most preferred is the one with the greatest sum of weights, i.e.
269269+ for each node that meets all of the scheduling requirements (resource
270270+ request, requiredDuringScheduling affinity expressions, etc.),
271271+ compute a sum by iterating through the elements of this field and adding
272272+ "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
273273+ node(s) with the highest sum are the most preferred.
274274+ items:
275275+ description: The weights of all of the matched WeightedPodAffinityTerm
276276+ fields are added per-node to find the most preferred node(s)
277277+ properties:
278278+ podAffinityTerm:
279279+ description: Required. A pod affinity term, associated
280280+ with the corresponding weight.
281281+ properties:
282282+ labelSelector:
283283+ description: |-
284284+ A label query over a set of resources, in this case pods.
285285+ If it's null, this PodAffinityTerm matches with no Pods.
286286+ properties:
287287+ matchExpressions:
288288+ description: matchExpressions is a list of label
289289+ selector requirements. The requirements are
290290+ ANDed.
291291+ items:
292292+ description: |-
293293+ A label selector requirement is a selector that contains values, a key, and an operator that
294294+ relates the key and values.
295295+ properties:
296296+ key:
297297+ description: key is the label key that
298298+ the selector applies to.
299299+ type: string
300300+ operator:
301301+ description: |-
302302+ operator represents a key's relationship to a set of values.
303303+ Valid operators are In, NotIn, Exists and DoesNotExist.
304304+ type: string
305305+ values:
306306+ description: |-
307307+ values is an array of string values. If the operator is In or NotIn,
308308+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
309309+ the values array must be empty. This array is replaced during a strategic
310310+ merge patch.
311311+ items:
312312+ type: string
313313+ type: array
314314+ x-kubernetes-list-type: atomic
315315+ required:
316316+ - key
317317+ - operator
318318+ type: object
319319+ type: array
320320+ x-kubernetes-list-type: atomic
321321+ matchLabels:
322322+ additionalProperties:
323323+ type: string
324324+ description: |-
325325+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
326326+ map is equivalent to an element of matchExpressions, whose key field is "key", the
327327+ operator is "In", and the values array contains only "value". The requirements are ANDed.
328328+ type: object
329329+ type: object
330330+ x-kubernetes-map-type: atomic
331331+ matchLabelKeys:
332332+ description: |-
333333+ MatchLabelKeys is a set of pod label keys to select which pods will
334334+ be taken into consideration. The keys are used to lookup values from the
335335+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
336336+ to select the group of existing pods which pods will be taken into consideration
337337+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
338338+ pod labels will be ignored. The default value is empty.
339339+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
340340+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
341341+ items:
342342+ type: string
343343+ type: array
344344+ x-kubernetes-list-type: atomic
345345+ mismatchLabelKeys:
346346+ description: |-
347347+ MismatchLabelKeys is a set of pod label keys to select which pods will
348348+ be taken into consideration. The keys are used to lookup values from the
349349+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
350350+ to select the group of existing pods which pods will be taken into consideration
351351+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
352352+ pod labels will be ignored. The default value is empty.
353353+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
354354+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
355355+ items:
356356+ type: string
357357+ type: array
358358+ x-kubernetes-list-type: atomic
359359+ namespaceSelector:
360360+ description: |-
361361+ A label query over the set of namespaces that the term applies to.
362362+ The term is applied to the union of the namespaces selected by this field
363363+ and the ones listed in the namespaces field.
364364+ null selector and null or empty namespaces list means "this pod's namespace".
365365+ An empty selector ({}) matches all namespaces.
366366+ properties:
367367+ matchExpressions:
368368+ description: matchExpressions is a list of label
369369+ selector requirements. The requirements are
370370+ ANDed.
371371+ items:
372372+ description: |-
373373+ A label selector requirement is a selector that contains values, a key, and an operator that
374374+ relates the key and values.
375375+ properties:
376376+ key:
377377+ description: key is the label key that
378378+ the selector applies to.
379379+ type: string
380380+ operator:
381381+ description: |-
382382+ operator represents a key's relationship to a set of values.
383383+ Valid operators are In, NotIn, Exists and DoesNotExist.
384384+ type: string
385385+ values:
386386+ description: |-
387387+ values is an array of string values. If the operator is In or NotIn,
388388+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
389389+ the values array must be empty. This array is replaced during a strategic
390390+ merge patch.
391391+ items:
392392+ type: string
393393+ type: array
394394+ x-kubernetes-list-type: atomic
395395+ required:
396396+ - key
397397+ - operator
398398+ type: object
399399+ type: array
400400+ x-kubernetes-list-type: atomic
401401+ matchLabels:
402402+ additionalProperties:
403403+ type: string
404404+ description: |-
405405+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
406406+ map is equivalent to an element of matchExpressions, whose key field is "key", the
407407+ operator is "In", and the values array contains only "value". The requirements are ANDed.
408408+ type: object
409409+ type: object
410410+ x-kubernetes-map-type: atomic
411411+ namespaces:
412412+ description: |-
413413+ namespaces specifies a static list of namespace names that the term applies to.
414414+ The term is applied to the union of the namespaces listed in this field
415415+ and the ones selected by namespaceSelector.
416416+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
417417+ items:
418418+ type: string
419419+ type: array
420420+ x-kubernetes-list-type: atomic
421421+ topologyKey:
422422+ description: |-
423423+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
424424+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
425425+ whose value of the label with key topologyKey matches that of any node on which any of the
426426+ selected pods is running.
427427+ Empty topologyKey is not allowed.
428428+ type: string
429429+ required:
430430+ - topologyKey
431431+ type: object
432432+ weight:
433433+ description: |-
434434+ weight associated with matching the corresponding podAffinityTerm,
435435+ in the range 1-100.
436436+ format: int32
437437+ type: integer
438438+ required:
439439+ - podAffinityTerm
440440+ - weight
441441+ type: object
442442+ type: array
443443+ x-kubernetes-list-type: atomic
444444+ requiredDuringSchedulingIgnoredDuringExecution:
445445+ description: |-
446446+ If the affinity requirements specified by this field are not met at
447447+ scheduling time, the pod will not be scheduled onto the node.
448448+ If the affinity requirements specified by this field cease to be met
449449+ at some point during pod execution (e.g. due to a pod label update), the
450450+ system may or may not try to eventually evict the pod from its node.
451451+ When there are multiple elements, the lists of nodes corresponding to each
452452+ podAffinityTerm are intersected, i.e. all terms must be satisfied.
453453+ items:
454454+ description: |-
455455+ Defines a set of pods (namely those matching the labelSelector
456456+ relative to the given namespace(s)) that this pod should be
457457+ co-located (affinity) or not co-located (anti-affinity) with,
458458+ where co-located is defined as running on a node whose value of
459459+ the label with key <topologyKey> matches that of any node on which
460460+ a pod of the set of pods is running
461461+ properties:
462462+ labelSelector:
463463+ description: |-
464464+ A label query over a set of resources, in this case pods.
465465+ If it's null, this PodAffinityTerm matches with no Pods.
466466+ properties:
467467+ matchExpressions:
468468+ description: matchExpressions is a list of label
469469+ selector requirements. The requirements are ANDed.
470470+ items:
471471+ description: |-
472472+ A label selector requirement is a selector that contains values, a key, and an operator that
473473+ relates the key and values.
474474+ properties:
475475+ key:
476476+ description: key is the label key that the
477477+ selector applies to.
478478+ type: string
479479+ operator:
480480+ description: |-
481481+ operator represents a key's relationship to a set of values.
482482+ Valid operators are In, NotIn, Exists and DoesNotExist.
483483+ type: string
484484+ values:
485485+ description: |-
486486+ values is an array of string values. If the operator is In or NotIn,
487487+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
488488+ the values array must be empty. This array is replaced during a strategic
489489+ merge patch.
490490+ items:
491491+ type: string
492492+ type: array
493493+ x-kubernetes-list-type: atomic
494494+ required:
495495+ - key
496496+ - operator
497497+ type: object
498498+ type: array
499499+ x-kubernetes-list-type: atomic
500500+ matchLabels:
501501+ additionalProperties:
502502+ type: string
503503+ description: |-
504504+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
505505+ map is equivalent to an element of matchExpressions, whose key field is "key", the
506506+ operator is "In", and the values array contains only "value". The requirements are ANDed.
507507+ type: object
508508+ type: object
509509+ x-kubernetes-map-type: atomic
510510+ matchLabelKeys:
511511+ description: |-
512512+ MatchLabelKeys is a set of pod label keys to select which pods will
513513+ be taken into consideration. The keys are used to lookup values from the
514514+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
515515+ to select the group of existing pods which pods will be taken into consideration
516516+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
517517+ pod labels will be ignored. The default value is empty.
518518+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
519519+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
520520+ items:
521521+ type: string
522522+ type: array
523523+ x-kubernetes-list-type: atomic
524524+ mismatchLabelKeys:
525525+ description: |-
526526+ MismatchLabelKeys is a set of pod label keys to select which pods will
527527+ be taken into consideration. The keys are used to lookup values from the
528528+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
529529+ to select the group of existing pods which pods will be taken into consideration
530530+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
531531+ pod labels will be ignored. The default value is empty.
532532+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
533533+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
534534+ items:
535535+ type: string
536536+ type: array
537537+ x-kubernetes-list-type: atomic
538538+ namespaceSelector:
539539+ description: |-
540540+ A label query over the set of namespaces that the term applies to.
541541+ The term is applied to the union of the namespaces selected by this field
542542+ and the ones listed in the namespaces field.
543543+ null selector and null or empty namespaces list means "this pod's namespace".
544544+ An empty selector ({}) matches all namespaces.
545545+ properties:
546546+ matchExpressions:
547547+ description: matchExpressions is a list of label
548548+ selector requirements. The requirements are ANDed.
549549+ items:
550550+ description: |-
551551+ A label selector requirement is a selector that contains values, a key, and an operator that
552552+ relates the key and values.
553553+ properties:
554554+ key:
555555+ description: key is the label key that the
556556+ selector applies to.
557557+ type: string
558558+ operator:
559559+ description: |-
560560+ operator represents a key's relationship to a set of values.
561561+ Valid operators are In, NotIn, Exists and DoesNotExist.
562562+ type: string
563563+ values:
564564+ description: |-
565565+ values is an array of string values. If the operator is In or NotIn,
566566+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
567567+ the values array must be empty. This array is replaced during a strategic
568568+ merge patch.
569569+ items:
570570+ type: string
571571+ type: array
572572+ x-kubernetes-list-type: atomic
573573+ required:
574574+ - key
575575+ - operator
576576+ type: object
577577+ type: array
578578+ x-kubernetes-list-type: atomic
579579+ matchLabels:
580580+ additionalProperties:
581581+ type: string
582582+ description: |-
583583+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
584584+ map is equivalent to an element of matchExpressions, whose key field is "key", the
585585+ operator is "In", and the values array contains only "value". The requirements are ANDed.
586586+ type: object
587587+ type: object
588588+ x-kubernetes-map-type: atomic
589589+ namespaces:
590590+ description: |-
591591+ namespaces specifies a static list of namespace names that the term applies to.
592592+ The term is applied to the union of the namespaces listed in this field
593593+ and the ones selected by namespaceSelector.
594594+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
595595+ items:
596596+ type: string
597597+ type: array
598598+ x-kubernetes-list-type: atomic
599599+ topologyKey:
600600+ description: |-
601601+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
602602+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
603603+ whose value of the label with key topologyKey matches that of any node on which any of the
604604+ selected pods is running.
605605+ Empty topologyKey is not allowed.
606606+ type: string
607607+ required:
608608+ - topologyKey
609609+ type: object
610610+ type: array
611611+ x-kubernetes-list-type: atomic
612612+ type: object
613613+ podAntiAffinity:
614614+ description: Describes pod anti-affinity scheduling rules (e.g.
615615+ avoid putting this pod in the same node, zone, etc. as some
616616+ other pod(s)).
617617+ properties:
618618+ preferredDuringSchedulingIgnoredDuringExecution:
619619+ description: |-
620620+ The scheduler will prefer to schedule pods to nodes that satisfy
621621+ the anti-affinity expressions specified by this field, but it may choose
622622+ a node that violates one or more of the expressions. The node that is
623623+ most preferred is the one with the greatest sum of weights, i.e.
624624+ for each node that meets all of the scheduling requirements (resource
625625+ request, requiredDuringScheduling anti-affinity expressions, etc.),
626626+ compute a sum by iterating through the elements of this field and subtracting
627627+ "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
628628+ node(s) with the highest sum are the most preferred.
629629+ items:
630630+ description: The weights of all of the matched WeightedPodAffinityTerm
631631+ fields are added per-node to find the most preferred node(s)
632632+ properties:
633633+ podAffinityTerm:
634634+ description: Required. A pod affinity term, associated
635635+ with the corresponding weight.
636636+ properties:
637637+ labelSelector:
638638+ description: |-
639639+ A label query over a set of resources, in this case pods.
640640+ If it's null, this PodAffinityTerm matches with no Pods.
641641+ properties:
642642+ matchExpressions:
643643+ description: matchExpressions is a list of label
644644+ selector requirements. The requirements are
645645+ ANDed.
646646+ items:
647647+ description: |-
648648+ A label selector requirement is a selector that contains values, a key, and an operator that
649649+ relates the key and values.
650650+ properties:
651651+ key:
652652+ description: key is the label key that
653653+ the selector applies to.
654654+ type: string
655655+ operator:
656656+ description: |-
657657+ operator represents a key's relationship to a set of values.
658658+ Valid operators are In, NotIn, Exists and DoesNotExist.
659659+ type: string
660660+ values:
661661+ description: |-
662662+ values is an array of string values. If the operator is In or NotIn,
663663+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
664664+ the values array must be empty. This array is replaced during a strategic
665665+ merge patch.
666666+ items:
667667+ type: string
668668+ type: array
669669+ x-kubernetes-list-type: atomic
670670+ required:
671671+ - key
672672+ - operator
673673+ type: object
674674+ type: array
675675+ x-kubernetes-list-type: atomic
676676+ matchLabels:
677677+ additionalProperties:
678678+ type: string
679679+ description: |-
680680+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
681681+ map is equivalent to an element of matchExpressions, whose key field is "key", the
682682+ operator is "In", and the values array contains only "value". The requirements are ANDed.
683683+ type: object
684684+ type: object
685685+ x-kubernetes-map-type: atomic
686686+ matchLabelKeys:
687687+ description: |-
688688+ MatchLabelKeys is a set of pod label keys to select which pods will
689689+ be taken into consideration. The keys are used to lookup values from the
690690+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
691691+ to select the group of existing pods which pods will be taken into consideration
692692+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
693693+ pod labels will be ignored. The default value is empty.
694694+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
695695+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
696696+ items:
697697+ type: string
698698+ type: array
699699+ x-kubernetes-list-type: atomic
700700+ mismatchLabelKeys:
701701+ description: |-
702702+ MismatchLabelKeys is a set of pod label keys to select which pods will
703703+ be taken into consideration. The keys are used to lookup values from the
704704+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
705705+ to select the group of existing pods which pods will be taken into consideration
706706+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
707707+ pod labels will be ignored. The default value is empty.
708708+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
709709+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
710710+ items:
711711+ type: string
712712+ type: array
713713+ x-kubernetes-list-type: atomic
714714+ namespaceSelector:
715715+ description: |-
716716+ A label query over the set of namespaces that the term applies to.
717717+ The term is applied to the union of the namespaces selected by this field
718718+ and the ones listed in the namespaces field.
719719+ null selector and null or empty namespaces list means "this pod's namespace".
720720+ An empty selector ({}) matches all namespaces.
721721+ properties:
722722+ matchExpressions:
723723+ description: matchExpressions is a list of label
724724+ selector requirements. The requirements are
725725+ ANDed.
726726+ items:
727727+ description: |-
728728+ A label selector requirement is a selector that contains values, a key, and an operator that
729729+ relates the key and values.
730730+ properties:
731731+ key:
732732+ description: key is the label key that
733733+ the selector applies to.
734734+ type: string
735735+ operator:
736736+ description: |-
737737+ operator represents a key's relationship to a set of values.
738738+ Valid operators are In, NotIn, Exists and DoesNotExist.
739739+ type: string
740740+ values:
741741+ description: |-
742742+ values is an array of string values. If the operator is In or NotIn,
743743+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
744744+ the values array must be empty. This array is replaced during a strategic
745745+ merge patch.
746746+ items:
747747+ type: string
748748+ type: array
749749+ x-kubernetes-list-type: atomic
750750+ required:
751751+ - key
752752+ - operator
753753+ type: object
754754+ type: array
755755+ x-kubernetes-list-type: atomic
756756+ matchLabels:
757757+ additionalProperties:
758758+ type: string
759759+ description: |-
760760+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
761761+ map is equivalent to an element of matchExpressions, whose key field is "key", the
762762+ operator is "In", and the values array contains only "value". The requirements are ANDed.
763763+ type: object
764764+ type: object
765765+ x-kubernetes-map-type: atomic
766766+ namespaces:
767767+ description: |-
768768+ namespaces specifies a static list of namespace names that the term applies to.
769769+ The term is applied to the union of the namespaces listed in this field
770770+ and the ones selected by namespaceSelector.
771771+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
772772+ items:
773773+ type: string
774774+ type: array
775775+ x-kubernetes-list-type: atomic
776776+ topologyKey:
777777+ description: |-
778778+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
779779+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
780780+ whose value of the label with key topologyKey matches that of any node on which any of the
781781+ selected pods is running.
782782+ Empty topologyKey is not allowed.
783783+ type: string
784784+ required:
785785+ - topologyKey
786786+ type: object
787787+ weight:
788788+ description: |-
789789+ weight associated with matching the corresponding podAffinityTerm,
790790+ in the range 1-100.
791791+ format: int32
792792+ type: integer
793793+ required:
794794+ - podAffinityTerm
795795+ - weight
796796+ type: object
797797+ type: array
798798+ x-kubernetes-list-type: atomic
799799+ requiredDuringSchedulingIgnoredDuringExecution:
800800+ description: |-
801801+ If the anti-affinity requirements specified by this field are not met at
802802+ scheduling time, the pod will not be scheduled onto the node.
803803+ If the anti-affinity requirements specified by this field cease to be met
804804+ at some point during pod execution (e.g. due to a pod label update), the
805805+ system may or may not try to eventually evict the pod from its node.
806806+ When there are multiple elements, the lists of nodes corresponding to each
807807+ podAffinityTerm are intersected, i.e. all terms must be satisfied.
808808+ items:
809809+ description: |-
810810+ Defines a set of pods (namely those matching the labelSelector
811811+ relative to the given namespace(s)) that this pod should be
812812+ co-located (affinity) or not co-located (anti-affinity) with,
813813+ where co-located is defined as running on a node whose value of
814814+ the label with key <topologyKey> matches that of any node on which
815815+ a pod of the set of pods is running
816816+ properties:
817817+ labelSelector:
818818+ description: |-
819819+ A label query over a set of resources, in this case pods.
820820+ If it's null, this PodAffinityTerm matches with no Pods.
821821+ properties:
822822+ matchExpressions:
823823+ description: matchExpressions is a list of label
824824+ selector requirements. The requirements are ANDed.
825825+ items:
826826+ description: |-
827827+ A label selector requirement is a selector that contains values, a key, and an operator that
828828+ relates the key and values.
829829+ properties:
830830+ key:
831831+ description: key is the label key that the
832832+ selector applies to.
833833+ type: string
834834+ operator:
835835+ description: |-
836836+ operator represents a key's relationship to a set of values.
837837+ Valid operators are In, NotIn, Exists and DoesNotExist.
838838+ type: string
839839+ values:
840840+ description: |-
841841+ values is an array of string values. If the operator is In or NotIn,
842842+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
843843+ the values array must be empty. This array is replaced during a strategic
844844+ merge patch.
845845+ items:
846846+ type: string
847847+ type: array
848848+ x-kubernetes-list-type: atomic
849849+ required:
850850+ - key
851851+ - operator
852852+ type: object
853853+ type: array
854854+ x-kubernetes-list-type: atomic
855855+ matchLabels:
856856+ additionalProperties:
857857+ type: string
858858+ description: |-
859859+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
860860+ map is equivalent to an element of matchExpressions, whose key field is "key", the
861861+ operator is "In", and the values array contains only "value". The requirements are ANDed.
862862+ type: object
863863+ type: object
864864+ x-kubernetes-map-type: atomic
865865+ matchLabelKeys:
866866+ description: |-
867867+ MatchLabelKeys is a set of pod label keys to select which pods will
868868+ be taken into consideration. The keys are used to lookup values from the
869869+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
870870+ to select the group of existing pods which pods will be taken into consideration
871871+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
872872+ pod labels will be ignored. The default value is empty.
873873+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
874874+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
875875+ items:
876876+ type: string
877877+ type: array
878878+ x-kubernetes-list-type: atomic
879879+ mismatchLabelKeys:
880880+ description: |-
881881+ MismatchLabelKeys is a set of pod label keys to select which pods will
882882+ be taken into consideration. The keys are used to lookup values from the
883883+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
884884+ to select the group of existing pods which pods will be taken into consideration
885885+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
886886+ pod labels will be ignored. The default value is empty.
887887+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
888888+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
889889+ items:
890890+ type: string
891891+ type: array
892892+ x-kubernetes-list-type: atomic
893893+ namespaceSelector:
894894+ description: |-
895895+ A label query over the set of namespaces that the term applies to.
896896+ The term is applied to the union of the namespaces selected by this field
897897+ and the ones listed in the namespaces field.
898898+ null selector and null or empty namespaces list means "this pod's namespace".
899899+ An empty selector ({}) matches all namespaces.
900900+ properties:
901901+ matchExpressions:
902902+ description: matchExpressions is a list of label
903903+ selector requirements. The requirements are ANDed.
904904+ items:
905905+ description: |-
906906+ A label selector requirement is a selector that contains values, a key, and an operator that
907907+ relates the key and values.
908908+ properties:
909909+ key:
910910+ description: key is the label key that the
911911+ selector applies to.
912912+ type: string
913913+ operator:
914914+ description: |-
915915+ operator represents a key's relationship to a set of values.
916916+ Valid operators are In, NotIn, Exists and DoesNotExist.
917917+ type: string
918918+ values:
919919+ description: |-
920920+ values is an array of string values. If the operator is In or NotIn,
921921+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
922922+ the values array must be empty. This array is replaced during a strategic
923923+ merge patch.
924924+ items:
925925+ type: string
926926+ type: array
927927+ x-kubernetes-list-type: atomic
928928+ required:
929929+ - key
930930+ - operator
931931+ type: object
932932+ type: array
933933+ x-kubernetes-list-type: atomic
934934+ matchLabels:
935935+ additionalProperties:
936936+ type: string
937937+ description: |-
938938+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
939939+ map is equivalent to an element of matchExpressions, whose key field is "key", the
940940+ operator is "In", and the values array contains only "value". The requirements are ANDed.
941941+ type: object
942942+ type: object
943943+ x-kubernetes-map-type: atomic
944944+ namespaces:
945945+ description: |-
946946+ namespaces specifies a static list of namespace names that the term applies to.
947947+ The term is applied to the union of the namespaces listed in this field
948948+ and the ones selected by namespaceSelector.
949949+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
950950+ items:
951951+ type: string
952952+ type: array
953953+ x-kubernetes-list-type: atomic
954954+ topologyKey:
955955+ description: |-
956956+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
957957+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
958958+ whose value of the label with key topologyKey matches that of any node on which any of the
959959+ selected pods is running.
960960+ Empty topologyKey is not allowed.
961961+ type: string
962962+ required:
963963+ - topologyKey
964964+ type: object
965965+ type: array
966966+ x-kubernetes-list-type: atomic
967967+ type: object
968968+ type: object
969969+ appviewEndpoint:
970970+ default: https://tangled.org
971971+ description: AppviewEndpoint is the appview endpoint URL
972972+ type: string
973973+ extraEnv:
974974+ description: ExtraEnv allows adding additional environment variables
975975+ items:
976976+ description: EnvVar represents an environment variable present in
977977+ a Container.
978978+ properties:
979979+ name:
980980+ description: |-
981981+ Name of the environment variable.
982982+ May consist of any printable ASCII characters except '='.
983983+ type: string
984984+ value:
985985+ description: |-
986986+ Variable references $(VAR_NAME) are expanded
987987+ using the previously defined environment variables in the container and
988988+ any service environment variables. If a variable cannot be resolved,
989989+ the reference in the input string will be unchanged. Double $$ are reduced
990990+ to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
991991+ "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
992992+ Escaped references will never be expanded, regardless of whether the variable
993993+ exists or not.
994994+ Defaults to "".
995995+ type: string
996996+ valueFrom:
997997+ description: Source for the environment variable's value. Cannot
998998+ be used if value is not empty.
999999+ properties:
10001000+ configMapKeyRef:
10011001+ description: Selects a key of a ConfigMap.
10021002+ properties:
10031003+ key:
10041004+ description: The key to select.
10051005+ type: string
10061006+ name:
10071007+ default: ""
10081008+ description: |-
10091009+ Name of the referent.
10101010+ This field is effectively required, but due to backwards compatibility is
10111011+ allowed to be empty. Instances of this type with an empty value here are
10121012+ almost certainly wrong.
10131013+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
10141014+ type: string
10151015+ optional:
10161016+ description: Specify whether the ConfigMap or its key
10171017+ must be defined
10181018+ type: boolean
10191019+ required:
10201020+ - key
10211021+ type: object
10221022+ x-kubernetes-map-type: atomic
10231023+ fieldRef:
10241024+ description: |-
10251025+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
10261026+ spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
10271027+ properties:
10281028+ apiVersion:
10291029+ description: Version of the schema the FieldPath is
10301030+ written in terms of, defaults to "v1".
10311031+ type: string
10321032+ fieldPath:
10331033+ description: Path of the field to select in the specified
10341034+ API version.
10351035+ type: string
10361036+ required:
10371037+ - fieldPath
10381038+ type: object
10391039+ x-kubernetes-map-type: atomic
10401040+ fileKeyRef:
10411041+ description: |-
10421042+ FileKeyRef selects a key of the env file.
10431043+ Requires the EnvFiles feature gate to be enabled.
10441044+ properties:
10451045+ key:
10461046+ description: |-
10471047+ The key within the env file. An invalid key will prevent the pod from starting.
10481048+ The keys defined within a source may consist of any printable ASCII characters except '='.
10491049+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
10501050+ type: string
10511051+ optional:
10521052+ default: false
10531053+ description: |-
10541054+ Specify whether the file or its key must be defined. If the file or key
10551055+ does not exist, then the env var is not published.
10561056+ If optional is set to true and the specified key does not exist,
10571057+ the environment variable will not be set in the Pod's containers.
10581058+10591059+ If optional is set to false and the specified key does not exist,
10601060+ an error will be returned during Pod creation.
10611061+ type: boolean
10621062+ path:
10631063+ description: |-
10641064+ The path within the volume from which to select the file.
10651065+ Must be relative and may not contain the '..' path or start with '..'.
10661066+ type: string
10671067+ volumeName:
10681068+ description: The name of the volume mount containing
10691069+ the env file.
10701070+ type: string
10711071+ required:
10721072+ - key
10731073+ - path
10741074+ - volumeName
10751075+ type: object
10761076+ x-kubernetes-map-type: atomic
10771077+ resourceFieldRef:
10781078+ description: |-
10791079+ Selects a resource of the container: only resources limits and requests
10801080+ (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
10811081+ properties:
10821082+ containerName:
10831083+ description: 'Container name: required for volumes,
10841084+ optional for env vars'
10851085+ type: string
10861086+ divisor:
10871087+ anyOf:
10881088+ - type: integer
10891089+ - type: string
10901090+ description: Specifies the output format of the exposed
10911091+ resources, defaults to "1"
10921092+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
10931093+ x-kubernetes-int-or-string: true
10941094+ resource:
10951095+ description: 'Required: resource to select'
10961096+ type: string
10971097+ required:
10981098+ - resource
10991099+ type: object
11001100+ x-kubernetes-map-type: atomic
11011101+ secretKeyRef:
11021102+ description: Selects a key of a secret in the pod's namespace
11031103+ properties:
11041104+ key:
11051105+ description: The key of the secret to select from. Must
11061106+ be a valid secret key.
11071107+ type: string
11081108+ name:
11091109+ default: ""
11101110+ description: |-
11111111+ Name of the referent.
11121112+ This field is effectively required, but due to backwards compatibility is
11131113+ allowed to be empty. Instances of this type with an empty value here are
11141114+ almost certainly wrong.
11151115+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
11161116+ type: string
11171117+ optional:
11181118+ description: Specify whether the Secret or its key must
11191119+ be defined
11201120+ type: boolean
11211121+ required:
11221122+ - key
11231123+ type: object
11241124+ x-kubernetes-map-type: atomic
11251125+ type: object
11261126+ required:
11271127+ - name
11281128+ type: object
11291129+ type: array
11301130+ hostname:
11311131+ description: Hostname is the public hostname for the Knot server (e.g.,
11321132+ knot.example.com)
11331133+ type: string
11341134+ image:
11351135+ default: docker.io/tngl/knot:v1.10.0-alpha
11361136+ description: Image is the container image to use for the Knot server
11371137+ type: string
11381138+ imagePullPolicy:
11391139+ default: IfNotPresent
11401140+ description: ImagePullPolicy defines the pull policy for the container
11411141+ image
11421142+ type: string
11431143+ ingress:
11441144+ description: Ingress configures external access (Kubernetes Ingress)
11451145+ properties:
11461146+ annotations:
11471147+ additionalProperties:
11481148+ type: string
11491149+ description: Annotations to add to the Ingress
11501150+ type: object
11511151+ enabled:
11521152+ description: Enabled enables Ingress creation
11531153+ type: boolean
11541154+ ingressClassName:
11551155+ description: IngressClassName is the IngressClass to use
11561156+ type: string
11571157+ tls:
11581158+ description: TLS configures TLS for the Ingress
11591159+ properties:
11601160+ enabled:
11611161+ description: Enabled enables TLS
11621162+ type: boolean
11631163+ secretName:
11641164+ description: SecretName is the name of the TLS secret
11651165+ type: string
11661166+ type: object
11671167+ type: object
11681168+ nodeSelector:
11691169+ additionalProperties:
11701170+ type: string
11711171+ description: NodeSelector for pod scheduling
11721172+ type: object
11731173+ openshift:
11741174+ description: OpenShift contains OpenShift-specific configuration
11751175+ properties:
11761176+ route:
11771177+ description: Route configures OpenShift Route creation
11781178+ properties:
11791179+ annotations:
11801180+ additionalProperties:
11811181+ type: string
11821182+ description: Annotations to add to the Route
11831183+ type: object
11841184+ enabled:
11851185+ description: Enabled enables Route creation
11861186+ type: boolean
11871187+ tls:
11881188+ description: TLS configures TLS termination for the Route
11891189+ properties:
11901190+ caCertificate:
11911191+ description: CACertificate is the PEM-encoded CA certificate
11921192+ type: string
11931193+ certificate:
11941194+ description: Certificate is the PEM-encoded certificate
11951195+ type: string
11961196+ destinationCACertificate:
11971197+ description: DestinationCACertificate is used for reencrypt
11981198+ termination
11991199+ type: string
12001200+ insecureEdgeTerminationPolicy:
12011201+ default: Redirect
12021202+ description: InsecureEdgeTerminationPolicy specifies behavior
12031203+ for insecure connections
12041204+ enum:
12051205+ - Allow
12061206+ - Redirect
12071207+ - None
12081208+ type: string
12091209+ key:
12101210+ description: Key is the PEM-encoded private key
12111211+ type: string
12121212+ termination:
12131213+ default: edge
12141214+ description: Termination specifies the TLS termination
12151215+ type (edge, passthrough, reencrypt)
12161216+ enum:
12171217+ - edge
12181218+ - passthrough
12191219+ - reencrypt
12201220+ type: string
12211221+ type: object
12221222+ wildcardPolicy:
12231223+ default: None
12241224+ description: WildcardPolicy specifies the wildcard policy
12251225+ (None, Subdomain)
12261226+ type: string
12271227+ type: object
12281228+ scc:
12291229+ description: SCC configures Security Context Constraints
12301230+ properties:
12311231+ allowHostIPC:
12321232+ default: false
12331233+ description: AllowHostIPC allows host IPC namespace
12341234+ type: boolean
12351235+ allowHostNetwork:
12361236+ default: false
12371237+ description: AllowHostNetwork allows host network access
12381238+ type: boolean
12391239+ allowHostPID:
12401240+ default: false
12411241+ description: AllowHostPID allows host PID namespace
12421242+ type: boolean
12431243+ allowHostPorts:
12441244+ default: false
12451245+ description: AllowHostPorts allows host port binding
12461246+ type: boolean
12471247+ allowPrivilegedContainer:
12481248+ default: false
12491249+ description: AllowPrivilegedContainer allows privileged containers
12501250+ type: boolean
12511251+ create:
12521252+ description: Create specifies whether to create a custom SCC
12531253+ type: boolean
12541254+ fsGroup:
12551255+ default: MustRunAs
12561256+ description: FSGroup specifies the fs group strategy
12571257+ type: string
12581258+ name:
12591259+ default: knot-scc
12601260+ description: Name is the name of the SCC to use or create
12611261+ type: string
12621262+ readOnlyRootFilesystem:
12631263+ default: false
12641264+ description: ReadOnlyRootFilesystem requires read-only root
12651265+ filesystem
12661266+ type: boolean
12671267+ runAsUser:
12681268+ default: MustRunAsNonRoot
12691269+ description: RunAsUser specifies the run as user strategy
12701270+ type: string
12711271+ seLinuxContext:
12721272+ default: MustRunAs
12731273+ description: SELinuxContext specifies the SELinux context
12741274+ strategy
12751275+ type: string
12761276+ supplementalGroups:
12771277+ default: RunAsAny
12781278+ description: SupplementalGroups specifies the supplemental
12791279+ groups strategy
12801280+ type: string
12811281+ volumes:
12821282+ description: Volumes specifies allowed volume types
12831283+ items:
12841284+ type: string
12851285+ type: array
12861286+ type: object
12871287+ type: object
12881288+ owner:
12891289+ description: Owner is the DID identifier of the server owner
12901290+ type: string
12911291+ replicas:
12921292+ default: 1
12931293+ description: Replicas is the number of Knot server instances to run
12941294+ format: int32
12951295+ minimum: 1
12961296+ type: integer
12971297+ resources:
12981298+ description: Resources defines compute resource requirements
12991299+ properties:
13001300+ claims:
13011301+ description: |-
13021302+ Claims lists the names of resources, defined in spec.resourceClaims,
13031303+ that are used by this container.
13041304+13051305+ This field depends on the
13061306+ DynamicResourceAllocation feature gate.
13071307+13081308+ This field is immutable. It can only be set for containers.
13091309+ items:
13101310+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
13111311+ properties:
13121312+ name:
13131313+ description: |-
13141314+ Name must match the name of one entry in pod.spec.resourceClaims of
13151315+ the Pod where this field is used. It makes that resource available
13161316+ inside a container.
13171317+ type: string
13181318+ request:
13191319+ description: |-
13201320+ Request is the name chosen for a request in the referenced claim.
13211321+ If empty, everything from the claim is made available, otherwise
13221322+ only the result of this request.
13231323+ type: string
13241324+ required:
13251325+ - name
13261326+ type: object
13271327+ type: array
13281328+ x-kubernetes-list-map-keys:
13291329+ - name
13301330+ x-kubernetes-list-type: map
13311331+ limits:
13321332+ additionalProperties:
13331333+ anyOf:
13341334+ - type: integer
13351335+ - type: string
13361336+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
13371337+ x-kubernetes-int-or-string: true
13381338+ description: |-
13391339+ Limits describes the maximum amount of compute resources allowed.
13401340+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
13411341+ type: object
13421342+ requests:
13431343+ additionalProperties:
13441344+ anyOf:
13451345+ - type: integer
13461346+ - type: string
13471347+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
13481348+ x-kubernetes-int-or-string: true
13491349+ description: |-
13501350+ Requests describes the minimum amount of compute resources required.
13511351+ If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
13521352+ otherwise to an implementation-defined value. Requests cannot exceed Limits.
13531353+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
13541354+ type: object
13551355+ type: object
13561356+ serviceAccountName:
13571357+ description: ServiceAccountName is the name of the ServiceAccount
13581358+ to use
13591359+ type: string
13601360+ ssh:
13611361+ description: SSH configures the SSH server for git operations
13621362+ properties:
13631363+ annotations:
13641364+ additionalProperties:
13651365+ type: string
13661366+ description: Annotations to add to the SSH Service
13671367+ type: object
13681368+ enabled:
13691369+ description: Enabled enables SSH access for git operations
13701370+ type: boolean
13711371+ loadBalancerIP:
13721372+ description: LoadBalancerIP is the static IP for LoadBalancer
13731373+ type services
13741374+ type: string
13751375+ nodePort:
13761376+ description: NodePort is the port to use when ServiceType is NodePort
13771377+ format: int32
13781378+ type: integer
13791379+ port:
13801380+ default: 22
13811381+ description: Port is the SSH port to expose
13821382+ format: int32
13831383+ type: integer
13841384+ serviceType:
13851385+ default: LoadBalancer
13861386+ description: ServiceType is the Kubernetes Service type for SSH
13871387+ type: string
13881388+ type: object
13891389+ storage:
13901390+ description: Storage configures persistent storage for repositories
13911391+ and database
13921392+ properties:
13931393+ dbPath:
13941394+ default: /data/db
13951395+ description: DBPath is the path where the database is stored
13961396+ type: string
13971397+ dbSize:
13981398+ default: 1Gi
13991399+ description: DBSize is the size of the database PVC
14001400+ type: string
14011401+ dbStorageClass:
14021402+ description: DBStorageClass is the StorageClass for database storage
14031403+ type: string
14041404+ repoPath:
14051405+ default: /data/repos
14061406+ description: RepoPath is the path where repositories are stored
14071407+ type: string
14081408+ repoSize:
14091409+ default: 10Gi
14101410+ description: RepoSize is the size of the repository PVC
14111411+ type: string
14121412+ repoStorageClass:
14131413+ description: RepoStorageClass is the StorageClass for repository
14141414+ storage
14151415+ type: string
14161416+ type: object
14171417+ tolerations:
14181418+ description: Tolerations for pod scheduling
14191419+ items:
14201420+ description: |-
14211421+ The pod this Toleration is attached to tolerates any taint that matches
14221422+ the triple <key,value,effect> using the matching operator <operator>.
14231423+ properties:
14241424+ effect:
14251425+ description: |-
14261426+ Effect indicates the taint effect to match. Empty means match all taint effects.
14271427+ When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
14281428+ type: string
14291429+ key:
14301430+ description: |-
14311431+ Key is the taint key that the toleration applies to. Empty means match all taint keys.
14321432+ If the key is empty, operator must be Exists; this combination means to match all values and all keys.
14331433+ type: string
14341434+ operator:
14351435+ description: |-
14361436+ Operator represents a key's relationship to the value.
14371437+ Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
14381438+ Exists is equivalent to wildcard for value, so that a pod can
14391439+ tolerate all taints of a particular category.
14401440+ Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
14411441+ type: string
14421442+ tolerationSeconds:
14431443+ description: |-
14441444+ TolerationSeconds represents the period of time the toleration (which must be
14451445+ of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
14461446+ it is not set, which means tolerate the taint forever (do not evict). Zero and
14471447+ negative values will be treated as 0 (evict immediately) by the system.
14481448+ format: int64
14491449+ type: integer
14501450+ value:
14511451+ description: |-
14521452+ Value is the taint value the toleration matches to.
14531453+ If the operator is Exists, the value should be empty, otherwise just a regular string.
14541454+ type: string
14551455+ type: object
14561456+ type: array
14571457+ required:
14581458+ - hostname
14591459+ - owner
14601460+ type: object
14611461+ status:
14621462+ description: KnotStatus defines the observed state of Knot
14631463+ properties:
14641464+ availableReplicas:
14651465+ description: AvailableReplicas is the number of available replicas
14661466+ format: int32
14671467+ type: integer
14681468+ conditions:
14691469+ description: Conditions represent the latest available observations
14701470+ items:
14711471+ description: Condition contains details for one aspect of the current
14721472+ state of this API Resource.
14731473+ properties:
14741474+ lastTransitionTime:
14751475+ description: |-
14761476+ lastTransitionTime is the last time the condition transitioned from one status to another.
14771477+ This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
14781478+ format: date-time
14791479+ type: string
14801480+ message:
14811481+ description: |-
14821482+ message is a human readable message indicating details about the transition.
14831483+ This may be an empty string.
14841484+ maxLength: 32768
14851485+ type: string
14861486+ observedGeneration:
14871487+ description: |-
14881488+ observedGeneration represents the .metadata.generation that the condition was set based upon.
14891489+ For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
14901490+ with respect to the current state of the instance.
14911491+ format: int64
14921492+ minimum: 0
14931493+ type: integer
14941494+ reason:
14951495+ description: |-
14961496+ reason contains a programmatic identifier indicating the reason for the condition's last transition.
14971497+ Producers of specific condition types may define expected values and meanings for this field,
14981498+ and whether the values are considered a guaranteed API.
14991499+ The value should be a CamelCase string.
15001500+ This field may not be empty.
15011501+ maxLength: 1024
15021502+ minLength: 1
15031503+ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
15041504+ type: string
15051505+ status:
15061506+ description: status of the condition, one of True, False, Unknown.
15071507+ enum:
15081508+ - "True"
15091509+ - "False"
15101510+ - Unknown
15111511+ type: string
15121512+ type:
15131513+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
15141514+ maxLength: 316
15151515+ 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])$
15161516+ type: string
15171517+ required:
15181518+ - lastTransitionTime
15191519+ - message
15201520+ - reason
15211521+ - status
15221522+ - type
15231523+ type: object
15241524+ type: array
15251525+ observedGeneration:
15261526+ description: ObservedGeneration is the most recent generation observed
15271527+ format: int64
15281528+ type: integer
15291529+ phase:
15301530+ description: Phase represents the current phase of the Knot deployment
15311531+ enum:
15321532+ - Pending
15331533+ - Running
15341534+ - Failed
15351535+ - Unknown
15361536+ type: string
15371537+ readyReplicas:
15381538+ description: ReadyReplicas is the number of ready replicas
15391539+ format: int32
15401540+ type: integer
15411541+ sshURL:
15421542+ description: SSHURL is the SSH URL for git operations
15431543+ type: string
15441544+ url:
15451545+ description: URL is the external URL of the Knot server
15461546+ type: string
15471547+ type: object
15481548+ type: object
15491549+ served: true
15501550+ storage: true
15511551+ subresources:
15521552+ status: {}
···11+---
22+apiVersion: apiextensions.k8s.io/v1
33+kind: CustomResourceDefinition
44+metadata:
55+ annotations:
66+ controller-gen.kubebuilder.io/version: v0.20.0
77+ name: knots.tangled.org
88+spec:
99+ group: tangled.org
1010+ names:
1111+ kind: Knot
1212+ listKind: KnotList
1313+ plural: knots
1414+ shortNames:
1515+ - kt
1616+ singular: knot
1717+ scope: Namespaced
1818+ versions:
1919+ - additionalPrinterColumns:
2020+ - jsonPath: .status.phase
2121+ name: Phase
2222+ type: string
2323+ - jsonPath: .status.url
2424+ name: URL
2525+ type: string
2626+ - jsonPath: .status.readyReplicas
2727+ name: Ready
2828+ type: integer
2929+ - jsonPath: .metadata.creationTimestamp
3030+ name: Age
3131+ type: date
3232+ name: v1alpha1
3333+ schema:
3434+ openAPIV3Schema:
3535+ description: Knot is the Schema for the knots API
3636+ properties:
3737+ apiVersion:
3838+ description: |-
3939+ APIVersion defines the versioned schema of this representation of an object.
4040+ Servers should convert recognized schemas to the latest internal value, and
4141+ may reject unrecognized values.
4242+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
4343+ type: string
4444+ kind:
4545+ description: |-
4646+ Kind is a string value representing the REST resource this object represents.
4747+ Servers may infer this from the endpoint the client submits requests to.
4848+ Cannot be updated.
4949+ In CamelCase.
5050+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
5151+ type: string
5252+ metadata:
5353+ type: object
5454+ spec:
5555+ description: KnotSpec defines the desired state of Knot
5656+ properties:
5757+ affinity:
5858+ description: Affinity rules for pod scheduling
5959+ properties:
6060+ nodeAffinity:
6161+ description: Describes node affinity scheduling rules for the
6262+ pod.
6363+ properties:
6464+ preferredDuringSchedulingIgnoredDuringExecution:
6565+ description: |-
6666+ The scheduler will prefer to schedule pods to nodes that satisfy
6767+ the affinity expressions specified by this field, but it may choose
6868+ a node that violates one or more of the expressions. The node that is
6969+ most preferred is the one with the greatest sum of weights, i.e.
7070+ for each node that meets all of the scheduling requirements (resource
7171+ request, requiredDuringScheduling affinity expressions, etc.),
7272+ compute a sum by iterating through the elements of this field and adding
7373+ "weight" to the sum if the node matches the corresponding matchExpressions; the
7474+ node(s) with the highest sum are the most preferred.
7575+ items:
7676+ description: |-
7777+ An empty preferred scheduling term matches all objects with implicit weight 0
7878+ (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
7979+ properties:
8080+ preference:
8181+ description: A node selector term, associated with the
8282+ corresponding weight.
8383+ properties:
8484+ matchExpressions:
8585+ description: A list of node selector requirements
8686+ by node's labels.
8787+ items:
8888+ description: |-
8989+ A node selector requirement is a selector that contains values, a key, and an operator
9090+ that relates the key and values.
9191+ properties:
9292+ key:
9393+ description: The label key that the selector
9494+ applies to.
9595+ type: string
9696+ operator:
9797+ description: |-
9898+ Represents a key's relationship to a set of values.
9999+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
100100+ type: string
101101+ values:
102102+ description: |-
103103+ An array of string values. If the operator is In or NotIn,
104104+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
105105+ the values array must be empty. If the operator is Gt or Lt, the values
106106+ array must have a single element, which will be interpreted as an integer.
107107+ This array is replaced during a strategic merge patch.
108108+ items:
109109+ type: string
110110+ type: array
111111+ x-kubernetes-list-type: atomic
112112+ required:
113113+ - key
114114+ - operator
115115+ type: object
116116+ type: array
117117+ x-kubernetes-list-type: atomic
118118+ matchFields:
119119+ description: A list of node selector requirements
120120+ by node's fields.
121121+ items:
122122+ description: |-
123123+ A node selector requirement is a selector that contains values, a key, and an operator
124124+ that relates the key and values.
125125+ properties:
126126+ key:
127127+ description: The label key that the selector
128128+ applies to.
129129+ type: string
130130+ operator:
131131+ description: |-
132132+ Represents a key's relationship to a set of values.
133133+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
134134+ type: string
135135+ values:
136136+ description: |-
137137+ An array of string values. If the operator is In or NotIn,
138138+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
139139+ the values array must be empty. If the operator is Gt or Lt, the values
140140+ array must have a single element, which will be interpreted as an integer.
141141+ This array is replaced during a strategic merge patch.
142142+ items:
143143+ type: string
144144+ type: array
145145+ x-kubernetes-list-type: atomic
146146+ required:
147147+ - key
148148+ - operator
149149+ type: object
150150+ type: array
151151+ x-kubernetes-list-type: atomic
152152+ type: object
153153+ x-kubernetes-map-type: atomic
154154+ weight:
155155+ description: Weight associated with matching the corresponding
156156+ nodeSelectorTerm, in the range 1-100.
157157+ format: int32
158158+ type: integer
159159+ required:
160160+ - preference
161161+ - weight
162162+ type: object
163163+ type: array
164164+ x-kubernetes-list-type: atomic
165165+ requiredDuringSchedulingIgnoredDuringExecution:
166166+ description: |-
167167+ If the affinity requirements specified by this field are not met at
168168+ scheduling time, the pod will not be scheduled onto the node.
169169+ If the affinity requirements specified by this field cease to be met
170170+ at some point during pod execution (e.g. due to an update), the system
171171+ may or may not try to eventually evict the pod from its node.
172172+ properties:
173173+ nodeSelectorTerms:
174174+ description: Required. A list of node selector terms.
175175+ The terms are ORed.
176176+ items:
177177+ description: |-
178178+ A null or empty node selector term matches no objects. The requirements of
179179+ them are ANDed.
180180+ The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
181181+ properties:
182182+ matchExpressions:
183183+ description: A list of node selector requirements
184184+ by node's labels.
185185+ items:
186186+ description: |-
187187+ A node selector requirement is a selector that contains values, a key, and an operator
188188+ that relates the key and values.
189189+ properties:
190190+ key:
191191+ description: The label key that the selector
192192+ applies to.
193193+ type: string
194194+ operator:
195195+ description: |-
196196+ Represents a key's relationship to a set of values.
197197+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
198198+ type: string
199199+ values:
200200+ description: |-
201201+ An array of string values. If the operator is In or NotIn,
202202+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
203203+ the values array must be empty. If the operator is Gt or Lt, the values
204204+ array must have a single element, which will be interpreted as an integer.
205205+ This array is replaced during a strategic merge patch.
206206+ items:
207207+ type: string
208208+ type: array
209209+ x-kubernetes-list-type: atomic
210210+ required:
211211+ - key
212212+ - operator
213213+ type: object
214214+ type: array
215215+ x-kubernetes-list-type: atomic
216216+ matchFields:
217217+ description: A list of node selector requirements
218218+ by node's fields.
219219+ items:
220220+ description: |-
221221+ A node selector requirement is a selector that contains values, a key, and an operator
222222+ that relates the key and values.
223223+ properties:
224224+ key:
225225+ description: The label key that the selector
226226+ applies to.
227227+ type: string
228228+ operator:
229229+ description: |-
230230+ Represents a key's relationship to a set of values.
231231+ Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
232232+ type: string
233233+ values:
234234+ description: |-
235235+ An array of string values. If the operator is In or NotIn,
236236+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
237237+ the values array must be empty. If the operator is Gt or Lt, the values
238238+ array must have a single element, which will be interpreted as an integer.
239239+ This array is replaced during a strategic merge patch.
240240+ items:
241241+ type: string
242242+ type: array
243243+ x-kubernetes-list-type: atomic
244244+ required:
245245+ - key
246246+ - operator
247247+ type: object
248248+ type: array
249249+ x-kubernetes-list-type: atomic
250250+ type: object
251251+ x-kubernetes-map-type: atomic
252252+ type: array
253253+ x-kubernetes-list-type: atomic
254254+ required:
255255+ - nodeSelectorTerms
256256+ type: object
257257+ x-kubernetes-map-type: atomic
258258+ type: object
259259+ podAffinity:
260260+ description: Describes pod affinity scheduling rules (e.g. co-locate
261261+ this pod in the same node, zone, etc. as some other pod(s)).
262262+ properties:
263263+ preferredDuringSchedulingIgnoredDuringExecution:
264264+ description: |-
265265+ The scheduler will prefer to schedule pods to nodes that satisfy
266266+ the affinity expressions specified by this field, but it may choose
267267+ a node that violates one or more of the expressions. The node that is
268268+ most preferred is the one with the greatest sum of weights, i.e.
269269+ for each node that meets all of the scheduling requirements (resource
270270+ request, requiredDuringScheduling affinity expressions, etc.),
271271+ compute a sum by iterating through the elements of this field and adding
272272+ "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
273273+ node(s) with the highest sum are the most preferred.
274274+ items:
275275+ description: The weights of all of the matched WeightedPodAffinityTerm
276276+ fields are added per-node to find the most preferred node(s)
277277+ properties:
278278+ podAffinityTerm:
279279+ description: Required. A pod affinity term, associated
280280+ with the corresponding weight.
281281+ properties:
282282+ labelSelector:
283283+ description: |-
284284+ A label query over a set of resources, in this case pods.
285285+ If it's null, this PodAffinityTerm matches with no Pods.
286286+ properties:
287287+ matchExpressions:
288288+ description: matchExpressions is a list of label
289289+ selector requirements. The requirements are
290290+ ANDed.
291291+ items:
292292+ description: |-
293293+ A label selector requirement is a selector that contains values, a key, and an operator that
294294+ relates the key and values.
295295+ properties:
296296+ key:
297297+ description: key is the label key that
298298+ the selector applies to.
299299+ type: string
300300+ operator:
301301+ description: |-
302302+ operator represents a key's relationship to a set of values.
303303+ Valid operators are In, NotIn, Exists and DoesNotExist.
304304+ type: string
305305+ values:
306306+ description: |-
307307+ values is an array of string values. If the operator is In or NotIn,
308308+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
309309+ the values array must be empty. This array is replaced during a strategic
310310+ merge patch.
311311+ items:
312312+ type: string
313313+ type: array
314314+ x-kubernetes-list-type: atomic
315315+ required:
316316+ - key
317317+ - operator
318318+ type: object
319319+ type: array
320320+ x-kubernetes-list-type: atomic
321321+ matchLabels:
322322+ additionalProperties:
323323+ type: string
324324+ description: |-
325325+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
326326+ map is equivalent to an element of matchExpressions, whose key field is "key", the
327327+ operator is "In", and the values array contains only "value". The requirements are ANDed.
328328+ type: object
329329+ type: object
330330+ x-kubernetes-map-type: atomic
331331+ matchLabelKeys:
332332+ description: |-
333333+ MatchLabelKeys is a set of pod label keys to select which pods will
334334+ be taken into consideration. The keys are used to lookup values from the
335335+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
336336+ to select the group of existing pods which pods will be taken into consideration
337337+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
338338+ pod labels will be ignored. The default value is empty.
339339+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
340340+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
341341+ items:
342342+ type: string
343343+ type: array
344344+ x-kubernetes-list-type: atomic
345345+ mismatchLabelKeys:
346346+ description: |-
347347+ MismatchLabelKeys is a set of pod label keys to select which pods will
348348+ be taken into consideration. The keys are used to lookup values from the
349349+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
350350+ to select the group of existing pods which pods will be taken into consideration
351351+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
352352+ pod labels will be ignored. The default value is empty.
353353+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
354354+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
355355+ items:
356356+ type: string
357357+ type: array
358358+ x-kubernetes-list-type: atomic
359359+ namespaceSelector:
360360+ description: |-
361361+ A label query over the set of namespaces that the term applies to.
362362+ The term is applied to the union of the namespaces selected by this field
363363+ and the ones listed in the namespaces field.
364364+ null selector and null or empty namespaces list means "this pod's namespace".
365365+ An empty selector ({}) matches all namespaces.
366366+ properties:
367367+ matchExpressions:
368368+ description: matchExpressions is a list of label
369369+ selector requirements. The requirements are
370370+ ANDed.
371371+ items:
372372+ description: |-
373373+ A label selector requirement is a selector that contains values, a key, and an operator that
374374+ relates the key and values.
375375+ properties:
376376+ key:
377377+ description: key is the label key that
378378+ the selector applies to.
379379+ type: string
380380+ operator:
381381+ description: |-
382382+ operator represents a key's relationship to a set of values.
383383+ Valid operators are In, NotIn, Exists and DoesNotExist.
384384+ type: string
385385+ values:
386386+ description: |-
387387+ values is an array of string values. If the operator is In or NotIn,
388388+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
389389+ the values array must be empty. This array is replaced during a strategic
390390+ merge patch.
391391+ items:
392392+ type: string
393393+ type: array
394394+ x-kubernetes-list-type: atomic
395395+ required:
396396+ - key
397397+ - operator
398398+ type: object
399399+ type: array
400400+ x-kubernetes-list-type: atomic
401401+ matchLabels:
402402+ additionalProperties:
403403+ type: string
404404+ description: |-
405405+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
406406+ map is equivalent to an element of matchExpressions, whose key field is "key", the
407407+ operator is "In", and the values array contains only "value". The requirements are ANDed.
408408+ type: object
409409+ type: object
410410+ x-kubernetes-map-type: atomic
411411+ namespaces:
412412+ description: |-
413413+ namespaces specifies a static list of namespace names that the term applies to.
414414+ The term is applied to the union of the namespaces listed in this field
415415+ and the ones selected by namespaceSelector.
416416+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
417417+ items:
418418+ type: string
419419+ type: array
420420+ x-kubernetes-list-type: atomic
421421+ topologyKey:
422422+ description: |-
423423+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
424424+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
425425+ whose value of the label with key topologyKey matches that of any node on which any of the
426426+ selected pods is running.
427427+ Empty topologyKey is not allowed.
428428+ type: string
429429+ required:
430430+ - topologyKey
431431+ type: object
432432+ weight:
433433+ description: |-
434434+ weight associated with matching the corresponding podAffinityTerm,
435435+ in the range 1-100.
436436+ format: int32
437437+ type: integer
438438+ required:
439439+ - podAffinityTerm
440440+ - weight
441441+ type: object
442442+ type: array
443443+ x-kubernetes-list-type: atomic
444444+ requiredDuringSchedulingIgnoredDuringExecution:
445445+ description: |-
446446+ If the affinity requirements specified by this field are not met at
447447+ scheduling time, the pod will not be scheduled onto the node.
448448+ If the affinity requirements specified by this field cease to be met
449449+ at some point during pod execution (e.g. due to a pod label update), the
450450+ system may or may not try to eventually evict the pod from its node.
451451+ When there are multiple elements, the lists of nodes corresponding to each
452452+ podAffinityTerm are intersected, i.e. all terms must be satisfied.
453453+ items:
454454+ description: |-
455455+ Defines a set of pods (namely those matching the labelSelector
456456+ relative to the given namespace(s)) that this pod should be
457457+ co-located (affinity) or not co-located (anti-affinity) with,
458458+ where co-located is defined as running on a node whose value of
459459+ the label with key <topologyKey> matches that of any node on which
460460+ a pod of the set of pods is running
461461+ properties:
462462+ labelSelector:
463463+ description: |-
464464+ A label query over a set of resources, in this case pods.
465465+ If it's null, this PodAffinityTerm matches with no Pods.
466466+ properties:
467467+ matchExpressions:
468468+ description: matchExpressions is a list of label
469469+ selector requirements. The requirements are ANDed.
470470+ items:
471471+ description: |-
472472+ A label selector requirement is a selector that contains values, a key, and an operator that
473473+ relates the key and values.
474474+ properties:
475475+ key:
476476+ description: key is the label key that the
477477+ selector applies to.
478478+ type: string
479479+ operator:
480480+ description: |-
481481+ operator represents a key's relationship to a set of values.
482482+ Valid operators are In, NotIn, Exists and DoesNotExist.
483483+ type: string
484484+ values:
485485+ description: |-
486486+ values is an array of string values. If the operator is In or NotIn,
487487+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
488488+ the values array must be empty. This array is replaced during a strategic
489489+ merge patch.
490490+ items:
491491+ type: string
492492+ type: array
493493+ x-kubernetes-list-type: atomic
494494+ required:
495495+ - key
496496+ - operator
497497+ type: object
498498+ type: array
499499+ x-kubernetes-list-type: atomic
500500+ matchLabels:
501501+ additionalProperties:
502502+ type: string
503503+ description: |-
504504+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
505505+ map is equivalent to an element of matchExpressions, whose key field is "key", the
506506+ operator is "In", and the values array contains only "value". The requirements are ANDed.
507507+ type: object
508508+ type: object
509509+ x-kubernetes-map-type: atomic
510510+ matchLabelKeys:
511511+ description: |-
512512+ MatchLabelKeys is a set of pod label keys to select which pods will
513513+ be taken into consideration. The keys are used to lookup values from the
514514+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
515515+ to select the group of existing pods which pods will be taken into consideration
516516+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
517517+ pod labels will be ignored. The default value is empty.
518518+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
519519+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
520520+ items:
521521+ type: string
522522+ type: array
523523+ x-kubernetes-list-type: atomic
524524+ mismatchLabelKeys:
525525+ description: |-
526526+ MismatchLabelKeys is a set of pod label keys to select which pods will
527527+ be taken into consideration. The keys are used to lookup values from the
528528+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
529529+ to select the group of existing pods which pods will be taken into consideration
530530+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
531531+ pod labels will be ignored. The default value is empty.
532532+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
533533+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
534534+ items:
535535+ type: string
536536+ type: array
537537+ x-kubernetes-list-type: atomic
538538+ namespaceSelector:
539539+ description: |-
540540+ A label query over the set of namespaces that the term applies to.
541541+ The term is applied to the union of the namespaces selected by this field
542542+ and the ones listed in the namespaces field.
543543+ null selector and null or empty namespaces list means "this pod's namespace".
544544+ An empty selector ({}) matches all namespaces.
545545+ properties:
546546+ matchExpressions:
547547+ description: matchExpressions is a list of label
548548+ selector requirements. The requirements are ANDed.
549549+ items:
550550+ description: |-
551551+ A label selector requirement is a selector that contains values, a key, and an operator that
552552+ relates the key and values.
553553+ properties:
554554+ key:
555555+ description: key is the label key that the
556556+ selector applies to.
557557+ type: string
558558+ operator:
559559+ description: |-
560560+ operator represents a key's relationship to a set of values.
561561+ Valid operators are In, NotIn, Exists and DoesNotExist.
562562+ type: string
563563+ values:
564564+ description: |-
565565+ values is an array of string values. If the operator is In or NotIn,
566566+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
567567+ the values array must be empty. This array is replaced during a strategic
568568+ merge patch.
569569+ items:
570570+ type: string
571571+ type: array
572572+ x-kubernetes-list-type: atomic
573573+ required:
574574+ - key
575575+ - operator
576576+ type: object
577577+ type: array
578578+ x-kubernetes-list-type: atomic
579579+ matchLabels:
580580+ additionalProperties:
581581+ type: string
582582+ description: |-
583583+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
584584+ map is equivalent to an element of matchExpressions, whose key field is "key", the
585585+ operator is "In", and the values array contains only "value". The requirements are ANDed.
586586+ type: object
587587+ type: object
588588+ x-kubernetes-map-type: atomic
589589+ namespaces:
590590+ description: |-
591591+ namespaces specifies a static list of namespace names that the term applies to.
592592+ The term is applied to the union of the namespaces listed in this field
593593+ and the ones selected by namespaceSelector.
594594+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
595595+ items:
596596+ type: string
597597+ type: array
598598+ x-kubernetes-list-type: atomic
599599+ topologyKey:
600600+ description: |-
601601+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
602602+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
603603+ whose value of the label with key topologyKey matches that of any node on which any of the
604604+ selected pods is running.
605605+ Empty topologyKey is not allowed.
606606+ type: string
607607+ required:
608608+ - topologyKey
609609+ type: object
610610+ type: array
611611+ x-kubernetes-list-type: atomic
612612+ type: object
613613+ podAntiAffinity:
614614+ description: Describes pod anti-affinity scheduling rules (e.g.
615615+ avoid putting this pod in the same node, zone, etc. as some
616616+ other pod(s)).
617617+ properties:
618618+ preferredDuringSchedulingIgnoredDuringExecution:
619619+ description: |-
620620+ The scheduler will prefer to schedule pods to nodes that satisfy
621621+ the anti-affinity expressions specified by this field, but it may choose
622622+ a node that violates one or more of the expressions. The node that is
623623+ most preferred is the one with the greatest sum of weights, i.e.
624624+ for each node that meets all of the scheduling requirements (resource
625625+ request, requiredDuringScheduling anti-affinity expressions, etc.),
626626+ compute a sum by iterating through the elements of this field and subtracting
627627+ "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
628628+ node(s) with the highest sum are the most preferred.
629629+ items:
630630+ description: The weights of all of the matched WeightedPodAffinityTerm
631631+ fields are added per-node to find the most preferred node(s)
632632+ properties:
633633+ podAffinityTerm:
634634+ description: Required. A pod affinity term, associated
635635+ with the corresponding weight.
636636+ properties:
637637+ labelSelector:
638638+ description: |-
639639+ A label query over a set of resources, in this case pods.
640640+ If it's null, this PodAffinityTerm matches with no Pods.
641641+ properties:
642642+ matchExpressions:
643643+ description: matchExpressions is a list of label
644644+ selector requirements. The requirements are
645645+ ANDed.
646646+ items:
647647+ description: |-
648648+ A label selector requirement is a selector that contains values, a key, and an operator that
649649+ relates the key and values.
650650+ properties:
651651+ key:
652652+ description: key is the label key that
653653+ the selector applies to.
654654+ type: string
655655+ operator:
656656+ description: |-
657657+ operator represents a key's relationship to a set of values.
658658+ Valid operators are In, NotIn, Exists and DoesNotExist.
659659+ type: string
660660+ values:
661661+ description: |-
662662+ values is an array of string values. If the operator is In or NotIn,
663663+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
664664+ the values array must be empty. This array is replaced during a strategic
665665+ merge patch.
666666+ items:
667667+ type: string
668668+ type: array
669669+ x-kubernetes-list-type: atomic
670670+ required:
671671+ - key
672672+ - operator
673673+ type: object
674674+ type: array
675675+ x-kubernetes-list-type: atomic
676676+ matchLabels:
677677+ additionalProperties:
678678+ type: string
679679+ description: |-
680680+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
681681+ map is equivalent to an element of matchExpressions, whose key field is "key", the
682682+ operator is "In", and the values array contains only "value". The requirements are ANDed.
683683+ type: object
684684+ type: object
685685+ x-kubernetes-map-type: atomic
686686+ matchLabelKeys:
687687+ description: |-
688688+ MatchLabelKeys is a set of pod label keys to select which pods will
689689+ be taken into consideration. The keys are used to lookup values from the
690690+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
691691+ to select the group of existing pods which pods will be taken into consideration
692692+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
693693+ pod labels will be ignored. The default value is empty.
694694+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
695695+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
696696+ items:
697697+ type: string
698698+ type: array
699699+ x-kubernetes-list-type: atomic
700700+ mismatchLabelKeys:
701701+ description: |-
702702+ MismatchLabelKeys is a set of pod label keys to select which pods will
703703+ be taken into consideration. The keys are used to lookup values from the
704704+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
705705+ to select the group of existing pods which pods will be taken into consideration
706706+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
707707+ pod labels will be ignored. The default value is empty.
708708+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
709709+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
710710+ items:
711711+ type: string
712712+ type: array
713713+ x-kubernetes-list-type: atomic
714714+ namespaceSelector:
715715+ description: |-
716716+ A label query over the set of namespaces that the term applies to.
717717+ The term is applied to the union of the namespaces selected by this field
718718+ and the ones listed in the namespaces field.
719719+ null selector and null or empty namespaces list means "this pod's namespace".
720720+ An empty selector ({}) matches all namespaces.
721721+ properties:
722722+ matchExpressions:
723723+ description: matchExpressions is a list of label
724724+ selector requirements. The requirements are
725725+ ANDed.
726726+ items:
727727+ description: |-
728728+ A label selector requirement is a selector that contains values, a key, and an operator that
729729+ relates the key and values.
730730+ properties:
731731+ key:
732732+ description: key is the label key that
733733+ the selector applies to.
734734+ type: string
735735+ operator:
736736+ description: |-
737737+ operator represents a key's relationship to a set of values.
738738+ Valid operators are In, NotIn, Exists and DoesNotExist.
739739+ type: string
740740+ values:
741741+ description: |-
742742+ values is an array of string values. If the operator is In or NotIn,
743743+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
744744+ the values array must be empty. This array is replaced during a strategic
745745+ merge patch.
746746+ items:
747747+ type: string
748748+ type: array
749749+ x-kubernetes-list-type: atomic
750750+ required:
751751+ - key
752752+ - operator
753753+ type: object
754754+ type: array
755755+ x-kubernetes-list-type: atomic
756756+ matchLabels:
757757+ additionalProperties:
758758+ type: string
759759+ description: |-
760760+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
761761+ map is equivalent to an element of matchExpressions, whose key field is "key", the
762762+ operator is "In", and the values array contains only "value". The requirements are ANDed.
763763+ type: object
764764+ type: object
765765+ x-kubernetes-map-type: atomic
766766+ namespaces:
767767+ description: |-
768768+ namespaces specifies a static list of namespace names that the term applies to.
769769+ The term is applied to the union of the namespaces listed in this field
770770+ and the ones selected by namespaceSelector.
771771+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
772772+ items:
773773+ type: string
774774+ type: array
775775+ x-kubernetes-list-type: atomic
776776+ topologyKey:
777777+ description: |-
778778+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
779779+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
780780+ whose value of the label with key topologyKey matches that of any node on which any of the
781781+ selected pods is running.
782782+ Empty topologyKey is not allowed.
783783+ type: string
784784+ required:
785785+ - topologyKey
786786+ type: object
787787+ weight:
788788+ description: |-
789789+ weight associated with matching the corresponding podAffinityTerm,
790790+ in the range 1-100.
791791+ format: int32
792792+ type: integer
793793+ required:
794794+ - podAffinityTerm
795795+ - weight
796796+ type: object
797797+ type: array
798798+ x-kubernetes-list-type: atomic
799799+ requiredDuringSchedulingIgnoredDuringExecution:
800800+ description: |-
801801+ If the anti-affinity requirements specified by this field are not met at
802802+ scheduling time, the pod will not be scheduled onto the node.
803803+ If the anti-affinity requirements specified by this field cease to be met
804804+ at some point during pod execution (e.g. due to a pod label update), the
805805+ system may or may not try to eventually evict the pod from its node.
806806+ When there are multiple elements, the lists of nodes corresponding to each
807807+ podAffinityTerm are intersected, i.e. all terms must be satisfied.
808808+ items:
809809+ description: |-
810810+ Defines a set of pods (namely those matching the labelSelector
811811+ relative to the given namespace(s)) that this pod should be
812812+ co-located (affinity) or not co-located (anti-affinity) with,
813813+ where co-located is defined as running on a node whose value of
814814+ the label with key <topologyKey> matches that of any node on which
815815+ a pod of the set of pods is running
816816+ properties:
817817+ labelSelector:
818818+ description: |-
819819+ A label query over a set of resources, in this case pods.
820820+ If it's null, this PodAffinityTerm matches with no Pods.
821821+ properties:
822822+ matchExpressions:
823823+ description: matchExpressions is a list of label
824824+ selector requirements. The requirements are ANDed.
825825+ items:
826826+ description: |-
827827+ A label selector requirement is a selector that contains values, a key, and an operator that
828828+ relates the key and values.
829829+ properties:
830830+ key:
831831+ description: key is the label key that the
832832+ selector applies to.
833833+ type: string
834834+ operator:
835835+ description: |-
836836+ operator represents a key's relationship to a set of values.
837837+ Valid operators are In, NotIn, Exists and DoesNotExist.
838838+ type: string
839839+ values:
840840+ description: |-
841841+ values is an array of string values. If the operator is In or NotIn,
842842+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
843843+ the values array must be empty. This array is replaced during a strategic
844844+ merge patch.
845845+ items:
846846+ type: string
847847+ type: array
848848+ x-kubernetes-list-type: atomic
849849+ required:
850850+ - key
851851+ - operator
852852+ type: object
853853+ type: array
854854+ x-kubernetes-list-type: atomic
855855+ matchLabels:
856856+ additionalProperties:
857857+ type: string
858858+ description: |-
859859+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
860860+ map is equivalent to an element of matchExpressions, whose key field is "key", the
861861+ operator is "In", and the values array contains only "value". The requirements are ANDed.
862862+ type: object
863863+ type: object
864864+ x-kubernetes-map-type: atomic
865865+ matchLabelKeys:
866866+ description: |-
867867+ MatchLabelKeys is a set of pod label keys to select which pods will
868868+ be taken into consideration. The keys are used to lookup values from the
869869+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
870870+ to select the group of existing pods which pods will be taken into consideration
871871+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
872872+ pod labels will be ignored. The default value is empty.
873873+ The same key is forbidden to exist in both matchLabelKeys and labelSelector.
874874+ Also, matchLabelKeys cannot be set when labelSelector isn't set.
875875+ items:
876876+ type: string
877877+ type: array
878878+ x-kubernetes-list-type: atomic
879879+ mismatchLabelKeys:
880880+ description: |-
881881+ MismatchLabelKeys is a set of pod label keys to select which pods will
882882+ be taken into consideration. The keys are used to lookup values from the
883883+ incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
884884+ to select the group of existing pods which pods will be taken into consideration
885885+ for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
886886+ pod labels will be ignored. The default value is empty.
887887+ The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
888888+ Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
889889+ items:
890890+ type: string
891891+ type: array
892892+ x-kubernetes-list-type: atomic
893893+ namespaceSelector:
894894+ description: |-
895895+ A label query over the set of namespaces that the term applies to.
896896+ The term is applied to the union of the namespaces selected by this field
897897+ and the ones listed in the namespaces field.
898898+ null selector and null or empty namespaces list means "this pod's namespace".
899899+ An empty selector ({}) matches all namespaces.
900900+ properties:
901901+ matchExpressions:
902902+ description: matchExpressions is a list of label
903903+ selector requirements. The requirements are ANDed.
904904+ items:
905905+ description: |-
906906+ A label selector requirement is a selector that contains values, a key, and an operator that
907907+ relates the key and values.
908908+ properties:
909909+ key:
910910+ description: key is the label key that the
911911+ selector applies to.
912912+ type: string
913913+ operator:
914914+ description: |-
915915+ operator represents a key's relationship to a set of values.
916916+ Valid operators are In, NotIn, Exists and DoesNotExist.
917917+ type: string
918918+ values:
919919+ description: |-
920920+ values is an array of string values. If the operator is In or NotIn,
921921+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
922922+ the values array must be empty. This array is replaced during a strategic
923923+ merge patch.
924924+ items:
925925+ type: string
926926+ type: array
927927+ x-kubernetes-list-type: atomic
928928+ required:
929929+ - key
930930+ - operator
931931+ type: object
932932+ type: array
933933+ x-kubernetes-list-type: atomic
934934+ matchLabels:
935935+ additionalProperties:
936936+ type: string
937937+ description: |-
938938+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
939939+ map is equivalent to an element of matchExpressions, whose key field is "key", the
940940+ operator is "In", and the values array contains only "value". The requirements are ANDed.
941941+ type: object
942942+ type: object
943943+ x-kubernetes-map-type: atomic
944944+ namespaces:
945945+ description: |-
946946+ namespaces specifies a static list of namespace names that the term applies to.
947947+ The term is applied to the union of the namespaces listed in this field
948948+ and the ones selected by namespaceSelector.
949949+ null or empty namespaces list and null namespaceSelector means "this pod's namespace".
950950+ items:
951951+ type: string
952952+ type: array
953953+ x-kubernetes-list-type: atomic
954954+ topologyKey:
955955+ description: |-
956956+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
957957+ the labelSelector in the specified namespaces, where co-located is defined as running on a node
958958+ whose value of the label with key topologyKey matches that of any node on which any of the
959959+ selected pods is running.
960960+ Empty topologyKey is not allowed.
961961+ type: string
962962+ required:
963963+ - topologyKey
964964+ type: object
965965+ type: array
966966+ x-kubernetes-list-type: atomic
967967+ type: object
968968+ type: object
969969+ appviewEndpoint:
970970+ default: https://tangled.org
971971+ description: AppviewEndpoint is the appview endpoint URL
972972+ type: string
973973+ extraEnv:
974974+ description: ExtraEnv allows adding additional environment variables
975975+ items:
976976+ description: EnvVar represents an environment variable present in
977977+ a Container.
978978+ properties:
979979+ name:
980980+ description: |-
981981+ Name of the environment variable.
982982+ May consist of any printable ASCII characters except '='.
983983+ type: string
984984+ value:
985985+ description: |-
986986+ Variable references $(VAR_NAME) are expanded
987987+ using the previously defined environment variables in the container and
988988+ any service environment variables. If a variable cannot be resolved,
989989+ the reference in the input string will be unchanged. Double $$ are reduced
990990+ to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
991991+ "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
992992+ Escaped references will never be expanded, regardless of whether the variable
993993+ exists or not.
994994+ Defaults to "".
995995+ type: string
996996+ valueFrom:
997997+ description: Source for the environment variable's value. Cannot
998998+ be used if value is not empty.
999999+ properties:
10001000+ configMapKeyRef:
10011001+ description: Selects a key of a ConfigMap.
10021002+ properties:
10031003+ key:
10041004+ description: The key to select.
10051005+ type: string
10061006+ name:
10071007+ default: ""
10081008+ description: |-
10091009+ Name of the referent.
10101010+ This field is effectively required, but due to backwards compatibility is
10111011+ allowed to be empty. Instances of this type with an empty value here are
10121012+ almost certainly wrong.
10131013+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
10141014+ type: string
10151015+ optional:
10161016+ description: Specify whether the ConfigMap or its key
10171017+ must be defined
10181018+ type: boolean
10191019+ required:
10201020+ - key
10211021+ type: object
10221022+ x-kubernetes-map-type: atomic
10231023+ fieldRef:
10241024+ description: |-
10251025+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
10261026+ spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
10271027+ properties:
10281028+ apiVersion:
10291029+ description: Version of the schema the FieldPath is
10301030+ written in terms of, defaults to "v1".
10311031+ type: string
10321032+ fieldPath:
10331033+ description: Path of the field to select in the specified
10341034+ API version.
10351035+ type: string
10361036+ required:
10371037+ - fieldPath
10381038+ type: object
10391039+ x-kubernetes-map-type: atomic
10401040+ fileKeyRef:
10411041+ description: |-
10421042+ FileKeyRef selects a key of the env file.
10431043+ Requires the EnvFiles feature gate to be enabled.
10441044+ properties:
10451045+ key:
10461046+ description: |-
10471047+ The key within the env file. An invalid key will prevent the pod from starting.
10481048+ The keys defined within a source may consist of any printable ASCII characters except '='.
10491049+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
10501050+ type: string
10511051+ optional:
10521052+ default: false
10531053+ description: |-
10541054+ Specify whether the file or its key must be defined. If the file or key
10551055+ does not exist, then the env var is not published.
10561056+ If optional is set to true and the specified key does not exist,
10571057+ the environment variable will not be set in the Pod's containers.
10581058+10591059+ If optional is set to false and the specified key does not exist,
10601060+ an error will be returned during Pod creation.
10611061+ type: boolean
10621062+ path:
10631063+ description: |-
10641064+ The path within the volume from which to select the file.
10651065+ Must be relative and may not contain the '..' path or start with '..'.
10661066+ type: string
10671067+ volumeName:
10681068+ description: The name of the volume mount containing
10691069+ the env file.
10701070+ type: string
10711071+ required:
10721072+ - key
10731073+ - path
10741074+ - volumeName
10751075+ type: object
10761076+ x-kubernetes-map-type: atomic
10771077+ resourceFieldRef:
10781078+ description: |-
10791079+ Selects a resource of the container: only resources limits and requests
10801080+ (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
10811081+ properties:
10821082+ containerName:
10831083+ description: 'Container name: required for volumes,
10841084+ optional for env vars'
10851085+ type: string
10861086+ divisor:
10871087+ anyOf:
10881088+ - type: integer
10891089+ - type: string
10901090+ description: Specifies the output format of the exposed
10911091+ resources, defaults to "1"
10921092+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
10931093+ x-kubernetes-int-or-string: true
10941094+ resource:
10951095+ description: 'Required: resource to select'
10961096+ type: string
10971097+ required:
10981098+ - resource
10991099+ type: object
11001100+ x-kubernetes-map-type: atomic
11011101+ secretKeyRef:
11021102+ description: Selects a key of a secret in the pod's namespace
11031103+ properties:
11041104+ key:
11051105+ description: The key of the secret to select from. Must
11061106+ be a valid secret key.
11071107+ type: string
11081108+ name:
11091109+ default: ""
11101110+ description: |-
11111111+ Name of the referent.
11121112+ This field is effectively required, but due to backwards compatibility is
11131113+ allowed to be empty. Instances of this type with an empty value here are
11141114+ almost certainly wrong.
11151115+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
11161116+ type: string
11171117+ optional:
11181118+ description: Specify whether the Secret or its key must
11191119+ be defined
11201120+ type: boolean
11211121+ required:
11221122+ - key
11231123+ type: object
11241124+ x-kubernetes-map-type: atomic
11251125+ type: object
11261126+ required:
11271127+ - name
11281128+ type: object
11291129+ type: array
11301130+ hostname:
11311131+ description: Hostname is the public hostname for the Knot server (e.g.,
11321132+ knot.example.com)
11331133+ type: string
11341134+ image:
11351135+ default: docker.io/tngl/knot:v1.10.0-alpha
11361136+ description: Image is the container image to use for the Knot server
11371137+ type: string
11381138+ imagePullPolicy:
11391139+ default: IfNotPresent
11401140+ description: ImagePullPolicy defines the pull policy for the container
11411141+ image
11421142+ type: string
11431143+ ingress:
11441144+ description: Ingress configures external access (Kubernetes Ingress)
11451145+ properties:
11461146+ annotations:
11471147+ additionalProperties:
11481148+ type: string
11491149+ description: Annotations to add to the Ingress
11501150+ type: object
11511151+ enabled:
11521152+ description: Enabled enables Ingress creation
11531153+ type: boolean
11541154+ ingressClassName:
11551155+ description: IngressClassName is the IngressClass to use
11561156+ type: string
11571157+ tls:
11581158+ description: TLS configures TLS for the Ingress
11591159+ properties:
11601160+ enabled:
11611161+ description: Enabled enables TLS
11621162+ type: boolean
11631163+ secretName:
11641164+ description: SecretName is the name of the TLS secret
11651165+ type: string
11661166+ type: object
11671167+ type: object
11681168+ nodeSelector:
11691169+ additionalProperties:
11701170+ type: string
11711171+ description: NodeSelector for pod scheduling
11721172+ type: object
11731173+ openshift:
11741174+ description: OpenShift contains OpenShift-specific configuration
11751175+ properties:
11761176+ route:
11771177+ description: Route configures OpenShift Route creation
11781178+ properties:
11791179+ annotations:
11801180+ additionalProperties:
11811181+ type: string
11821182+ description: Annotations to add to the Route
11831183+ type: object
11841184+ enabled:
11851185+ description: Enabled enables Route creation
11861186+ type: boolean
11871187+ tls:
11881188+ description: TLS configures TLS termination for the Route
11891189+ properties:
11901190+ caCertificate:
11911191+ description: CACertificate is the PEM-encoded CA certificate
11921192+ type: string
11931193+ certificate:
11941194+ description: Certificate is the PEM-encoded certificate
11951195+ type: string
11961196+ destinationCACertificate:
11971197+ description: DestinationCACertificate is used for reencrypt
11981198+ termination
11991199+ type: string
12001200+ insecureEdgeTerminationPolicy:
12011201+ default: Redirect
12021202+ description: InsecureEdgeTerminationPolicy specifies behavior
12031203+ for insecure connections
12041204+ enum:
12051205+ - Allow
12061206+ - Redirect
12071207+ - None
12081208+ type: string
12091209+ key:
12101210+ description: Key is the PEM-encoded private key
12111211+ type: string
12121212+ termination:
12131213+ default: edge
12141214+ description: Termination specifies the TLS termination
12151215+ type (edge, passthrough, reencrypt)
12161216+ enum:
12171217+ - edge
12181218+ - passthrough
12191219+ - reencrypt
12201220+ type: string
12211221+ type: object
12221222+ wildcardPolicy:
12231223+ default: None
12241224+ description: WildcardPolicy specifies the wildcard policy
12251225+ (None, Subdomain)
12261226+ type: string
12271227+ type: object
12281228+ scc:
12291229+ description: SCC configures Security Context Constraints
12301230+ properties:
12311231+ allowHostIPC:
12321232+ default: false
12331233+ description: AllowHostIPC allows host IPC namespace
12341234+ type: boolean
12351235+ allowHostNetwork:
12361236+ default: false
12371237+ description: AllowHostNetwork allows host network access
12381238+ type: boolean
12391239+ allowHostPID:
12401240+ default: false
12411241+ description: AllowHostPID allows host PID namespace
12421242+ type: boolean
12431243+ allowHostPorts:
12441244+ default: false
12451245+ description: AllowHostPorts allows host port binding
12461246+ type: boolean
12471247+ allowPrivilegedContainer:
12481248+ default: false
12491249+ description: AllowPrivilegedContainer allows privileged containers
12501250+ type: boolean
12511251+ create:
12521252+ description: Create specifies whether to create a custom SCC
12531253+ type: boolean
12541254+ fsGroup:
12551255+ default: MustRunAs
12561256+ description: FSGroup specifies the fs group strategy
12571257+ type: string
12581258+ name:
12591259+ default: knot-scc
12601260+ description: Name is the name of the SCC to use or create
12611261+ type: string
12621262+ readOnlyRootFilesystem:
12631263+ default: false
12641264+ description: ReadOnlyRootFilesystem requires read-only root
12651265+ filesystem
12661266+ type: boolean
12671267+ runAsUser:
12681268+ default: MustRunAsNonRoot
12691269+ description: RunAsUser specifies the run as user strategy
12701270+ type: string
12711271+ seLinuxContext:
12721272+ default: MustRunAs
12731273+ description: SELinuxContext specifies the SELinux context
12741274+ strategy
12751275+ type: string
12761276+ supplementalGroups:
12771277+ default: RunAsAny
12781278+ description: SupplementalGroups specifies the supplemental
12791279+ groups strategy
12801280+ type: string
12811281+ volumes:
12821282+ description: Volumes specifies allowed volume types
12831283+ items:
12841284+ type: string
12851285+ type: array
12861286+ type: object
12871287+ type: object
12881288+ owner:
12891289+ description: Owner is the DID identifier of the server owner
12901290+ type: string
12911291+ replicas:
12921292+ default: 1
12931293+ description: Replicas is the number of Knot server instances to run
12941294+ format: int32
12951295+ minimum: 1
12961296+ type: integer
12971297+ resources:
12981298+ description: Resources defines compute resource requirements
12991299+ properties:
13001300+ claims:
13011301+ description: |-
13021302+ Claims lists the names of resources, defined in spec.resourceClaims,
13031303+ that are used by this container.
13041304+13051305+ This field depends on the
13061306+ DynamicResourceAllocation feature gate.
13071307+13081308+ This field is immutable. It can only be set for containers.
13091309+ items:
13101310+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
13111311+ properties:
13121312+ name:
13131313+ description: |-
13141314+ Name must match the name of one entry in pod.spec.resourceClaims of
13151315+ the Pod where this field is used. It makes that resource available
13161316+ inside a container.
13171317+ type: string
13181318+ request:
13191319+ description: |-
13201320+ Request is the name chosen for a request in the referenced claim.
13211321+ If empty, everything from the claim is made available, otherwise
13221322+ only the result of this request.
13231323+ type: string
13241324+ required:
13251325+ - name
13261326+ type: object
13271327+ type: array
13281328+ x-kubernetes-list-map-keys:
13291329+ - name
13301330+ x-kubernetes-list-type: map
13311331+ limits:
13321332+ additionalProperties:
13331333+ anyOf:
13341334+ - type: integer
13351335+ - type: string
13361336+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
13371337+ x-kubernetes-int-or-string: true
13381338+ description: |-
13391339+ Limits describes the maximum amount of compute resources allowed.
13401340+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
13411341+ type: object
13421342+ requests:
13431343+ additionalProperties:
13441344+ anyOf:
13451345+ - type: integer
13461346+ - type: string
13471347+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
13481348+ x-kubernetes-int-or-string: true
13491349+ description: |-
13501350+ Requests describes the minimum amount of compute resources required.
13511351+ If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
13521352+ otherwise to an implementation-defined value. Requests cannot exceed Limits.
13531353+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
13541354+ type: object
13551355+ type: object
13561356+ serviceAccountName:
13571357+ description: ServiceAccountName is the name of the ServiceAccount
13581358+ to use
13591359+ type: string
13601360+ ssh:
13611361+ description: SSH configures the SSH server for git operations
13621362+ properties:
13631363+ annotations:
13641364+ additionalProperties:
13651365+ type: string
13661366+ description: Annotations to add to the SSH Service
13671367+ type: object
13681368+ enabled:
13691369+ description: Enabled enables SSH access for git operations
13701370+ type: boolean
13711371+ loadBalancerIP:
13721372+ description: LoadBalancerIP is the static IP for LoadBalancer
13731373+ type services
13741374+ type: string
13751375+ nodePort:
13761376+ description: NodePort is the port to use when ServiceType is NodePort
13771377+ format: int32
13781378+ type: integer
13791379+ port:
13801380+ default: 22
13811381+ description: Port is the SSH port to expose
13821382+ format: int32
13831383+ type: integer
13841384+ serviceType:
13851385+ default: LoadBalancer
13861386+ description: ServiceType is the Kubernetes Service type for SSH
13871387+ type: string
13881388+ type: object
13891389+ storage:
13901390+ description: Storage configures persistent storage for repositories
13911391+ and database
13921392+ properties:
13931393+ dbPath:
13941394+ default: /data/db
13951395+ description: DBPath is the path where the database is stored
13961396+ type: string
13971397+ dbSize:
13981398+ default: 1Gi
13991399+ description: DBSize is the size of the database PVC
14001400+ type: string
14011401+ dbStorageClass:
14021402+ description: DBStorageClass is the StorageClass for database storage
14031403+ type: string
14041404+ repoPath:
14051405+ default: /data/repos
14061406+ description: RepoPath is the path where repositories are stored
14071407+ type: string
14081408+ repoSize:
14091409+ default: 10Gi
14101410+ description: RepoSize is the size of the repository PVC
14111411+ type: string
14121412+ repoStorageClass:
14131413+ description: RepoStorageClass is the StorageClass for repository
14141414+ storage
14151415+ type: string
14161416+ type: object
14171417+ tolerations:
14181418+ description: Tolerations for pod scheduling
14191419+ items:
14201420+ description: |-
14211421+ The pod this Toleration is attached to tolerates any taint that matches
14221422+ the triple <key,value,effect> using the matching operator <operator>.
14231423+ properties:
14241424+ effect:
14251425+ description: |-
14261426+ Effect indicates the taint effect to match. Empty means match all taint effects.
14271427+ When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
14281428+ type: string
14291429+ key:
14301430+ description: |-
14311431+ Key is the taint key that the toleration applies to. Empty means match all taint keys.
14321432+ If the key is empty, operator must be Exists; this combination means to match all values and all keys.
14331433+ type: string
14341434+ operator:
14351435+ description: |-
14361436+ Operator represents a key's relationship to the value.
14371437+ Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
14381438+ Exists is equivalent to wildcard for value, so that a pod can
14391439+ tolerate all taints of a particular category.
14401440+ Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
14411441+ type: string
14421442+ tolerationSeconds:
14431443+ description: |-
14441444+ TolerationSeconds represents the period of time the toleration (which must be
14451445+ of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
14461446+ it is not set, which means tolerate the taint forever (do not evict). Zero and
14471447+ negative values will be treated as 0 (evict immediately) by the system.
14481448+ format: int64
14491449+ type: integer
14501450+ value:
14511451+ description: |-
14521452+ Value is the taint value the toleration matches to.
14531453+ If the operator is Exists, the value should be empty, otherwise just a regular string.
14541454+ type: string
14551455+ type: object
14561456+ type: array
14571457+ required:
14581458+ - hostname
14591459+ - owner
14601460+ type: object
14611461+ status:
14621462+ description: KnotStatus defines the observed state of Knot
14631463+ properties:
14641464+ availableReplicas:
14651465+ description: AvailableReplicas is the number of available replicas
14661466+ format: int32
14671467+ type: integer
14681468+ conditions:
14691469+ description: Conditions represent the latest available observations
14701470+ items:
14711471+ description: Condition contains details for one aspect of the current
14721472+ state of this API Resource.
14731473+ properties:
14741474+ lastTransitionTime:
14751475+ description: |-
14761476+ lastTransitionTime is the last time the condition transitioned from one status to another.
14771477+ This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
14781478+ format: date-time
14791479+ type: string
14801480+ message:
14811481+ description: |-
14821482+ message is a human readable message indicating details about the transition.
14831483+ This may be an empty string.
14841484+ maxLength: 32768
14851485+ type: string
14861486+ observedGeneration:
14871487+ description: |-
14881488+ observedGeneration represents the .metadata.generation that the condition was set based upon.
14891489+ For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
14901490+ with respect to the current state of the instance.
14911491+ format: int64
14921492+ minimum: 0
14931493+ type: integer
14941494+ reason:
14951495+ description: |-
14961496+ reason contains a programmatic identifier indicating the reason for the condition's last transition.
14971497+ Producers of specific condition types may define expected values and meanings for this field,
14981498+ and whether the values are considered a guaranteed API.
14991499+ The value should be a CamelCase string.
15001500+ This field may not be empty.
15011501+ maxLength: 1024
15021502+ minLength: 1
15031503+ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
15041504+ type: string
15051505+ status:
15061506+ description: status of the condition, one of True, False, Unknown.
15071507+ enum:
15081508+ - "True"
15091509+ - "False"
15101510+ - Unknown
15111511+ type: string
15121512+ type:
15131513+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
15141514+ maxLength: 316
15151515+ 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])$
15161516+ type: string
15171517+ required:
15181518+ - lastTransitionTime
15191519+ - message
15201520+ - reason
15211521+ - status
15221522+ - type
15231523+ type: object
15241524+ type: array
15251525+ observedGeneration:
15261526+ description: ObservedGeneration is the most recent generation observed
15271527+ format: int64
15281528+ type: integer
15291529+ phase:
15301530+ description: Phase represents the current phase of the Knot deployment
15311531+ enum:
15321532+ - Pending
15331533+ - Running
15341534+ - Failed
15351535+ - Unknown
15361536+ type: string
15371537+ readyReplicas:
15381538+ description: ReadyReplicas is the number of ready replicas
15391539+ format: int32
15401540+ type: integer
15411541+ sshURL:
15421542+ description: SSHURL is the SSH URL for git operations
15431543+ type: string
15441544+ url:
15451545+ description: URL is the external URL of the Knot server
15461546+ type: string
15471547+ type: object
15481548+ type: object
15491549+ served: true
15501550+ storage: true
15511551+ subresources:
15521552+ status: {}