diff --git a/api/v1beta1/kuadrant_types.go b/api/v1beta1/kuadrant_types.go index 979727cf8..984dc63c5 100644 --- a/api/v1beta1/kuadrant_types.go +++ b/api/v1beta1/kuadrant_types.go @@ -19,6 +19,7 @@ package v1beta1 import ( "github.com/go-logr/logr" "github.com/google/go-cmp/cmp" + authorinov1beta1 "github.com/kuadrant/authorino-operator/api/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/kuadrant/kuadrant-operator/pkg/common" @@ -29,6 +30,17 @@ import ( // KuadrantSpec defines the desired state of Kuadrant type KuadrantSpec struct { + Authorino *AuthorinoSpec `json:"authorino,omitempty"` +} + +type AuthorinoSpec struct { + EvaluatorCacheSize *int `json:"evaluatorCacheSize,omitempty"` + Listener *authorinov1beta1.Listener `json:"listener,omitempty"` + Metrics *authorinov1beta1.Metrics `json:"metrics,omitempty"` + OIDCServer *authorinov1beta1.OIDCServer `json:"oidcServer,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + Tracing *authorinov1beta1.Tracing `json:"tracing,omitempty"` + Volumes *authorinov1beta1.VolumesSpec `json:"volumes,omitempty"` } // KuadrantStatus defines the observed state of Kuadrant diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index ce406a60e..9103c1e38 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -21,16 +21,67 @@ limitations under the License. package v1beta1 import ( + apiv1beta1 "github.com/kuadrant/authorino-operator/api/v1beta1" "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthorinoSpec) DeepCopyInto(out *AuthorinoSpec) { + *out = *in + if in.EvaluatorCacheSize != nil { + in, out := &in.EvaluatorCacheSize, &out.EvaluatorCacheSize + *out = new(int) + **out = **in + } + if in.Listener != nil { + in, out := &in.Listener, &out.Listener + *out = new(apiv1beta1.Listener) + (*in).DeepCopyInto(*out) + } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(apiv1beta1.Metrics) + (*in).DeepCopyInto(*out) + } + if in.OIDCServer != nil { + in, out := &in.OIDCServer, &out.OIDCServer + *out = new(apiv1beta1.OIDCServer) + (*in).DeepCopyInto(*out) + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Tracing != nil { + in, out := &in.Tracing, &out.Tracing + *out = new(apiv1beta1.Tracing) + (*in).DeepCopyInto(*out) + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = new(apiv1beta1.VolumesSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorinoSpec. +func (in *AuthorinoSpec) DeepCopy() *AuthorinoSpec { + if in == nil { + return nil + } + out := new(AuthorinoSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Kuadrant) DeepCopyInto(out *Kuadrant) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) } @@ -87,6 +138,11 @@ func (in *KuadrantList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KuadrantSpec) DeepCopyInto(out *KuadrantSpec) { *out = *in + if in.Authorino != nil { + in, out := &in.Authorino, &out.Authorino + *out = new(AuthorinoSpec) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KuadrantSpec. diff --git a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml index b4571f35f..0842ea69d 100644 --- a/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-operator.clusterserviceversion.yaml @@ -131,7 +131,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/kuadrant-operator:latest - createdAt: "2023-12-12T12:34:15Z" + createdAt: "2023-11-30T14:57:23Z" operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/Kuadrant/kuadrant-operator diff --git a/bundle/manifests/kuadrant.io_kuadrants.yaml b/bundle/manifests/kuadrant.io_kuadrants.yaml index f07547080..5db2618c0 100644 --- a/bundle/manifests/kuadrant.io_kuadrants.yaml +++ b/bundle/manifests/kuadrant.io_kuadrants.yaml @@ -44,6 +44,170 @@ spec: type: object spec: description: KuadrantSpec defines the desired state of Kuadrant + properties: + authorino: + properties: + evaluatorCacheSize: + type: integer + listener: + properties: + maxHttpRequestBodySize: + description: Maximum payload (request body) size for the auth + service (HTTP interface), in bytes. + type: integer + port: + description: 'Port number of the GRPC interface. DEPRECATED: + use ''ports.grpc'' instead.' + format: int32 + type: integer + ports: + description: Port numbers of the GRPC and HTTP auth interfaces. + properties: + grpc: + format: int32 + type: integer + http: + format: int32 + type: integer + type: object + timeout: + description: Timeout of the auth service (GRPC and HTTP interfaces), + in milliseconds. + type: integer + tls: + description: TLS configuration of the auth service (GRPC and + HTTP interfaces). + properties: + certSecretRef: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + x-kubernetes-map-type: atomic + enabled: + type: boolean + type: object + required: + - tls + type: object + metrics: + properties: + deep: + type: boolean + port: + format: int32 + type: integer + type: object + oidcServer: + properties: + port: + format: int32 + type: integer + tls: + properties: + certSecretRef: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + x-kubernetes-map-type: atomic + enabled: + type: boolean + type: object + required: + - tls + type: object + replicas: + format: int32 + type: integer + tracing: + properties: + endpoint: + type: string + tags: + additionalProperties: + type: string + type: object + required: + - endpoint + type: object + volumes: + properties: + defaultMode: + description: Permissions mode. + format: int32 + type: integer + items: + items: + properties: + configMaps: + description: Allow multiple configmaps to mount to the + same directory + items: + type: string + type: array + items: + description: Mount details + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. If not specified, the volume + defaultMode will be used. This might be in conflict + with other options that affect the file mode, + like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the + file to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + mountPath: + description: An absolute path where to mount it + type: string + name: + description: Volume name + type: string + secrets: + description: Secret mount + items: + type: string + type: array + required: + - mountPath + type: object + type: array + type: object + type: object type: object status: description: KuadrantStatus defines the observed state of Kuadrant diff --git a/config/crd/bases/kuadrant.io_kuadrants.yaml b/config/crd/bases/kuadrant.io_kuadrants.yaml index 08b353a76..5aeee659e 100644 --- a/config/crd/bases/kuadrant.io_kuadrants.yaml +++ b/config/crd/bases/kuadrant.io_kuadrants.yaml @@ -42,6 +42,170 @@ spec: type: object spec: description: KuadrantSpec defines the desired state of Kuadrant + properties: + authorino: + properties: + evaluatorCacheSize: + type: integer + listener: + properties: + maxHttpRequestBodySize: + description: Maximum payload (request body) size for the auth + service (HTTP interface), in bytes. + type: integer + port: + description: 'Port number of the GRPC interface. DEPRECATED: + use ''ports.grpc'' instead.' + format: int32 + type: integer + ports: + description: Port numbers of the GRPC and HTTP auth interfaces. + properties: + grpc: + format: int32 + type: integer + http: + format: int32 + type: integer + type: object + timeout: + description: Timeout of the auth service (GRPC and HTTP interfaces), + in milliseconds. + type: integer + tls: + description: TLS configuration of the auth service (GRPC and + HTTP interfaces). + properties: + certSecretRef: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + x-kubernetes-map-type: atomic + enabled: + type: boolean + type: object + required: + - tls + type: object + metrics: + properties: + deep: + type: boolean + port: + format: int32 + type: integer + type: object + oidcServer: + properties: + port: + format: int32 + type: integer + tls: + properties: + certSecretRef: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + x-kubernetes-map-type: atomic + enabled: + type: boolean + type: object + required: + - tls + type: object + replicas: + format: int32 + type: integer + tracing: + properties: + endpoint: + type: string + tags: + additionalProperties: + type: string + type: object + required: + - endpoint + type: object + volumes: + properties: + defaultMode: + description: Permissions mode. + format: int32 + type: integer + items: + items: + properties: + configMaps: + description: Allow multiple configmaps to mount to the + same directory + items: + type: string + type: array + items: + description: Mount details + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. If not specified, the volume + defaultMode will be used. This might be in conflict + with other options that affect the file mode, + like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the + file to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + mountPath: + description: An absolute path where to mount it + type: string + name: + description: Volume name + type: string + secrets: + description: Secret mount + items: + type: string + type: array + required: + - mountPath + type: object + type: array + type: object + type: object type: object status: description: KuadrantStatus defines the observed state of Kuadrant