diff --git a/.github/workflows/push-charts.yaml b/.github/workflows/push-charts.yaml index bd8e365e6..e75ab068d 100644 --- a/.github/workflows/push-charts.yaml +++ b/.github/workflows/push-charts.yaml @@ -27,17 +27,17 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Get all changed dist/chart Chart.yaml files - id: changed-chart-yaml-files-dist + - name: Get all changed helm/library/cortex Chart.yaml files + id: changed-chart-yaml-files-core uses: tj-actions/changed-files@v47 with: files: | - dist/chart/Chart.yaml - - name: Push dist charts to registry - if: steps.changed-chart-yaml-files-dist.outputs.all_changed_files != '' + helm/library/cortex/Chart.yaml + - name: Push cortex core charts to registry + if: steps.changed-chart-yaml-files-core.outputs.all_changed_files != '' shell: bash env: - ALL_CHANGED_FILES: ${{ steps.changed-chart-yaml-files-dist.outputs.all_changed_files }} + ALL_CHANGED_FILES: ${{ steps.changed-chart-yaml-files-core.outputs.all_changed_files }} run: | for CHART_FILE in ${ALL_CHANGED_FILES}; do CHART_DIR=$(dirname $CHART_FILE) diff --git a/.github/workflows/update-appversion.yml b/.github/workflows/update-appversion.yml index 7c53dbf18..cc5ccdc9f 100644 --- a/.github/workflows/update-appversion.yml +++ b/.github/workflows/update-appversion.yml @@ -44,13 +44,13 @@ jobs: git commit -m "Bump cortex-postgres chart appVersions to ${{ steps.vars.outputs.sha }} [skip ci]" || echo "No changes to commit" git push origin HEAD:main - - name: Update appVersion in dist/chart/Chart.yaml + - name: Update appVersion in helm/library/cortex/Chart.yaml run: | - sed -i 's/^\([ ]*appVersion:[ ]*\).*/\1"${{ steps.vars.outputs.sha }}"/' dist/chart/Chart.yaml + sed -i 's/^\([ ]*appVersion:[ ]*\).*/\1"${{ steps.vars.outputs.sha }}"/' helm/library/cortex/Chart.yaml - name: Commit and push changes for cortex run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add dist/chart/Chart.yaml + git add helm/library/cortex/Chart.yaml git commit -m "Bump cortex chart appVersions to ${{ steps.vars.outputs.sha }} [skip ci]" || echo "No changes to commit" git push origin HEAD:main diff --git a/Makefile b/Makefile index 850ec1970..a345bc2c0 100644 --- a/Makefile +++ b/Makefile @@ -1,75 +1,56 @@ +# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) +ifeq (,$(shell go env GOBIN)) +GOBIN=$(shell go env GOPATH)/bin +else +GOBIN=$(shell go env GOBIN) +endif + .PHONY: all -all: build +all: lint test crds deepcopy + +.PHONY: help +help: ## Display this help. + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) -.PHONY: manifests -manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases +.PHONY: lint +lint: golangci-lint ## Run golangci-lint linter + "$(GOLANGCI_LINT)" run -.PHONY: generate -generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - $(CONTROLLER_GEN) crd:allowDangerousTypes=true object:headerFile="hack/boilerplate.go.txt" paths="./..." +.PHONY: lint-fix +lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes + "$(GOLANGCI_LINT)" run --fix -.PHONY: dekustomize -dekustomize: - @echo "Backing up stuff that shouldn't be overridden by kubebuilder-helm..." - @TEMP_DIR=$$(mktemp -d); \ - if [ -d "dist/chart/templates/rbac" ]; then \ - cp -r dist/chart/templates/rbac "$$TEMP_DIR/rbac"; \ - fi; \ - if [ -d "dist/chart/templates/prometheus" ]; then \ - cp -r dist/chart/templates/prometheus "$$TEMP_DIR/prometheus"; \ - fi; \ - if [ -d "dist/chart/templates/metrics" ]; then \ - cp -r dist/chart/templates/metrics "$$TEMP_DIR/metrics"; \ - fi; \ - if [ -d ".github" ]; then \ - cp -r .github "$$TEMP_DIR/github"; \ - fi; \ - echo "Generating helm chart..."; \ - kubebuilder edit --plugins=helm/v1-alpha; \ - echo "Restoring stuff that shouldn't be overridden by kubebuilder-helm..."; \ - if [ -d "$$TEMP_DIR/rbac" ]; then \ - rm -rf dist/chart/templates/rbac; \ - cp -r "$$TEMP_DIR/rbac" dist/chart/templates/rbac; \ - fi; \ - if [ -d "$$TEMP_DIR/prometheus" ]; then \ - rm -rf dist/chart/templates/prometheus; \ - cp -r "$$TEMP_DIR/prometheus" dist/chart/templates/prometheus; \ - fi; \ - if [ -d "$$TEMP_DIR/metrics" ]; then \ - rm -rf dist/chart/templates/metrics; \ - cp -r "$$TEMP_DIR/metrics" dist/chart/templates/metrics; \ - fi; \ - if [ -d "$$TEMP_DIR/github" ]; then \ - rm -rf .github; \ - cp -r "$$TEMP_DIR/github" .github; \ - fi; \ - rm -rf "$$TEMP_DIR"; \ - echo "Directories restored successfully." +.PHONY: test +test: ## Run all tests. + go test ./... -##@ Build +.PHONY: crds +crds: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. + $(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true webhook paths="./..." output:crd:artifacts:config=helm/library/cortex/files/crds -.PHONY: build -build: manifests generate dekustomize +.PHONY: deepcopy +deepcopy: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. + $(CONTROLLER_GEN) crd:allowDangerousTypes=true object:headerFile="hack/boilerplate.go.txt" paths="./..." output:crd:artifacts:config=helm/library/cortex/files/crds LOCALBIN ?= $(shell pwd)/bin $(LOCALBIN): mkdir -p $(LOCALBIN) + CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen +GOLANGCI_LINT = $(LOCALBIN)/golangci-lint -CONTROLLER_TOOLS_VERSION ?= v0.17.2 +CONTROLLER_TOOLS_VERSION ?= v0.20.0 +GOLANGCI_LINT_VERSION ?= v2.8.0 .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,$(CONTROLLER_TOOLS_VERSION)) -# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) -ifeq (,$(shell go env GOBIN)) -GOBIN=$(shell go env GOPATH)/bin -else -GOBIN=$(shell go env GOBIN) -endif +.PHONY: golangci-lint +golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary. +$(GOLANGCI_LINT): $(LOCALBIN) + $(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) # go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist # $1 - target path with name of binary @@ -86,6 +67,3 @@ mv $(1) $(1)-$(3) ;\ } ;\ ln -sf $(1)-$(3) $(1) endef - -lint: - golangci-lint run --config .golangci.yaml diff --git a/Tiltfile b/Tiltfile index 46c74f9e5..0b13f7195 100644 --- a/Tiltfile +++ b/Tiltfile @@ -40,7 +40,7 @@ docker_build('ghcr.io/cobaltcore-dev/cortex', '.', dockerfile='Dockerfile', only=['internal/', 'cmd/', 'api/', 'pkg', 'go.mod', 'go.sum', 'Dockerfile'], ) -local('sh helm/sync.sh dist/chart') +local('sh helm/sync.sh helm/library/cortex') ########### Cortex Bundles docker_build('ghcr.io/cobaltcore-dev/cortex-postgres', 'postgres') @@ -58,27 +58,27 @@ bundle_charts = [ ] dep_charts = { 'cortex-crds': [ - ('dist/chart', 'cortex'), + ('helm/library/cortex', 'cortex'), ], 'cortex-nova': [ ('helm/library/cortex-postgres', 'cortex-postgres'), - ('dist/chart', 'cortex'), + ('helm/library/cortex', 'cortex'), ], 'cortex-manila': [ ('helm/library/cortex-postgres', 'cortex-postgres'), - ('dist/chart', 'cortex'), + ('helm/library/cortex', 'cortex'), ], 'cortex-cinder': [ ('helm/library/cortex-postgres', 'cortex-postgres'), - ('dist/chart', 'cortex'), + ('helm/library/cortex', 'cortex'), ], 'cortex-ironcore': [ ('helm/library/cortex-postgres', 'cortex-postgres'), - ('dist/chart', 'cortex'), + ('helm/library/cortex', 'cortex'), ], 'cortex-pods': [ ('helm/library/cortex-postgres', 'cortex-postgres'), - ('dist/chart', 'cortex'), + ('helm/library/cortex', 'cortex'), ], } diff --git a/config/crd/bases/cortex.cloud_deschedulings.yaml b/config/crd/bases/cortex.cloud_deschedulings.yaml deleted file mode 100644 index f3104a0a1..000000000 --- a/config/crd/bases/cortex.cloud_deschedulings.yaml +++ /dev/null @@ -1,150 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: deschedulings.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Descheduling - listKind: DeschedulingList - plural: deschedulings - singular: descheduling - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.prevHost - name: Previous Host - type: string - - jsonPath: .status.newHost - name: New Host - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.reason - name: Reason(s) - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Descheduling is the Schema for the deschedulings API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Descheduling - properties: - prevHost: - description: The name of the compute host from which the virtual machine - should be descheduled. - type: string - prevHostType: - description: The type of host from which the virtual machine should - be descheduled. - type: string - reason: - description: The human-readable reason why the VM should be descheduled. - type: string - ref: - description: A reference to the virtual machine that should be descheduled. - type: string - refType: - description: The type of reference used to identify the virtual machine. - type: string - type: object - status: - description: status defines the observed state of Descheduling - properties: - conditions: - description: The current status conditions of the descheduling. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - newHost: - description: The name of the compute host where the VM was rescheduled - to. - type: string - newHostType: - description: The type of host where the VM was rescheduled to. - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/cortex.cloud_knowledges.yaml b/config/crd/bases/cortex.cloud_knowledges.yaml deleted file mode 100644 index 657b2de36..000000000 --- a/config/crd/bases/cortex.cloud_knowledges.yaml +++ /dev/null @@ -1,271 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: knowledges.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Knowledge - listKind: KnowledgeList - plural: knowledges - singular: knowledge - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .status.lastExtracted - name: Extracted - type: date - - jsonPath: .spec.recency - name: Recency - type: string - - jsonPath: .status.rawLength - name: Features - type: integer - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Knowledge is the Schema for the knowledges API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Knowledge - properties: - dependencies: - description: Dependencies required for extracting this knowledge. - properties: - datasources: - description: |- - Datasources required for extracting this knowledge. - If provided, all datasources must have the same database secret reference - so the knowledge can be joined across multiple database tables. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - knowledges: - description: Other knowledges this knowledge depends on. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - description: - description: A human-readable description of the knowledge to be extracted. - type: string - extractor: - description: The feature extractor to use for extracting this knowledge. - properties: - config: - description: Additional configuration for the extractor. - type: object - x-kubernetes-preserve-unknown-fields: true - name: - description: The name of the extractor. - type: string - type: object - recency: - default: 60s - description: |- - The desired recency of this knowledge, i.e. how old it can be until - it needs to be re-extracted. - type: string - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this knowledge - is used (e.g., nova, cinder, manila). - type: string - required: - - recency - - schedulingDomain - type: object - status: - description: status defines the observed state of Knowledge - properties: - conditions: - description: The current status conditions of the knowledge. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - lastExtracted: - description: When the knowledge was last successfully extracted. - format: date-time - type: string - raw: - description: The raw data behind the extracted knowledge, e.g. a list - of features. - type: object - x-kubernetes-preserve-unknown-fields: true - rawLength: - description: The number of features extracted, or 1 if the knowledge - is not a list. - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/cortex.cloud_kpis.yaml b/config/crd/bases/cortex.cloud_kpis.yaml deleted file mode 100644 index a872bc1ed..000000000 --- a/config/crd/bases/cortex.cloud_kpis.yaml +++ /dev/null @@ -1,259 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: kpis.cortex.cloud -spec: - group: cortex.cloud - names: - kind: KPI - listKind: KPIList - plural: kpis - singular: kpi - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .status.ready - name: Ready - type: boolean - - jsonPath: .status.dependenciesReadyFrac - name: Dependencies - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KPI is the Schema for the deschedulings API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of KPI - properties: - dependencies: - description: Dependencies required for extracting this kpi. - properties: - datasources: - description: Datasources required for extracting this kpi. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - knowledges: - description: Knowledges this kpi depends on. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - description: - description: |- - Additional description of the kpi which helps understand its purpose - and decisions made by it. - type: string - impl: - description: The name of the kpi in the cortex implementation. - type: string - opts: - description: Additional configuration for the extractor that can be - used - type: object - x-kubernetes-preserve-unknown-fields: true - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this kpi - is used (e.g., nova, cinder, manila). - type: string - required: - - impl - - schedulingDomain - type: object - status: - description: status defines the observed state of KPI - properties: - conditions: - description: The current status conditions of the kpi. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - dependenciesReadyFrac: - description: |- - "ReadyDependencies / TotalDependencies ready" as a human-readable string - or "ready" if there are no dependencies configured. - type: string - readyDependencies: - description: How many dependencies have been reconciled. - type: integer - totalDependencies: - description: Total number of dependencies configured. - type: integer - required: - - readyDependencies - - totalDependencies - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/cortex.cloud_pipelines.yaml b/config/crd/bases/cortex.cloud_pipelines.yaml deleted file mode 100644 index c86d2864d..000000000 --- a/config/crd/bases/cortex.cloud_pipelines.yaml +++ /dev/null @@ -1,453 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: pipelines.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Pipeline - listKind: PipelineList - plural: pipelines - singular: pipeline - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .spec.type - name: Type - type: string - - jsonPath: .status.conditions[?(@.type=='AllStepsReady')].status - name: All Steps Ready - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Pipeline Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Pipeline is the Schema for the decisions API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Pipeline - properties: - createDecisions: - default: false - description: |- - If this pipeline should create decision objects. - When this is false, the pipeline will still process requests. - type: boolean - description: - description: An optional description of the pipeline, helping understand - its purpose. - type: string - detectors: - description: |- - Ordered list of detectors to apply in a descheduling pipeline. - - This attribute is set only if the pipeline type is detector. - Detectors find candidates for descheduling (migration off current host). - These detectors are run after weighers are applied. - items: - properties: - description: - description: |- - Additional description of the step which helps understand its purpose - and decisions made by it. - type: string - name: - description: |- - The name of the scheduler step in the cortex implementation. - Must match to a step implemented by the pipeline controller. - type: string - params: - description: Additional configuration for the step that can - be used - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - filters: - description: |- - Ordered list of filters to apply in a scheduling pipeline. - - This attribute is set only if the pipeline type is filter-weigher. - Filters remove host candidates from an initial set, leaving - valid candidates. Filters are run before weighers are applied. - items: - properties: - description: - description: |- - Additional description of the step which helps understand its purpose - and decisions made by it. - type: string - name: - description: |- - The name of the scheduler step in the cortex implementation. - Must match to a step implemented by the pipeline controller. - type: string - params: - description: Additional configuration for the step that can - be used - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this pipeline - is used (e.g., nova, cinder, manila). - type: string - type: - description: |- - The type of the pipeline, used to differentiate between - filter-weigher and detector pipelines within the same - scheduling domain. - - If the type is filter-weigher, the filter and weigher attributes - must be set. If the type is detector, the detectors attribute - must be set. - enum: - - filter-weigher - - detector - type: string - weighers: - description: |- - Ordered list of weighers to apply in a scheduling pipeline. - - This attribute is set only if the pipeline type is filter-weigher. - These weighers are run after filters are applied. - items: - properties: - description: - description: |- - Additional description of the step which helps understand its purpose - and decisions made by it. - type: string - multiplier: - description: |- - Optional multiplier to apply to the step's output. - This can be used to increase or decrease the weight of a step - relative to other steps in the same pipeline. - type: number - name: - description: |- - The name of the scheduler step in the cortex implementation. - Must match to a step implemented by the pipeline controller. - type: string - params: - description: Additional configuration for the step that can - be used - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - required: - - schedulingDomain - - type - type: object - status: - description: status defines the observed state of Pipeline - properties: - conditions: - description: The current status conditions of the pipeline. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - detectors: - description: List of statuses for each detector in the pipeline. - items: - properties: - conditions: - description: The current status conditions of the detector. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - name: - description: The name of the detector. - type: string - required: - - name - type: object - type: array - filters: - description: List of statuses for each filter in the pipeline. - items: - properties: - conditions: - description: The current status conditions of the filter. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - name: - description: The name of the filter. - type: string - required: - - name - type: object - type: array - weighers: - description: List of statuses for each weigher in the pipeline. - items: - properties: - conditions: - description: The current status conditions of the weigher. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - name: - description: The name of the weigher. - type: string - required: - - name - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/cortex.cloud_reservations.yaml b/config/crd/bases/cortex.cloud_reservations.yaml deleted file mode 100644 index cc3dcd116..000000000 --- a/config/crd/bases/cortex.cloud_reservations.yaml +++ /dev/null @@ -1,165 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: reservations.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Reservation - listKind: ReservationList - plural: reservations - singular: reservation - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.host - name: Host - type: string - - jsonPath: .status.phase - name: Phase - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Reservation is the Schema for the reservations API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Reservation - properties: - creator: - description: |- - A remark that can be used to identify the creator of the reservation. - This can be used to clean up reservations synced from external systems - without touching reservations created manually or by other systems. - type: string - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Resources requested to reserve for this instance. - type: object - scheduler: - description: Specification of the scheduler that will handle the reservation. - properties: - cortexNova: - description: |- - If the type of scheduler is cortex-nova, this field will contain additional - information used by cortex-nova to place the instance. - properties: - domainID: - description: The domain ID to reserve for. - type: string - flavorExtraSpecs: - additionalProperties: - type: string - description: Extra specifications relevant for initial placement - of the instance. - type: object - flavorName: - description: The flavor name of the instance to reserve. - type: string - projectID: - description: The project ID to reserve for. - type: string - type: object - type: object - type: object - status: - description: status defines the observed state of Reservation - properties: - conditions: - description: The current status conditions of the reservation. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - host: - description: The name of the compute host that was allocated. - type: string - phase: - description: The current phase of the reservation. - type: string - required: - - host - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/cortex.cloud_datasources.yaml b/config/crd/cortex.cloud_datasources.yaml deleted file mode 100644 index 99cd9b994..000000000 --- a/config/crd/cortex.cloud_datasources.yaml +++ /dev/null @@ -1,357 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: datasources.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Datasource - listKind: DatasourceList - plural: datasources - singular: datasource - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.type - name: Type - type: string - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .status.lastSynced - name: Synced - type: date - - jsonPath: .status.nextSyncTime - name: Next - type: string - - jsonPath: .status.numberOfObjects - name: Objects - type: integer - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Datasource is the Schema for the datasources API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Datasource - properties: - databaseSecretRef: - description: |- - Database credentials to use for the datasource. - The secret should contain the following keys: - - "username": The database username. - - "password": The database password. - - "host": The database host. - - "port": The database port. - - "database": The database name. - properties: - name: - description: name is unique within a namespace to reference a - secret resource. - type: string - namespace: - description: namespace defines the space within which the secret - name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - openstack: - description: |- - If given, configures an OpenStack datasource to fetch. - Type must be set to "openstack" if this is used. - properties: - cinder: - description: |- - Datasource for openstack cinder. - Only required if Type is "cinder". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - identity: - description: |- - Datasource for openstack identity. - Only required if Type is "identity". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - limes: - description: |- - Datasource for openstack limes. - Only required if Type is "limes". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - manila: - description: |- - Datasource for openstack manila. - Only required if Type is "manila". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - nova: - description: |- - Datasource for openstack nova. - Only required if Type is "nova". - properties: - deletedServersChangesSinceMinutes: - description: |- - Time frame in minutes for the changes-since parameter when fetching - deleted servers. Set if the Type is "deletedServers". - type: integer - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - placement: - description: |- - Datasource for openstack placement. - Only required if Type is "placement". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - secretRef: - description: |- - Keystone credentials secret ref for authenticating with openstack. - The secret should contain the following keys: - - "availability": The service availability, e.g. "public", "internal", or "admin". - - "url": The keystone auth URL. - - "username": The keystone username. - - "password": The keystone password. - - "userDomainName": The keystone user domain name. - - "projectName": The keystone project name. - - "projectDomainName": The keystone project domain name. - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which the - secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - syncInterval: - default: 60s - description: How often to sync the datasource. - type: string - type: - description: The type of the OpenStack datasource. - type: string - required: - - secretRef - - syncInterval - - type - type: object - prometheus: - description: |- - If given, configures a Prometheus datasource to fetch. - Type must be set to "prometheus" if this is used. - properties: - alias: - description: |- - Especially when a more complex query is used, we need an alias - under which the table will be stored in the database. - Additionally, this alias is used to reference the metric in the - feature extractors as dependency. - type: string - interval: - default: 86400s - description: The interval at which to query the data. - type: string - query: - description: The query to use to fetch the metric. - type: string - resolution: - default: 43200s - description: The resolution of the data. - type: string - secretRef: - description: |- - Secret containing the following keys: - - "url": The prometheus URL. - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which the - secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - timeRange: - default: 2419200s - description: Time range to query the data for. - type: string - type: - description: |- - The type of the metric, mapping directly to a metric model supported - by cortex. Note that the metrics are fetched as time series, not instant. - type: string - required: - - alias - - interval - - query - - resolution - - secretRef - - timeRange - - type - type: object - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this datasource - is used (e.g., nova, cinder, manila). - type: string - ssoSecretRef: - description: |- - Kubernetes secret ref for an optional sso certificate to access the host. - The secret should contain two keys: "cert" and "key". - properties: - name: - description: name is unique within a namespace to reference a - secret resource. - type: string - namespace: - description: namespace defines the space within which the secret - name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - type: - description: The type of the datasource. - type: string - required: - - databaseSecretRef - - schedulingDomain - - type - type: object - status: - description: status defines the observed state of Datasource - properties: - conditions: - description: The current status conditions of the datasource. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - lastSynced: - description: When the datasource was last successfully synced. - format: date-time - type: string - nextSyncTime: - description: Planned time for the next sync. - format: date-time - type: string - numberOfObjects: - description: The number of objects currently stored for this datasource. - format: int64 - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/cortex.cloud_decisions.yaml b/config/crd/cortex.cloud_decisions.yaml deleted file mode 100644 index 3f45da833..000000000 --- a/config/crd/cortex.cloud_decisions.yaml +++ /dev/null @@ -1,401 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 - name: decisions.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Decision - listKind: DecisionList - plural: decisions - singular: decision - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .spec.resourceID - name: Resource ID - type: string - - jsonPath: .status.precedence - name: '#' - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.pipelineRef.name - name: Pipeline - type: string - - jsonPath: .status.result.targetHost - name: TargetHost - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Decision is the Schema for the decisions API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Decision - properties: - cinderRaw: - description: If the type is "cinder", this field contains the raw - cinder decision request. - type: object - x-kubernetes-preserve-unknown-fields: true - machineRef: - description: If the type is "machine", this field contains the machine - reference. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - manilaRaw: - description: If the type is "manila", this field contains the raw - manila decision request. - type: object - x-kubernetes-preserve-unknown-fields: true - novaRaw: - description: If the type is "nova", this field contains the raw nova - decision request. - type: object - x-kubernetes-preserve-unknown-fields: true - pipelineRef: - description: |- - A reference to the pipeline that should be used for this decision. - This reference can be used to look up the pipeline definition and its - scheduler step configuration for additional context. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - podRef: - description: If the type is "pod", this field contains the pod reference. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - resourceID: - description: |- - An identifier for the underlying resource to be scheduled. - For example, this can be the UUID of a nova instance or cinder volume. - This can be used to correlate multiple decisions for the same resource. - type: string - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this decision - was or is processed (e.g., nova, cinder, manila). - type: string - required: - - pipelineRef - - resourceID - - schedulingDomain - type: object - status: - description: status defines the observed state of Decision - properties: - conditions: - description: The current status conditions of the decision. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - explanation: - description: A human-readable explanation of the decision result. - type: string - history: - description: |- - If there were previous decisions for the underlying resource, they can - be resolved here to provide historical context for the decision. - items: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - precedence: - description: The number of decisions that preceded this one for the - same resource. - type: integer - result: - description: The result of this decision. - properties: - aggregatedOutWeights: - additionalProperties: - type: number - description: Aggregated output weights from the pipeline. - type: object - normalizedInWeights: - additionalProperties: - type: number - description: Normalized input weights to the pipeline. - type: object - orderedHosts: - description: Final ordered list of hosts from most preferred to - least preferred. - items: - type: string - type: array - rawInWeights: - additionalProperties: - type: number - description: Raw input weights to the pipeline. - type: object - stepResults: - description: |- - Outputs of the decision pipeline including the activations used - to make the final ordering of compute hosts. - items: - properties: - activations: - additionalProperties: - type: number - description: Activations of the step for each host. - type: object - stepName: - description: object reference to the scheduler step. - type: string - required: - - activations - - stepName - type: object - type: array - targetHost: - description: The first element of the ordered hosts is considered - the target host. - type: string - type: object - type: object - required: - - spec - type: object - selectableFields: - - jsonPath: .spec.resourceID - served: true - storage: true - subresources: - status: {} diff --git a/dist/chart/templates/crd/cortex.cloud_datasources.yaml b/dist/chart/templates/crd/cortex.cloud_datasources.yaml deleted file mode 100644 index 0dcd7a605..000000000 --- a/dist/chart/templates/crd/cortex.cloud_datasources.yaml +++ /dev/null @@ -1,364 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: datasources.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Datasource - listKind: DatasourceList - plural: datasources - singular: datasource - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.type - name: Type - type: string - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .status.lastSynced - name: Synced - type: date - - jsonPath: .status.nextSyncTime - name: Next - type: string - - jsonPath: .status.numberOfObjects - name: Objects - type: integer - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Datasource is the Schema for the datasources API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Datasource - properties: - databaseSecretRef: - description: |- - Database credentials to use for the datasource. - The secret should contain the following keys: - - "username": The database username. - - "password": The database password. - - "host": The database host. - - "port": The database port. - - "database": The database name. - properties: - name: - description: name is unique within a namespace to reference a - secret resource. - type: string - namespace: - description: namespace defines the space within which the secret - name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - openstack: - description: |- - If given, configures an OpenStack datasource to fetch. - Type must be set to "openstack" if this is used. - properties: - cinder: - description: |- - Datasource for openstack cinder. - Only required if Type is "cinder". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - identity: - description: |- - Datasource for openstack identity. - Only required if Type is "identity". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - limes: - description: |- - Datasource for openstack limes. - Only required if Type is "limes". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - manila: - description: |- - Datasource for openstack manila. - Only required if Type is "manila". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - nova: - description: |- - Datasource for openstack nova. - Only required if Type is "nova". - properties: - deletedServersChangesSinceMinutes: - description: |- - Time frame in minutes for the changes-since parameter when fetching - deleted servers. Set if the Type is "deletedServers". - type: integer - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - placement: - description: |- - Datasource for openstack placement. - Only required if Type is "placement". - properties: - type: - description: The type of resource to sync. - type: string - required: - - type - type: object - secretRef: - description: |- - Keystone credentials secret ref for authenticating with openstack. - The secret should contain the following keys: - - "availability": The service availability, e.g. "public", "internal", or "admin". - - "url": The keystone auth URL. - - "username": The keystone username. - - "password": The keystone password. - - "userDomainName": The keystone user domain name. - - "projectName": The keystone project name. - - "projectDomainName": The keystone project domain name. - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which the - secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - syncInterval: - default: 60s - description: How often to sync the datasource. - type: string - type: - description: The type of the OpenStack datasource. - type: string - required: - - secretRef - - syncInterval - - type - type: object - prometheus: - description: |- - If given, configures a Prometheus datasource to fetch. - Type must be set to "prometheus" if this is used. - properties: - alias: - description: |- - Especially when a more complex query is used, we need an alias - under which the table will be stored in the database. - Additionally, this alias is used to reference the metric in the - feature extractors as dependency. - type: string - interval: - default: 86400s - description: The interval at which to query the data. - type: string - query: - description: The query to use to fetch the metric. - type: string - resolution: - default: 43200s - description: The resolution of the data. - type: string - secretRef: - description: |- - Secret containing the following keys: - - "url": The prometheus URL. - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which the - secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - timeRange: - default: 2419200s - description: Time range to query the data for. - type: string - type: - description: |- - The type of the metric, mapping directly to a metric model supported - by cortex. Note that the metrics are fetched as time series, not instant. - type: string - required: - - alias - - interval - - query - - resolution - - secretRef - - timeRange - - type - type: object - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this datasource - is used (e.g., nova, cinder, manila). - type: string - ssoSecretRef: - description: |- - Kubernetes secret ref for an optional sso certificate to access the host. - The secret should contain two keys: "cert" and "key". - properties: - name: - description: name is unique within a namespace to reference a - secret resource. - type: string - namespace: - description: namespace defines the space within which the secret - name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - type: - description: The type of the datasource. - type: string - required: - - databaseSecretRef - - schedulingDomain - - type - type: object - status: - description: status defines the observed state of Datasource - properties: - conditions: - description: The current status conditions of the datasource. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - lastSynced: - description: When the datasource was last successfully synced. - format: date-time - type: string - nextSyncTime: - description: Planned time for the next sync. - format: date-time - type: string - numberOfObjects: - description: The number of objects currently stored for this datasource. - format: int64 - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/dist/chart/templates/crd/cortex.cloud_decisions.yaml b/dist/chart/templates/crd/cortex.cloud_decisions.yaml deleted file mode 100644 index 765249cb9..000000000 --- a/dist/chart/templates/crd/cortex.cloud_decisions.yaml +++ /dev/null @@ -1,408 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: decisions.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Decision - listKind: DecisionList - plural: decisions - singular: decision - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .spec.resourceID - name: Resource ID - type: string - - jsonPath: .status.precedence - name: '#' - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.pipelineRef.name - name: Pipeline - type: string - - jsonPath: .status.result.targetHost - name: TargetHost - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Decision is the Schema for the decisions API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Decision - properties: - cinderRaw: - description: If the type is "cinder", this field contains the raw - cinder decision request. - type: object - x-kubernetes-preserve-unknown-fields: true - machineRef: - description: If the type is "machine", this field contains the machine - reference. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - manilaRaw: - description: If the type is "manila", this field contains the raw - manila decision request. - type: object - x-kubernetes-preserve-unknown-fields: true - novaRaw: - description: If the type is "nova", this field contains the raw nova - decision request. - type: object - x-kubernetes-preserve-unknown-fields: true - pipelineRef: - description: |- - A reference to the pipeline that should be used for this decision. - This reference can be used to look up the pipeline definition and its - scheduler step configuration for additional context. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - podRef: - description: If the type is "pod", this field contains the pod reference. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - resourceID: - description: |- - An identifier for the underlying resource to be scheduled. - For example, this can be the UUID of a nova instance or cinder volume. - This can be used to correlate multiple decisions for the same resource. - type: string - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this decision - was or is processed (e.g., nova, cinder, manila). - type: string - required: - - pipelineRef - - resourceID - - schedulingDomain - type: object - status: - description: status defines the observed state of Decision - properties: - conditions: - description: The current status conditions of the decision. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - explanation: - description: A human-readable explanation of the decision result. - type: string - history: - description: |- - If there were previous decisions for the underlying resource, they can - be resolved here to provide historical context for the decision. - items: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - precedence: - description: The number of decisions that preceded this one for the - same resource. - type: integer - result: - description: The result of this decision. - properties: - aggregatedOutWeights: - additionalProperties: - type: number - description: Aggregated output weights from the pipeline. - type: object - normalizedInWeights: - additionalProperties: - type: number - description: Normalized input weights to the pipeline. - type: object - orderedHosts: - description: Final ordered list of hosts from most preferred to - least preferred. - items: - type: string - type: array - rawInWeights: - additionalProperties: - type: number - description: Raw input weights to the pipeline. - type: object - stepResults: - description: |- - Outputs of the decision pipeline including the activations used - to make the final ordering of compute hosts. - items: - properties: - activations: - additionalProperties: - type: number - description: Activations of the step for each host. - type: object - stepName: - description: object reference to the scheduler step. - type: string - required: - - activations - - stepName - type: object - type: array - targetHost: - description: The first element of the ordered hosts is considered - the target host. - type: string - type: object - type: object - required: - - spec - type: object - selectableFields: - - jsonPath: .spec.resourceID - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/dist/chart/templates/crd/cortex.cloud_deschedulings.yaml b/dist/chart/templates/crd/cortex.cloud_deschedulings.yaml deleted file mode 100644 index dfc80720d..000000000 --- a/dist/chart/templates/crd/cortex.cloud_deschedulings.yaml +++ /dev/null @@ -1,157 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: deschedulings.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Descheduling - listKind: DeschedulingList - plural: deschedulings - singular: descheduling - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.prevHost - name: Previous Host - type: string - - jsonPath: .status.newHost - name: New Host - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.reason - name: Reason(s) - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Descheduling is the Schema for the deschedulings API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Descheduling - properties: - prevHost: - description: The name of the compute host from which the virtual machine - should be descheduled. - type: string - prevHostType: - description: The type of host from which the virtual machine should - be descheduled. - type: string - reason: - description: The human-readable reason why the VM should be descheduled. - type: string - ref: - description: A reference to the virtual machine that should be descheduled. - type: string - refType: - description: The type of reference used to identify the virtual machine. - type: string - type: object - status: - description: status defines the observed state of Descheduling - properties: - conditions: - description: The current status conditions of the descheduling. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - newHost: - description: The name of the compute host where the VM was rescheduled - to. - type: string - newHostType: - description: The type of host where the VM was rescheduled to. - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/dist/chart/templates/crd/cortex.cloud_knowledges.yaml b/dist/chart/templates/crd/cortex.cloud_knowledges.yaml deleted file mode 100644 index 2c36df048..000000000 --- a/dist/chart/templates/crd/cortex.cloud_knowledges.yaml +++ /dev/null @@ -1,278 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: knowledges.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Knowledge - listKind: KnowledgeList - plural: knowledges - singular: knowledge - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .status.lastExtracted - name: Extracted - type: date - - jsonPath: .spec.recency - name: Recency - type: string - - jsonPath: .status.rawLength - name: Features - type: integer - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Knowledge is the Schema for the knowledges API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Knowledge - properties: - dependencies: - description: Dependencies required for extracting this knowledge. - properties: - datasources: - description: |- - Datasources required for extracting this knowledge. - If provided, all datasources must have the same database secret reference - so the knowledge can be joined across multiple database tables. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - knowledges: - description: Other knowledges this knowledge depends on. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - description: - description: A human-readable description of the knowledge to be extracted. - type: string - extractor: - description: The feature extractor to use for extracting this knowledge. - properties: - config: - description: Additional configuration for the extractor. - type: object - x-kubernetes-preserve-unknown-fields: true - name: - description: The name of the extractor. - type: string - type: object - recency: - default: 60s - description: |- - The desired recency of this knowledge, i.e. how old it can be until - it needs to be re-extracted. - type: string - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this knowledge - is used (e.g., nova, cinder, manila). - type: string - required: - - recency - - schedulingDomain - type: object - status: - description: status defines the observed state of Knowledge - properties: - conditions: - description: The current status conditions of the knowledge. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - lastExtracted: - description: When the knowledge was last successfully extracted. - format: date-time - type: string - raw: - description: The raw data behind the extracted knowledge, e.g. a list - of features. - type: object - x-kubernetes-preserve-unknown-fields: true - rawLength: - description: The number of features extracted, or 1 if the knowledge - is not a list. - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/dist/chart/templates/crd/cortex.cloud_kpis.yaml b/dist/chart/templates/crd/cortex.cloud_kpis.yaml deleted file mode 100644 index 4bdd009a5..000000000 --- a/dist/chart/templates/crd/cortex.cloud_kpis.yaml +++ /dev/null @@ -1,266 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: kpis.cortex.cloud -spec: - group: cortex.cloud - names: - kind: KPI - listKind: KPIList - plural: kpis - singular: kpi - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .status.ready - name: Ready - type: boolean - - jsonPath: .status.dependenciesReadyFrac - name: Dependencies - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KPI is the Schema for the deschedulings API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of KPI - properties: - dependencies: - description: Dependencies required for extracting this kpi. - properties: - datasources: - description: Datasources required for extracting this kpi. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - knowledges: - description: Knowledges this kpi depends on. - items: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: |- - If referring to a piece of an object instead of an entire object, this string - should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to have some well-defined way of - referencing a part of an object. - type: string - kind: - description: |- - Kind of the referent. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - namespace: - description: |- - Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - type: string - resourceVersion: - description: |- - Specific resourceVersion to which this reference is made, if any. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - type: string - uid: - description: |- - UID of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - type: string - type: object - x-kubernetes-map-type: atomic - type: array - type: object - description: - description: |- - Additional description of the kpi which helps understand its purpose - and decisions made by it. - type: string - impl: - description: The name of the kpi in the cortex implementation. - type: string - opts: - description: Additional configuration for the extractor that can be - used - type: object - x-kubernetes-preserve-unknown-fields: true - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this kpi - is used (e.g., nova, cinder, manila). - type: string - required: - - impl - - schedulingDomain - type: object - status: - description: status defines the observed state of KPI - properties: - conditions: - description: The current status conditions of the kpi. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - dependenciesReadyFrac: - description: |- - "ReadyDependencies / TotalDependencies ready" as a human-readable string - or "ready" if there are no dependencies configured. - type: string - readyDependencies: - description: How many dependencies have been reconciled. - type: integer - totalDependencies: - description: Total number of dependencies configured. - type: integer - required: - - readyDependencies - - totalDependencies - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/dist/chart/templates/crd/cortex.cloud_pipelines.yaml b/dist/chart/templates/crd/cortex.cloud_pipelines.yaml deleted file mode 100644 index 2f68972d1..000000000 --- a/dist/chart/templates/crd/cortex.cloud_pipelines.yaml +++ /dev/null @@ -1,460 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: pipelines.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Pipeline - listKind: PipelineList - plural: pipelines - singular: pipeline - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Created - type: date - - jsonPath: .spec.schedulingDomain - name: Domain - type: string - - jsonPath: .spec.type - name: Type - type: string - - jsonPath: .status.conditions[?(@.type=='AllStepsReady')].status - name: All Steps Ready - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Pipeline Ready - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Pipeline is the Schema for the decisions API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Pipeline - properties: - createDecisions: - default: false - description: |- - If this pipeline should create decision objects. - When this is false, the pipeline will still process requests. - type: boolean - description: - description: An optional description of the pipeline, helping understand - its purpose. - type: string - detectors: - description: |- - Ordered list of detectors to apply in a descheduling pipeline. - - This attribute is set only if the pipeline type is detector. - Detectors find candidates for descheduling (migration off current host). - These detectors are run after weighers are applied. - items: - properties: - description: - description: |- - Additional description of the step which helps understand its purpose - and decisions made by it. - type: string - name: - description: |- - The name of the scheduler step in the cortex implementation. - Must match to a step implemented by the pipeline controller. - type: string - params: - description: Additional configuration for the step that can - be used - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - filters: - description: |- - Ordered list of filters to apply in a scheduling pipeline. - - This attribute is set only if the pipeline type is filter-weigher. - Filters remove host candidates from an initial set, leaving - valid candidates. Filters are run before weighers are applied. - items: - properties: - description: - description: |- - Additional description of the step which helps understand its purpose - and decisions made by it. - type: string - name: - description: |- - The name of the scheduler step in the cortex implementation. - Must match to a step implemented by the pipeline controller. - type: string - params: - description: Additional configuration for the step that can - be used - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - schedulingDomain: - description: |- - SchedulingDomain defines in which scheduling domain this pipeline - is used (e.g., nova, cinder, manila). - type: string - type: - description: |- - The type of the pipeline, used to differentiate between - filter-weigher and detector pipelines within the same - scheduling domain. - - If the type is filter-weigher, the filter and weigher attributes - must be set. If the type is detector, the detectors attribute - must be set. - enum: - - filter-weigher - - detector - type: string - weighers: - description: |- - Ordered list of weighers to apply in a scheduling pipeline. - - This attribute is set only if the pipeline type is filter-weigher. - These weighers are run after filters are applied. - items: - properties: - description: - description: |- - Additional description of the step which helps understand its purpose - and decisions made by it. - type: string - multiplier: - description: |- - Optional multiplier to apply to the step's output. - This can be used to increase or decrease the weight of a step - relative to other steps in the same pipeline. - type: number - name: - description: |- - The name of the scheduler step in the cortex implementation. - Must match to a step implemented by the pipeline controller. - type: string - params: - description: Additional configuration for the step that can - be used - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - required: - - schedulingDomain - - type - type: object - status: - description: status defines the observed state of Pipeline - properties: - conditions: - description: The current status conditions of the pipeline. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - detectors: - description: List of statuses for each detector in the pipeline. - items: - properties: - conditions: - description: The current status conditions of the detector. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - name: - description: The name of the detector. - type: string - required: - - name - type: object - type: array - filters: - description: List of statuses for each filter in the pipeline. - items: - properties: - conditions: - description: The current status conditions of the filter. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - name: - description: The name of the filter. - type: string - required: - - name - type: object - type: array - weighers: - description: List of statuses for each weigher in the pipeline. - items: - properties: - conditions: - description: The current status conditions of the weigher. - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - name: - description: The name of the weigher. - type: string - required: - - name - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/dist/chart/templates/crd/cortex.cloud_reservations.yaml b/dist/chart/templates/crd/cortex.cloud_reservations.yaml deleted file mode 100644 index f4600c042..000000000 --- a/dist/chart/templates/crd/cortex.cloud_reservations.yaml +++ /dev/null @@ -1,172 +0,0 @@ -{{- if .Values.crd.enable }} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - {{- include "chart.labels" . | nindent 4 }} - annotations: - {{- if .Values.crd.keep }} - "helm.sh/resource-policy": keep - {{- end }} - controller-gen.kubebuilder.io/version: v0.17.2 - name: reservations.cortex.cloud -spec: - group: cortex.cloud - names: - kind: Reservation - listKind: ReservationList - plural: reservations - singular: reservation - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.host - name: Host - type: string - - jsonPath: .status.phase - name: Phase - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Reservation is the Schema for the reservations API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec defines the desired state of Reservation - properties: - creator: - description: |- - A remark that can be used to identify the creator of the reservation. - This can be used to clean up reservations synced from external systems - without touching reservations created manually or by other systems. - type: string - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Resources requested to reserve for this instance. - type: object - scheduler: - description: Specification of the scheduler that will handle the reservation. - properties: - cortexNova: - description: |- - If the type of scheduler is cortex-nova, this field will contain additional - information used by cortex-nova to place the instance. - properties: - domainID: - description: The domain ID to reserve for. - type: string - flavorExtraSpecs: - additionalProperties: - type: string - description: Extra specifications relevant for initial placement - of the instance. - type: object - flavorName: - description: The flavor name of the instance to reserve. - type: string - projectID: - description: The project ID to reserve for. - type: string - type: object - type: object - type: object - status: - description: status defines the observed state of Reservation - properties: - conditions: - description: The current status conditions of the reservation. - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - host: - description: The name of the compute host that was allocated. - type: string - phase: - description: The current phase of the reservation. - type: string - required: - - host - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -{{- end -}} diff --git a/helm/README.md b/helm/README.md index 745d2f7f1..c0792849b 100644 --- a/helm/README.md +++ b/helm/README.md @@ -9,7 +9,7 @@ The Cortex helm chart architecture follows a three-tier structure: ``` Bundle Charts (umbrella charts) ↓ includes -Operator Charts (from dist/chart directories), Library Charts (shared components) +Library Charts (shared components) + for local development Dev Charts (development tooling) ``` @@ -25,10 +25,10 @@ helm/ │ ├── cortex-ironcore/ # IronCore scheduling domain │ └── cortex-crds/ # CRDs for all operators ├── library/ # Shared library charts -│ └── cortex-postgres/ # PostgreSQL database -├── dev/ # Development-only charts -│ └── cortex-prometheus-operator/ # Local monitoring stack -*/dist/chart/ # Generated operator charts +│ ├── cortex-postgres/ # PostgreSQL database +| └── cortex/ # Core cortex library +└── dev/ # Development-only charts + └── cortex-prometheus-operator/ # Local monitoring stack ``` ## Chart Types @@ -45,16 +45,13 @@ Bundle charts are **umbrella charts** that represent complete deployments for sp - `cortex-ironcore` - IronCore scheduling domain (compute, ...) - `cortex-crds` - Custom Resource Definitions for all operators -### Operator Chart (from `dist/chart/`) - -The operator chart contains the core Kubernetes operators built from the Go modules. These are **not stored in the helm/ directory** but are generated in `dist/chart` directory as it is a [Kubebuilder](https://book.kubebuilder.io/reference/generating-crd) scaffold. - ### Library Charts (`library/`) Library charts provide **shared, reusable components** that are consumed by bundle charts as dependencies. **Available library charts:** +- `cortex` - [Kubebuilder](https://book.kubebuilder.io/reference/generating-crd) scaffold including CRDs and the cortex manager - `cortex-postgres` - PostgreSQL database deployment with monitoring **Integration with bundles:** diff --git a/helm/bundles/cortex-cinder/Chart.yaml b/helm/bundles/cortex-cinder/Chart.yaml index db63b3857..08fa20b14 100644 --- a/helm/bundles/cortex-cinder/Chart.yaml +++ b/helm/bundles/cortex-cinder/Chart.yaml @@ -13,12 +13,12 @@ dependencies: repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.5.8 - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 alias: cortex-knowledge-controllers - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 diff --git a/helm/bundles/cortex-crds/Chart.yaml b/helm/bundles/cortex-crds/Chart.yaml index 698c07a04..1a33bffe4 100644 --- a/helm/bundles/cortex-crds/Chart.yaml +++ b/helm/bundles/cortex-crds/Chart.yaml @@ -8,7 +8,7 @@ type: application version: 0.0.24 appVersion: 0.1.0 dependencies: - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 diff --git a/helm/bundles/cortex-ironcore/Chart.yaml b/helm/bundles/cortex-ironcore/Chart.yaml index 82fada699..abb683a88 100644 --- a/helm/bundles/cortex-ironcore/Chart.yaml +++ b/helm/bundles/cortex-ironcore/Chart.yaml @@ -8,7 +8,7 @@ type: application version: 0.0.24 appVersion: 0.1.0 dependencies: - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 diff --git a/helm/bundles/cortex-ironcore/README.md b/helm/bundles/cortex-ironcore/README.md index 53c1e0d0a..a85e8b4b0 100644 --- a/helm/bundles/cortex-ironcore/README.md +++ b/helm/bundles/cortex-ironcore/README.md @@ -58,9 +58,9 @@ helm upgrade --install cortex-ironcore ./helm/bundles/cortex-ironcore \ ``` > [!TIP] -> If you made changes to the scheduling/ helm chart, you can update it in the bundle and run helm upgrade again: +> If you made changes to the cortex helm chart, you can update it in the bundle and run helm upgrade again: > ```bash -> helm package ./scheduling/dist/chart --destination ./helm/bundles/cortex-ironcore/charts +> helm package ./library/cortex --destination ./helm/bundles/cortex-ironcore/charts > ``` ### Demo diff --git a/helm/bundles/cortex-manila/Chart.yaml b/helm/bundles/cortex-manila/Chart.yaml index 4107d6ca6..f82b776f2 100644 --- a/helm/bundles/cortex-manila/Chart.yaml +++ b/helm/bundles/cortex-manila/Chart.yaml @@ -13,12 +13,12 @@ dependencies: repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.5.8 - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 alias: cortex-knowledge-controllers - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 diff --git a/helm/bundles/cortex-nova/Chart.yaml b/helm/bundles/cortex-nova/Chart.yaml index a84e9713b..d4ff2564c 100644 --- a/helm/bundles/cortex-nova/Chart.yaml +++ b/helm/bundles/cortex-nova/Chart.yaml @@ -13,12 +13,12 @@ dependencies: repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.5.8 - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 alias: cortex-knowledge-controllers - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 diff --git a/helm/bundles/cortex-pods/Chart.yaml b/helm/bundles/cortex-pods/Chart.yaml index 34cbcaad2..c5d4681d3 100644 --- a/helm/bundles/cortex-pods/Chart.yaml +++ b/helm/bundles/cortex-pods/Chart.yaml @@ -8,7 +8,7 @@ type: application version: 0.0.1 appVersion: 0.1.0 dependencies: - # from: file://../../../dist/chart + # from: file://../../library/cortex - name: cortex repository: oci://ghcr.io/cobaltcore-dev/cortex/charts version: 0.0.11 diff --git a/dist/chart/.helmignore b/helm/library/cortex/.helmignore similarity index 94% rename from dist/chart/.helmignore rename to helm/library/cortex/.helmignore index 7d92f7fb4..37decef80 100644 --- a/dist/chart/.helmignore +++ b/helm/library/cortex/.helmignore @@ -22,4 +22,4 @@ .vscode/ # Helm chart artifacts -dist/chart/*.tgz +*.tgz diff --git a/dist/chart/Chart.lock b/helm/library/cortex/Chart.lock similarity index 100% rename from dist/chart/Chart.lock rename to helm/library/cortex/Chart.lock diff --git a/dist/chart/Chart.yaml b/helm/library/cortex/Chart.yaml similarity index 100% rename from dist/chart/Chart.yaml rename to helm/library/cortex/Chart.yaml diff --git a/config/crd/bases/cortex.cloud_datasources.yaml b/helm/library/cortex/files/crds/cortex.cloud_datasources.yaml similarity index 99% rename from config/crd/bases/cortex.cloud_datasources.yaml rename to helm/library/cortex/files/crds/cortex.cloud_datasources.yaml index 99cd9b994..f04e0c2cb 100644 --- a/config/crd/bases/cortex.cloud_datasources.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_datasources.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: datasources.cortex.cloud spec: group: cortex.cloud diff --git a/config/crd/bases/cortex.cloud_decisions.yaml b/helm/library/cortex/files/crds/cortex.cloud_decisions.yaml similarity index 99% rename from config/crd/bases/cortex.cloud_decisions.yaml rename to helm/library/cortex/files/crds/cortex.cloud_decisions.yaml index 3f45da833..3332a40e4 100644 --- a/config/crd/bases/cortex.cloud_decisions.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_decisions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: decisions.cortex.cloud spec: group: cortex.cloud diff --git a/config/crd/cortex.cloud_deschedulings.yaml b/helm/library/cortex/files/crds/cortex.cloud_deschedulings.yaml similarity index 99% rename from config/crd/cortex.cloud_deschedulings.yaml rename to helm/library/cortex/files/crds/cortex.cloud_deschedulings.yaml index f3104a0a1..a45e401c0 100644 --- a/config/crd/cortex.cloud_deschedulings.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_deschedulings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: deschedulings.cortex.cloud spec: group: cortex.cloud diff --git a/config/crd/cortex.cloud_knowledges.yaml b/helm/library/cortex/files/crds/cortex.cloud_knowledges.yaml similarity index 99% rename from config/crd/cortex.cloud_knowledges.yaml rename to helm/library/cortex/files/crds/cortex.cloud_knowledges.yaml index 657b2de36..0ac596bc2 100644 --- a/config/crd/cortex.cloud_knowledges.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_knowledges.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: knowledges.cortex.cloud spec: group: cortex.cloud diff --git a/config/crd/cortex.cloud_kpis.yaml b/helm/library/cortex/files/crds/cortex.cloud_kpis.yaml similarity index 99% rename from config/crd/cortex.cloud_kpis.yaml rename to helm/library/cortex/files/crds/cortex.cloud_kpis.yaml index a872bc1ed..3ee98eb64 100644 --- a/config/crd/cortex.cloud_kpis.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_kpis.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: kpis.cortex.cloud spec: group: cortex.cloud diff --git a/config/crd/cortex.cloud_pipelines.yaml b/helm/library/cortex/files/crds/cortex.cloud_pipelines.yaml similarity index 99% rename from config/crd/cortex.cloud_pipelines.yaml rename to helm/library/cortex/files/crds/cortex.cloud_pipelines.yaml index c86d2864d..49d6565e6 100644 --- a/config/crd/cortex.cloud_pipelines.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_pipelines.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: pipelines.cortex.cloud spec: group: cortex.cloud diff --git a/config/crd/cortex.cloud_reservations.yaml b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml similarity index 99% rename from config/crd/cortex.cloud_reservations.yaml rename to helm/library/cortex/files/crds/cortex.cloud_reservations.yaml index cc3dcd116..0a0428c44 100644 --- a/config/crd/cortex.cloud_reservations.yaml +++ b/helm/library/cortex/files/crds/cortex.cloud_reservations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.2 + controller-gen.kubebuilder.io/version: v0.20.0 name: reservations.cortex.cloud spec: group: cortex.cloud diff --git a/dist/chart/templates/_helpers.tpl b/helm/library/cortex/templates/_helpers.tpl similarity index 100% rename from dist/chart/templates/_helpers.tpl rename to helm/library/cortex/templates/_helpers.tpl diff --git a/dist/chart/templates/certmanager/certificate.yaml b/helm/library/cortex/templates/certmanager/certificate.yaml similarity index 100% rename from dist/chart/templates/certmanager/certificate.yaml rename to helm/library/cortex/templates/certmanager/certificate.yaml diff --git a/helm/library/cortex/templates/crds.yaml b/helm/library/cortex/templates/crds.yaml new file mode 100644 index 000000000..9ded6e5e5 --- /dev/null +++ b/helm/library/cortex/templates/crds.yaml @@ -0,0 +1,5 @@ +{{- if .Values.crd.enable }} +{{ range $path, $_ := .Files.Glob "files/crds/**.yaml" }} +{{ $.Files.Get $path }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/dist/chart/templates/manager/manager.yaml b/helm/library/cortex/templates/manager/manager.yaml similarity index 100% rename from dist/chart/templates/manager/manager.yaml rename to helm/library/cortex/templates/manager/manager.yaml diff --git a/dist/chart/templates/metrics/metrics-service.yaml b/helm/library/cortex/templates/metrics/metrics-service.yaml similarity index 100% rename from dist/chart/templates/metrics/metrics-service.yaml rename to helm/library/cortex/templates/metrics/metrics-service.yaml diff --git a/dist/chart/templates/network-policy/allow-metrics-traffic.yaml b/helm/library/cortex/templates/network-policy/allow-metrics-traffic.yaml similarity index 100% rename from dist/chart/templates/network-policy/allow-metrics-traffic.yaml rename to helm/library/cortex/templates/network-policy/allow-metrics-traffic.yaml diff --git a/dist/chart/templates/prometheus/monitor.yaml b/helm/library/cortex/templates/prometheus/monitor.yaml similarity index 100% rename from dist/chart/templates/prometheus/monitor.yaml rename to helm/library/cortex/templates/prometheus/monitor.yaml diff --git a/dist/chart/templates/rbac/compute.ironcore.dev_role.yaml b/helm/library/cortex/templates/rbac/compute.ironcore.dev_role.yaml similarity index 100% rename from dist/chart/templates/rbac/compute.ironcore.dev_role.yaml rename to helm/library/cortex/templates/rbac/compute.ironcore.dev_role.yaml diff --git a/dist/chart/templates/rbac/compute.ironcore.dev_role_binding.yaml b/helm/library/cortex/templates/rbac/compute.ironcore.dev_role_binding.yaml similarity index 100% rename from dist/chart/templates/rbac/compute.ironcore.dev_role_binding.yaml rename to helm/library/cortex/templates/rbac/compute.ironcore.dev_role_binding.yaml diff --git a/dist/chart/templates/rbac/cortex.dev_pods_role.yaml b/helm/library/cortex/templates/rbac/cortex.dev_pods_role.yaml similarity index 100% rename from dist/chart/templates/rbac/cortex.dev_pods_role.yaml rename to helm/library/cortex/templates/rbac/cortex.dev_pods_role.yaml diff --git a/dist/chart/templates/rbac/cortex.dev_pods_role_binding.yaml b/helm/library/cortex/templates/rbac/cortex.dev_pods_role_binding.yaml similarity index 100% rename from dist/chart/templates/rbac/cortex.dev_pods_role_binding.yaml rename to helm/library/cortex/templates/rbac/cortex.dev_pods_role_binding.yaml diff --git a/dist/chart/templates/rbac/hypervisor_role.yaml b/helm/library/cortex/templates/rbac/hypervisor_role.yaml similarity index 100% rename from dist/chart/templates/rbac/hypervisor_role.yaml rename to helm/library/cortex/templates/rbac/hypervisor_role.yaml diff --git a/dist/chart/templates/rbac/hypervisor_role_binding.yaml b/helm/library/cortex/templates/rbac/hypervisor_role_binding.yaml similarity index 100% rename from dist/chart/templates/rbac/hypervisor_role_binding.yaml rename to helm/library/cortex/templates/rbac/hypervisor_role_binding.yaml diff --git a/dist/chart/templates/rbac/leader_election_role.yaml b/helm/library/cortex/templates/rbac/leader_election_role.yaml similarity index 100% rename from dist/chart/templates/rbac/leader_election_role.yaml rename to helm/library/cortex/templates/rbac/leader_election_role.yaml diff --git a/dist/chart/templates/rbac/leader_election_role_binding.yaml b/helm/library/cortex/templates/rbac/leader_election_role_binding.yaml similarity index 100% rename from dist/chart/templates/rbac/leader_election_role_binding.yaml rename to helm/library/cortex/templates/rbac/leader_election_role_binding.yaml diff --git a/dist/chart/templates/rbac/metrics_auth_role.yaml b/helm/library/cortex/templates/rbac/metrics_auth_role.yaml similarity index 100% rename from dist/chart/templates/rbac/metrics_auth_role.yaml rename to helm/library/cortex/templates/rbac/metrics_auth_role.yaml diff --git a/dist/chart/templates/rbac/metrics_auth_role_binding.yaml b/helm/library/cortex/templates/rbac/metrics_auth_role_binding.yaml similarity index 100% rename from dist/chart/templates/rbac/metrics_auth_role_binding.yaml rename to helm/library/cortex/templates/rbac/metrics_auth_role_binding.yaml diff --git a/dist/chart/templates/rbac/metrics_reader_role.yaml b/helm/library/cortex/templates/rbac/metrics_reader_role.yaml similarity index 100% rename from dist/chart/templates/rbac/metrics_reader_role.yaml rename to helm/library/cortex/templates/rbac/metrics_reader_role.yaml diff --git a/dist/chart/templates/rbac/role.yaml b/helm/library/cortex/templates/rbac/role.yaml similarity index 100% rename from dist/chart/templates/rbac/role.yaml rename to helm/library/cortex/templates/rbac/role.yaml diff --git a/dist/chart/templates/rbac/role_binding.yaml b/helm/library/cortex/templates/rbac/role_binding.yaml similarity index 100% rename from dist/chart/templates/rbac/role_binding.yaml rename to helm/library/cortex/templates/rbac/role_binding.yaml diff --git a/dist/chart/templates/rbac/service_account.yaml b/helm/library/cortex/templates/rbac/service_account.yaml similarity index 100% rename from dist/chart/templates/rbac/service_account.yaml rename to helm/library/cortex/templates/rbac/service_account.yaml diff --git a/dist/chart/values.yaml b/helm/library/cortex/values.yaml similarity index 100% rename from dist/chart/values.yaml rename to helm/library/cortex/values.yaml