From a689a4f75fdc558fba189a5949d0f5f37b90caba Mon Sep 17 00:00:00 2001 From: Mateo Rojas Date: Tue, 25 Jun 2024 14:53:31 -0500 Subject: [PATCH] Updates crds to support version 0.10.0 of the Operator (#10) * Updates crds * Sets chart version to 0.10.0 --- charts/lh-operator/Chart.yaml | 4 +- .../lhcanaryaggregators.littlehorse.io-v1.yml | 1 + .../lhcanarymetronomes.littlehorse.io-v1.yml | 119 ++++++++++++++++++ .../crds/lhclusters.littlehorse.io-v1.yml | 54 ++++++++ .../crds/lhdashboards.littlehorse.io-v1.yml | 87 +++++++++++++ .../crds/lhprincipals.littlehorse.io-v1.yml | 18 +++ .../crds/lhtenants.littlehorse.io-v1.yml | 18 +++ 7 files changed, 299 insertions(+), 2 deletions(-) create mode 100644 charts/lh-operator/crds/lhcanarymetronomes.littlehorse.io-v1.yml diff --git a/charts/lh-operator/Chart.yaml b/charts/lh-operator/Chart.yaml index 165d7ab..44b5de1 100644 --- a/charts/lh-operator/Chart.yaml +++ b/charts/lh-operator/Chart.yaml @@ -17,10 +17,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.9.2 +version: 0.10.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.9.2" +appVersion: "0.10.0" diff --git a/charts/lh-operator/crds/lhcanaryaggregators.littlehorse.io-v1.yml b/charts/lh-operator/crds/lhcanaryaggregators.littlehorse.io-v1.yml index b32f342..5cba67a 100644 --- a/charts/lh-operator/crds/lhcanaryaggregators.littlehorse.io-v1.yml +++ b/charts/lh-operator/crds/lhcanaryaggregators.littlehorse.io-v1.yml @@ -86,6 +86,7 @@ spec: type: object podMonitor: description: Configures `PodMonitor` resources for the Aggregator + nullable: true properties: podMonitorLabels: additionalProperties: diff --git a/charts/lh-operator/crds/lhcanarymetronomes.littlehorse.io-v1.yml b/charts/lh-operator/crds/lhcanarymetronomes.littlehorse.io-v1.yml new file mode 100644 index 0000000..0ed4beb --- /dev/null +++ b/charts/lh-operator/crds/lhcanarymetronomes.littlehorse.io-v1.yml @@ -0,0 +1,119 @@ +# Generated by Fabric8 CRDGenerator, manual edits might get overwritten! +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: lhcanarymetronomes.littlehorse.io +spec: + group: littlehorse.io + names: + kind: LHCanaryMetronome + plural: lhcanarymetronomes + shortNames: + - lhcm + singular: lhcanarymetronome + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.problems + name: PROBLEMS + priority: 0 + type: string + name: v1 + schema: + openAPIV3Schema: + properties: + spec: + properties: + additionalConfigs: + additionalProperties: + type: string + description: Configurations to pass to the LHCanaryMetronome. + type: object + aggregatorRef: + description: Specifies the LHCanaryAggregator for this Metronome + properties: + name: + description: Name of the LHCanaryAggregator that should aggregate + beats from this Metronome. + type: string + type: object + defaultLabels: + additionalProperties: + type: string + description: Labels to put on all created resources + type: object + image: + default: ghcr.io/littlehorse-enterprises/littlehorse/lh-canary:master + description: The docker image for the LH Canary + type: string + imagePullPolicy: + description: ImagePullPolicy for the LH Canary + enum: + - Always + - IfNotPresent + - Never + type: string + lhCluster: + description: Specifies the LittleHorse Cluster to monitor + properties: + externalClusterRef: + description: Specifies a LittleHorse Cluster not managed by the + same Operator as this Metronome + properties: + apiHost: + description: The API Host of the LH Cluster to monitor + type: string + apiPort: + description: The API Port of the LH Cluster to monitor + type: integer + listenerName: + description: The Listener Name to connect to + nullable: true + type: string + tenantId: + default: default + description: The Tenant to use + type: string + required: + - apiHost + - apiPort + type: object + type: object + replicas: + description: Number of metronome replicas to deploy + type: integer + storage: + description: Storage Configuration for the Metronome + properties: + storageClassName: + description: The name of the storageclass with which to provision + storage for the server + type: string + volumeSize: + anyOf: + - type: integer + - type: string + description: The size of the persistent volume. + x-kubernetes-int-or-string: true + required: + - storageClassName + - volumeSize + type: object + required: + - aggregatorRef + - lhCluster + - storage + - replicas + type: object + status: + properties: + observedGeneration: + type: integer + problems: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/charts/lh-operator/crds/lhclusters.littlehorse.io-v1.yml b/charts/lh-operator/crds/lhclusters.littlehorse.io-v1.yml index 8bf8594..a212405 100644 --- a/charts/lh-operator/crds/lhclusters.littlehorse.io-v1.yml +++ b/charts/lh-operator/crds/lhclusters.littlehorse.io-v1.yml @@ -40,10 +40,62 @@ spec: properties: spec: properties: + dashboard: + description: Specifies to create Dashboard resources for the cluster + nullable: true + properties: + image: + description: Dashboard image for the pod. If not provided it defaults + to ghcr.io/littlehorse-enterprises/littlehorse/lh-dashboard + with either latest or the server version if spec.server.version + is set + nullable: true + type: string + imagePullPolicy: + description: Image pull policy for the dashboard container + nullable: true + type: string + replicas: + description: Number of dashboard pod replicas. Defaults to 1 + minimum: 1.0 + nullable: true + type: integer + tls: + description: Image pull policy for the dashboard container + nullable: true + properties: + secretRef: + description: Secret with a tls.crt for the cert and a tls.key + entry for the key. If tls.cert and tls.key are not present + on the secret the deployment will fail + properties: + name: + type: string + required: + - name + type: object + required: + - secretRef + type: object + type: object defaultLabels: additionalProperties: type: string type: object + internalCommsIssuer: + description: Specifies cert-manager issuer to be used for internal + communication certificates + nullable: true + properties: + kind: + description: Kind of the CertManager Issuer or ClusterIssuer + type: string + name: + description: Name of the CertManager Issuer or ClusterIssuer + type: string + required: + - name + type: object kafka: properties: clusterPartitions: @@ -422,6 +474,8 @@ spec: name: description: Name of the CertManager Issuer or ClusterIssuer type: string + required: + - name type: object secretRef: properties: diff --git a/charts/lh-operator/crds/lhdashboards.littlehorse.io-v1.yml b/charts/lh-operator/crds/lhdashboards.littlehorse.io-v1.yml index 4987aa7..04c4d00 100644 --- a/charts/lh-operator/crds/lhdashboards.littlehorse.io-v1.yml +++ b/charts/lh-operator/crds/lhdashboards.littlehorse.io-v1.yml @@ -26,10 +26,27 @@ spec: properties: api: properties: + caCert: + properties: + secretRef: + properties: + name: + type: string + required: + - name + type: object + required: + - secretRef + type: object host: type: string port: type: integer + protocol: + enum: + - PLAINTEXT + - TLS + type: string required: - port - host @@ -150,6 +167,73 @@ spec: type: string imagePullPolicy: type: string + infrastructure: + properties: + ingress: + description: Specifies to create Ingress resources for the dashboard + nullable: true + properties: + annotations: + additionalProperties: + type: string + description: Annotations to put in the Ingress resource + nullable: true + type: object + hostname: + description: The host to be used in the Ingress resource rule + type: string + ingressClassName: + description: The name of the Ingress class to be used in the + ingressClassName property of the Ingress resource + type: string + required: + - ingressClassName + - hostname + type: object + tlsRoute: + description: Specifies to create TLSRoute according to the Gateway + API. Requires a listener with the 'Passthrough' TLS mode enabled. + nullable: true + properties: + annotations: + additionalProperties: + type: string + description: Optional additional annotations to apply to the + generated TLSRoute. + type: object + gatewayRef: + description: Specifies the Gateway to create routes for. + properties: + name: + description: The name of the Gateway. + type: string + namespace: + description: The namespace of the Gateway to attach to. + Defaults to current namespace. + nullable: true + type: string + sectionName: + description: "The sectionName, usually a port name, of\ + \ the referenced Gateway to attach to." + type: string + required: + - name + - sectionName + type: object + hostname: + description: The host to be added to the TLSRoute hostnames + type: string + labels: + additionalProperties: + type: string + description: Optional additional labels to apply to the generated + TLSRoute. + type: object + required: + - gatewayRef + - hostname + type: object + type: object replicas: minimum: 1.0 type: integer @@ -180,6 +264,9 @@ spec: tls: properties: secretRef: + description: Secret with a tls.crt for the cert and a tls.key + entry for the key. If tls.cert and tls.key are not present on + the secret the deployment will fail properties: name: type: string diff --git a/charts/lh-operator/crds/lhprincipals.littlehorse.io-v1.yml b/charts/lh-operator/crds/lhprincipals.littlehorse.io-v1.yml index 9cb395b..7fc84b2 100644 --- a/charts/lh-operator/crds/lhprincipals.littlehorse.io-v1.yml +++ b/charts/lh-operator/crds/lhprincipals.littlehorse.io-v1.yml @@ -50,6 +50,22 @@ spec: type: string type: object type: array + lhCluster: + description: Specifies the LittleHorse Cluster + properties: + lhClusterRef: + description: Specifies a LittleHorse Cluster managed by the same + Operator + properties: + name: + description: Specifies a the name of the LittleHorse Cluster + type: string + required: + - name + type: object + required: + - lhClusterRef + type: object perTenantACLs: description: Allows assigning permissions to the `Principal` to access specific `Tenant`s inside the LH Server. @@ -75,6 +91,8 @@ spec: \ Server. If null, uses the LHPrincipal name." nullable: true type: string + required: + - lhCluster type: object status: properties: diff --git a/charts/lh-operator/crds/lhtenants.littlehorse.io-v1.yml b/charts/lh-operator/crds/lhtenants.littlehorse.io-v1.yml index 4917c57..f58b4fc 100644 --- a/charts/lh-operator/crds/lhtenants.littlehorse.io-v1.yml +++ b/charts/lh-operator/crds/lhtenants.littlehorse.io-v1.yml @@ -36,11 +36,29 @@ spec: properties: spec: properties: + lhCluster: + description: Specifies the LittleHorse Cluster + properties: + lhClusterRef: + description: Specifies a LittleHorse Cluster managed by the same + Operator + properties: + name: + description: Specifies a the name of the LittleHorse Cluster + type: string + required: + - name + type: object + required: + - lhClusterRef + type: object tenantName: description: "Name of the `Tenant` in LittleHorse. If not provided,\ \ inferred from LHTenant name." nullable: true type: string + required: + - lhCluster type: object status: properties: