From e60800ff45fcfe57340915e4cf4102d4447d4d61 Mon Sep 17 00:00:00 2001 From: Andrew Steurer Date: Wed, 10 Jul 2024 15:22:19 -0600 Subject: [PATCH] Update the domain from 'spinoperator.dev' to 'spinkube.dev' Signed-off-by: Andrew Steurer Signed-off-by: Caleb Schoepp --- PROJECT | 6 +++--- api/v1alpha1/groupversion_info.go | 4 ++-- apps/redis-sample/README.md | 2 +- charts/spin-operator/README.md | 12 ++++++------ charts/spin-operator/templates/manager-rbac.yaml | 10 +++++----- .../mutating-webhook-configuration.yaml | 8 ++++---- .../validating-webhook-configuration.yaml | 8 ++++---- cmd/main.go | 2 +- .../core.spinoperator.dev_spinappexecutors.yaml | 4 ++-- .../bases/core.spinoperator.dev_spinapps.yaml | 4 ++-- config/crd/kustomization.yaml | 4 ++-- .../patches/cainjection_in_spinappexecutors.yaml | 2 +- config/crd/patches/cainjection_in_spinapps.yaml | 2 +- .../crd/patches/webhook_in_spinappexecutors.yaml | 2 +- config/crd/patches/webhook_in_spinapps.yaml | 2 +- config/rbac/role.yaml | 10 +++++----- config/rbac/spinapp_editor_role.yaml | 4 ++-- config/rbac/spinapp_viewer_role.yaml | 4 ++-- config/rbac/spinappexecutor_editor_role.yaml | 4 ++-- config/rbac/spinappexecutor_viewer_role.yaml | 4 ++-- config/samples/annotations.yaml | 2 +- config/samples/hpa.yaml | 2 +- config/samples/keda-app.yaml | 2 +- config/samples/otel.yaml | 4 ++-- config/samples/private-image.yaml | 2 +- config/samples/probes.yaml | 2 +- config/samples/redis.yaml | 2 +- config/samples/resources.yaml | 2 +- config/samples/runtime-config.yaml | 2 +- config/samples/simple.yaml | 2 +- config/samples/spin-shim-executor.yaml | 2 +- config/samples/spintainer-executor.yaml | 2 +- config/samples/spintainer.yaml | 2 +- config/samples/variable-explorer.yaml | 2 +- config/samples/variables.yaml | 2 +- config/samples/volume-mount.yaml | 2 +- config/webhook/manifests.yaml | 16 ++++++++-------- e2e/crd_installed_test.go | 8 ++++---- internal/constants/constants.go | 2 +- internal/controller/service_test.go | 4 ++-- internal/controller/spinapp_controller.go | 6 +++--- internal/controller/spinapp_controller_test.go | 6 +++--- .../controller/spinappexecutor_controller.go | 6 +++--- internal/webhook/admission_test.go | 2 +- internal/webhook/spinapp_defaulting.go | 2 +- internal/webhook/spinapp_validating.go | 4 ++-- internal/webhook/spinappexecutor_defaulting.go | 2 +- internal/webhook/spinappexecutor_validating.go | 4 ++-- 48 files changed, 97 insertions(+), 97 deletions(-) diff --git a/PROJECT b/PROJECT index 47b8c332..2b7d623a 100644 --- a/PROJECT +++ b/PROJECT @@ -2,7 +2,7 @@ # This file is used to track the info used to scaffold your project # and allow the plugins properly work. # More info: https://book.kubebuilder.io/reference/project-config.html -domain: spinoperator.dev +domain: spinkube.dev layout: - go.kubebuilder.io/v4 projectName: spin-operator @@ -12,7 +12,7 @@ resources: crdVersion: v1 namespaced: true controller: true - domain: spinoperator.dev + domain: spinkube.dev group: core kind: SpinApp path: github.com/spinkube/spin-operator/api/v1alpha1 @@ -25,7 +25,7 @@ resources: crdVersion: v1 namespaced: true controller: true - domain: spinoperator.dev + domain: spinkube.dev group: core kind: SpinAppExecutor path: github.com/spinkube/spin-operator/api/v1alpha1 diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 649607cb..fbc9206f 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the spin v1alpha1 API group // +kubebuilder:object:generate=true -// +groupName=core.spinoperator.dev +// +groupName=core.spinkube.dev package v1alpha1 import ( @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "core.spinoperator.dev", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "core.spinkube.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/apps/redis-sample/README.md b/apps/redis-sample/README.md index c046a28b..aa4438a5 100644 --- a/apps/redis-sample/README.md +++ b/apps/redis-sample/README.md @@ -9,7 +9,7 @@ This is an OCI-compliant package that can be used to demonstrate how a Spin app Create a Kubernetes manifest file named `redis_client.yaml` with the following code: ```yaml -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: redis-spinapp diff --git a/charts/spin-operator/README.md b/charts/spin-operator/README.md index 5140ea43..96c51525 100644 --- a/charts/spin-operator/README.md +++ b/charts/spin-operator/README.md @@ -17,8 +17,8 @@ Prior to installing the chart, you'll need to ensure the following: - spin-operator CustomResourceDefinition (CRD) resources are installed. This includes the SpinApp CRD representing Spin applications to be scheduled on the cluster. ```console - $ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinoperator.dev_spinapps.yaml - $ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml + $ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinkube.dev_spinapps.yaml + $ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinkube.dev_spinappexecutors.yaml ``` ## Installing the chart @@ -54,8 +54,8 @@ spin-operator depends on the following resources. If not already present on the Note that you may also need to upgrade the spin-operator CRDs in tandem with upgrading the Helm release: ```console -$ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinoperator.dev_spinapps.yaml -$ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml +$ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinkube.dev_spinapps.yaml +$ kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinkube.dev_spinappexecutors.yaml ``` To upgrade the `spin-operator` release, run the following: @@ -82,6 +82,6 @@ To completely uninstall all resources related to spin-operator, you may want to ```console $ kubectl delete -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/samples/spin-runtime-class.yaml $ kubectl delete -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/samples/spin-shim-executor.yaml -$ kubectl delete -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinoperator.dev_spinapps.yaml -$ kubectl delete -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml +$ kubectl delete -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinkube.dev_spinapps.yaml +$ kubectl delete -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/crd/bases/core.spinkube.dev_spinappexecutors.yaml ``` diff --git a/charts/spin-operator/templates/manager-rbac.yaml b/charts/spin-operator/templates/manager-rbac.yaml index bf7597b6..711c1e55 100644 --- a/charts/spin-operator/templates/manager-rbac.yaml +++ b/charts/spin-operator/templates/manager-rbac.yaml @@ -55,7 +55,7 @@ rules: - create - patch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors verbs: @@ -67,13 +67,13 @@ rules: - update - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors/finalizers verbs: - update - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors/status verbs: @@ -81,7 +81,7 @@ rules: - patch - update - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps verbs: @@ -93,7 +93,7 @@ rules: - update - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps/status verbs: diff --git a/charts/spin-operator/templates/mutating-webhook-configuration.yaml b/charts/spin-operator/templates/mutating-webhook-configuration.yaml index 5002666e..7c500997 100644 --- a/charts/spin-operator/templates/mutating-webhook-configuration.yaml +++ b/charts/spin-operator/templates/mutating-webhook-configuration.yaml @@ -13,12 +13,12 @@ webhooks: service: name: '{{ include "spin-operator.fullname" . }}-webhook-service' namespace: '{{ .Release.Namespace }}' - path: /mutate-core-spinoperator-dev-v1alpha1-spinapp + path: /mutate-core-spinkube-dev-v1alpha1-spinapp failurePolicy: Fail name: mspinapp.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: @@ -33,12 +33,12 @@ webhooks: service: name: '{{ include "spin-operator.fullname" . }}-webhook-service' namespace: '{{ .Release.Namespace }}' - path: /mutate-core-spinoperator-dev-v1alpha1-spinappexecutor + path: /mutate-core-spinkube-dev-v1alpha1-spinappexecutor failurePolicy: Fail name: mspinappexecutor.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: diff --git a/charts/spin-operator/templates/validating-webhook-configuration.yaml b/charts/spin-operator/templates/validating-webhook-configuration.yaml index 90a857a1..4d99628a 100644 --- a/charts/spin-operator/templates/validating-webhook-configuration.yaml +++ b/charts/spin-operator/templates/validating-webhook-configuration.yaml @@ -13,12 +13,12 @@ webhooks: service: name: '{{ include "spin-operator.fullname" . }}-webhook-service' namespace: '{{ .Release.Namespace }}' - path: /validate-core-spinoperator-dev-v1alpha1-spinapp + path: /validate-core-spinkube-dev-v1alpha1-spinapp failurePolicy: Fail name: vspinapp.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: @@ -33,12 +33,12 @@ webhooks: service: name: '{{ include "spin-operator.fullname" . }}-webhook-service' namespace: '{{ .Release.Namespace }}' - path: /validate-core-spinoperator-dev-v1alpha1-spinappexecutor + path: /validate-core-spinkube-dev-v1alpha1-spinappexecutor failurePolicy: Fail name: vspinappexecutor.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: diff --git a/cmd/main.go b/cmd/main.go index 35d8e205..b683ca7a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -83,7 +83,7 @@ func main() { Metrics: metricsserver.Options{BindAddress: metricsAddr}, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, - LeaderElectionID: "90ba2d18.spinoperator.dev", + LeaderElectionID: "90ba2d18.spinkube.dev", // LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily // when the Manager ends. This requires the binary to immediately end when the // Manager is stopped, otherwise, this setting is unsafe. Setting this significantly diff --git a/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml b/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml index e6b1d180..b738a8da 100644 --- a/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml +++ b/config/crd/bases/core.spinoperator.dev_spinappexecutors.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: spinappexecutors.core.spinoperator.dev + name: spinappexecutors.core.spinkube.dev spec: - group: core.spinoperator.dev + group: core.spinkube.dev names: kind: SpinAppExecutor listKind: SpinAppExecutorList diff --git a/config/crd/bases/core.spinoperator.dev_spinapps.yaml b/config/crd/bases/core.spinoperator.dev_spinapps.yaml index 6589f8a4..8d864fa6 100644 --- a/config/crd/bases/core.spinoperator.dev_spinapps.yaml +++ b/config/crd/bases/core.spinoperator.dev_spinapps.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: spinapps.core.spinoperator.dev + name: spinapps.core.spinkube.dev spec: - group: core.spinoperator.dev + group: core.spinkube.dev names: kind: SpinApp listKind: SpinAppList diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 67a4654f..98153218 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,8 +2,8 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/core.spinoperator.dev_spinapps.yaml -- bases/core.spinoperator.dev_spinappexecutors.yaml +- bases/core.spinkube.dev_spinapps.yaml +- bases/core.spinkube.dev_spinappexecutors.yaml #+kubebuilder:scaffold:crdkustomizeresource patches: diff --git a/config/crd/patches/cainjection_in_spinappexecutors.yaml b/config/crd/patches/cainjection_in_spinappexecutors.yaml index 3c9339d1..4e1419b2 100644 --- a/config/crd/patches/cainjection_in_spinappexecutors.yaml +++ b/config/crd/patches/cainjection_in_spinappexecutors.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: spinappexecutors.core.spinoperator.dev + name: spinappexecutors.core.spinkube.dev diff --git a/config/crd/patches/cainjection_in_spinapps.yaml b/config/crd/patches/cainjection_in_spinapps.yaml index 9bfef85e..cb7e60a1 100644 --- a/config/crd/patches/cainjection_in_spinapps.yaml +++ b/config/crd/patches/cainjection_in_spinapps.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: spinapps.core.spinoperator.dev + name: spinapps.core.spinkube.dev diff --git a/config/crd/patches/webhook_in_spinappexecutors.yaml b/config/crd/patches/webhook_in_spinappexecutors.yaml index 9dd1fb89..e641ffa9 100644 --- a/config/crd/patches/webhook_in_spinappexecutors.yaml +++ b/config/crd/patches/webhook_in_spinappexecutors.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: spinappexecutors.core.spinoperator.dev + name: spinappexecutors.core.spinkube.dev spec: conversion: strategy: Webhook diff --git a/config/crd/patches/webhook_in_spinapps.yaml b/config/crd/patches/webhook_in_spinapps.yaml index 886c7247..4ad6bf71 100644 --- a/config/crd/patches/webhook_in_spinapps.yaml +++ b/config/crd/patches/webhook_in_spinapps.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: spinapps.core.spinoperator.dev + name: spinapps.core.spinkube.dev spec: conversion: strategy: Webhook diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index e4219b9c..3b61b320 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -54,7 +54,7 @@ rules: - create - patch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors verbs: @@ -66,13 +66,13 @@ rules: - update - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors/finalizers verbs: - update - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors/status verbs: @@ -80,7 +80,7 @@ rules: - patch - update - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps verbs: @@ -92,7 +92,7 @@ rules: - update - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps/status verbs: diff --git a/config/rbac/spinapp_editor_role.yaml b/config/rbac/spinapp_editor_role.yaml index 4b1efef4..89f1b339 100644 --- a/config/rbac/spinapp_editor_role.yaml +++ b/config/rbac/spinapp_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: spinapp-editor-role rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps/status verbs: diff --git a/config/rbac/spinapp_viewer_role.yaml b/config/rbac/spinapp_viewer_role.yaml index 6b6649c7..f19b64c4 100644 --- a/config/rbac/spinapp_viewer_role.yaml +++ b/config/rbac/spinapp_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: spinapp-viewer-role rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinapps/status verbs: diff --git a/config/rbac/spinappexecutor_editor_role.yaml b/config/rbac/spinappexecutor_editor_role.yaml index 49eb9867..ece125dd 100644 --- a/config/rbac/spinappexecutor_editor_role.yaml +++ b/config/rbac/spinappexecutor_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: spinappexecutor-editor-role rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors/status verbs: diff --git a/config/rbac/spinappexecutor_viewer_role.yaml b/config/rbac/spinappexecutor_viewer_role.yaml index 21753655..beacf737 100644 --- a/config/rbac/spinappexecutor_viewer_role.yaml +++ b/config/rbac/spinappexecutor_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: spinappexecutor-viewer-role rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev resources: - spinappexecutors/status verbs: diff --git a/config/samples/annotations.yaml b/config/samples/annotations.yaml index 4ea1562b..c74dfbb8 100644 --- a/config/samples/annotations.yaml +++ b/config/samples/annotations.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: annotations-spinapp diff --git a/config/samples/hpa.yaml b/config/samples/hpa.yaml index 1b805f3d..45bbc584 100644 --- a/config/samples/hpa.yaml +++ b/config/samples/hpa.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: hpa-spinapp diff --git a/config/samples/keda-app.yaml b/config/samples/keda-app.yaml index 701c17e5..c596868f 100644 --- a/config/samples/keda-app.yaml +++ b/config/samples/keda-app.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: keda-spinapp diff --git a/config/samples/otel.yaml b/config/samples/otel.yaml index c2e513ff..7f1ef536 100644 --- a/config/samples/otel.yaml +++ b/config/samples/otel.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: otel-spinapp @@ -7,7 +7,7 @@ spec: executor: otel-shim-executor replicas: 1 --- -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinAppExecutor metadata: name: otel-shim-executor diff --git a/config/samples/private-image.yaml b/config/samples/private-image.yaml index 8821dd89..e9a2fa0b 100644 --- a/config/samples/private-image.yaml +++ b/config/samples/private-image.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: private-image-spinapp diff --git a/config/samples/probes.yaml b/config/samples/probes.yaml index 5b90d695..9364713f 100644 --- a/config/samples/probes.yaml +++ b/config/samples/probes.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: healthchecks-spinapp diff --git a/config/samples/redis.yaml b/config/samples/redis.yaml index 2df7cfe3..627607ae 100644 --- a/config/samples/redis.yaml +++ b/config/samples/redis.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: redis-spinapp diff --git a/config/samples/resources.yaml b/config/samples/resources.yaml index 3e696096..43c25a46 100644 --- a/config/samples/resources.yaml +++ b/config/samples/resources.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: resource-requirements-spinapp diff --git a/config/samples/runtime-config.yaml b/config/samples/runtime-config.yaml index 89172b4d..367dc867 100644 --- a/config/samples/runtime-config.yaml +++ b/config/samples/runtime-config.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: runtime-config diff --git a/config/samples/simple.yaml b/config/samples/simple.yaml index dadfd06d..21a27554 100644 --- a/config/samples/simple.yaml +++ b/config/samples/simple.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: simple-spinapp diff --git a/config/samples/spin-shim-executor.yaml b/config/samples/spin-shim-executor.yaml index 0440d097..e43fbdaa 100644 --- a/config/samples/spin-shim-executor.yaml +++ b/config/samples/spin-shim-executor.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinAppExecutor metadata: name: containerd-shim-spin diff --git a/config/samples/spintainer-executor.yaml b/config/samples/spintainer-executor.yaml index 0d12872e..d6911324 100644 --- a/config/samples/spintainer-executor.yaml +++ b/config/samples/spintainer-executor.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinAppExecutor metadata: name: spintainer diff --git a/config/samples/spintainer.yaml b/config/samples/spintainer.yaml index c3e6b310..0a332a42 100644 --- a/config/samples/spintainer.yaml +++ b/config/samples/spintainer.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: spintainer-spinapp diff --git a/config/samples/variable-explorer.yaml b/config/samples/variable-explorer.yaml index 8de89b3e..19037ff2 100644 --- a/config/samples/variable-explorer.yaml +++ b/config/samples/variable-explorer.yaml @@ -13,7 +13,7 @@ data: password: c2VjcmV0X3NhdWNlCg== --- kind: SpinApp -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 metadata: name: variable-explorer spec: diff --git a/config/samples/variables.yaml b/config/samples/variables.yaml index a560e96d..0806cc30 100644 --- a/config/samples/variables.yaml +++ b/config/samples/variables.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: variables-spinapp diff --git a/config/samples/volume-mount.yaml b/config/samples/volume-mount.yaml index c0ab6ba0..3eb0f4a1 100644 --- a/config/samples/volume-mount.yaml +++ b/config/samples/volume-mount.yaml @@ -1,4 +1,4 @@ -apiVersion: core.spinoperator.dev/v1alpha1 +apiVersion: core.spinkube.dev/v1alpha1 kind: SpinApp metadata: name: volume-mount-spinapp diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index f9ff6ba9..11f4464a 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -10,12 +10,12 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-core-spinoperator-dev-v1alpha1-spinapp + path: /mutate-core-spinkube-dev-v1alpha1-spinapp failurePolicy: Fail name: mspinapp.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: @@ -30,12 +30,12 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-core-spinoperator-dev-v1alpha1-spinappexecutor + path: /mutate-core-spinkube-dev-v1alpha1-spinappexecutor failurePolicy: Fail name: mspinappexecutor.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: @@ -56,12 +56,12 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-core-spinoperator-dev-v1alpha1-spinapp + path: /validate-core-spinkube-dev-v1alpha1-spinapp failurePolicy: Fail name: vspinapp.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: @@ -76,12 +76,12 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-core-spinoperator-dev-v1alpha1-spinappexecutor + path: /validate-core-spinkube-dev-v1alpha1-spinappexecutor failurePolicy: Fail name: vspinappexecutor.kb.io rules: - apiGroups: - - core.spinoperator.dev + - core.spinkube.dev apiVersions: - v1alpha1 operations: diff --git a/e2e/crd_installed_test.go b/e2e/crd_installed_test.go index d8665b3d..d5df75bb 100644 --- a/e2e/crd_installed_test.go +++ b/e2e/crd_installed_test.go @@ -16,13 +16,13 @@ func TestCRDInstalled(t *testing.T) { if err := apiextensionsV1.AddToScheme(client.Resources().GetScheme()); err != nil { t.Fatalf("failed to register the v1 API extension types with Kubernetes scheme: %s", err) } - name := "spinapps.core.spinoperator.dev" + name := "spinapps.core.spinkube.dev" var crd apiextensionsV1.CustomResourceDefinition if err := client.Resources().Get(ctx, name, "", &crd); err != nil { t.Fatalf("SpinApp CRD not found: %s", err) } - if crd.Spec.Group != "core.spinoperator.dev" { + if crd.Spec.Group != "core.spinkube.dev" { t.Fatalf("SpinApp CRD has unexpected group: %s", crd.Spec.Group) } return ctx @@ -34,13 +34,13 @@ func TestCRDInstalled(t *testing.T) { t.Fatalf("failed to register the v1 API extension types with Kubernetes scheme: %s", err) } - name := "spinappexecutors.core.spinoperator.dev" + name := "spinappexecutors.core.spinkube.dev" var crd apiextensionsV1.CustomResourceDefinition if err := client.Resources().Get(ctx, name, "", &crd); err != nil { t.Fatalf("SpinApp CRD not found: %s", err) } - if crd.Spec.Group != "core.spinoperator.dev" { + if crd.Spec.Group != "core.spinkube.dev" { t.Fatalf("SpinAppExecutor CRD has unexpected group: %s", crd.Spec.Group) } return ctx diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 0c6d53e8..1b74c22b 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -4,7 +4,7 @@ import "fmt" // OperatorResourceKeyspace is the keyspace used for constructing application // metadata on Kubernetes objects -const OperatorResourceKeyspace = "core.spinoperator.dev" +const OperatorResourceKeyspace = "core.spinkube.dev" // ConstructResourceLabelKey is used when building operator-managed labels for // resources. diff --git a/internal/controller/service_test.go b/internal/controller/service_test.go index 7561a681..e6d42db4 100644 --- a/internal/controller/service_test.go +++ b/internal/controller/service_test.go @@ -18,9 +18,9 @@ func TestConstructService(t *testing.T) { require.Equal(t, "v1", svc.TypeMeta.APIVersion) // We expect that the service object has the app name and nothing else. - require.Equal(t, map[string]string{"core.spinoperator.dev/app-name": "my-app"}, svc.ObjectMeta.Labels) + require.Equal(t, map[string]string{"core.spinkube.dev/app-name": "my-app"}, svc.ObjectMeta.Labels) // We expect that the service selector has the app status and nothing else. - require.Equal(t, map[string]string{"core.spinoperator.dev/app.my-app.status": "ready"}, svc.Spec.Selector) + require.Equal(t, map[string]string{"core.spinkube.dev/app.my-app.status": "ready"}, svc.Spec.Selector) // We expect that the HTTP Port is part of the service. There's currently no // non-http implementations of a Spin trigger in Kubernetes, thus nothing that diff --git a/internal/controller/spinapp_controller.go b/internal/controller/spinapp_controller.go index 4930fd85..92b62999 100644 --- a/internal/controller/spinapp_controller.go +++ b/internal/controller/spinapp_controller.go @@ -49,7 +49,7 @@ const ( HTTPAppPortName = "http-app" // SpinOperatorFinalizer is the finalizer used by the spin operator - SpinOperatorFinalizer = "core.spinoperator.dev/finalizer" + SpinOperatorFinalizer = "core.spinkube.dev/finalizer" // FieldManger is used to declare that the spin operator owns specific fields on child resources FieldManager = "spin-operator" @@ -62,8 +62,8 @@ type SpinAppReconciler struct { Recorder record.EventRecorder } -//+kubebuilder:rbac:groups=core.spinoperator.dev,resources=spinapps,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.spinoperator.dev,resources=spinapps/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=core.spinkube.dev,resources=spinapps,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=core.spinkube.dev,resources=spinapps/status,verbs=get;update;patch //+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get //+kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete diff --git a/internal/controller/spinapp_controller_test.go b/internal/controller/spinapp_controller_test.go index 23bc7e6c..a137211d 100644 --- a/internal/controller/spinapp_controller_test.go +++ b/internal/controller/spinapp_controller_test.go @@ -501,9 +501,9 @@ func TestReconcile_Integration_AnnotationAndLabelPropagataion(t *testing.T) { require.Equal(t, "a-runtime-class", *deployment.Spec.Template.Spec.RuntimeClassName) require.Equal(t, map[string]string{ - "core.spinoperator.dev/app-name": "app", - "core.spinoperator.dev/app.app.status": "ready", - "my.pod.label": "value", + "core.spinkube.dev/app-name": "app", + "core.spinkube.dev/app.app.status": "ready", + "my.pod.label": "value", }, deployment.Spec.Template.ObjectMeta.Labels) require.Equal(t, map[string]string{"my.pod.annotation": "value"}, deployment.Spec.Template.ObjectMeta.Annotations) diff --git a/internal/controller/spinappexecutor_controller.go b/internal/controller/spinappexecutor_controller.go index 53eb7603..a9d384e4 100644 --- a/internal/controller/spinappexecutor_controller.go +++ b/internal/controller/spinappexecutor_controller.go @@ -41,9 +41,9 @@ type SpinAppExecutorReconciler struct { Recorder record.EventRecorder } -//+kubebuilder:rbac:groups=core.spinoperator.dev,resources=spinappexecutors,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.spinoperator.dev,resources=spinappexecutors/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=core.spinoperator.dev,resources=spinappexecutors/finalizers,verbs=update +//+kubebuilder:rbac:groups=core.spinkube.dev,resources=spinappexecutors,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=core.spinkube.dev,resources=spinappexecutors/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=core.spinkube.dev,resources=spinappexecutors/finalizers,verbs=update //+kubebuilder:rbac:groups=core,resources=events,verbs=create;patch // SetupWithManager sets up the controller with the Manager. diff --git a/internal/webhook/admission_test.go b/internal/webhook/admission_test.go index 22f21efd..909a145d 100644 --- a/internal/webhook/admission_test.go +++ b/internal/webhook/admission_test.go @@ -152,7 +152,7 @@ func TestCreateSpinAppWithNoExecutor(t *testing.T) { Replicas: 2, }, }) - require.EqualError(t, err, "admission webhook \"vspinapp.kb.io\" denied the request: SpinApp.core.spinoperator.dev \"spinapp\" is invalid:"+ + require.EqualError(t, err, "admission webhook \"vspinapp.kb.io\" denied the request: SpinApp.core.spinkube.dev \"spinapp\" is invalid:"+ " spec.executor: Invalid value: \"\": executor must be set, likely no default executor was set because you have no executors installed") } diff --git a/internal/webhook/spinapp_defaulting.go b/internal/webhook/spinapp_defaulting.go index e651710b..b89e0553 100644 --- a/internal/webhook/spinapp_defaulting.go +++ b/internal/webhook/spinapp_defaulting.go @@ -11,7 +11,7 @@ import ( ) // nolint:lll -//+kubebuilder:webhook:path=/mutate-core-spinoperator-dev-v1alpha1-spinapp,mutating=true,failurePolicy=fail,sideEffects=None,groups=core.spinoperator.dev,resources=spinapps,verbs=create;update,versions=v1alpha1,name=mspinapp.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/mutate-core-spinkube-dev-v1alpha1-spinapp,mutating=true,failurePolicy=fail,sideEffects=None,groups=core.spinkube.dev,resources=spinapps,verbs=create;update,versions=v1alpha1,name=mspinapp.kb.io,admissionReviewVersions=v1 // SpinAppDefaulter mutates SpinApps type SpinAppDefaulter struct { diff --git a/internal/webhook/spinapp_validating.go b/internal/webhook/spinapp_validating.go index a02bb83b..4f19f60e 100644 --- a/internal/webhook/spinapp_validating.go +++ b/internal/webhook/spinapp_validating.go @@ -15,7 +15,7 @@ import ( ) // nolint:lll -//+kubebuilder:webhook:path=/validate-core-spinoperator-dev-v1alpha1-spinapp,mutating=false,failurePolicy=fail,sideEffects=None,groups=core.spinoperator.dev,resources=spinapps,verbs=create;update,versions=v1alpha1,name=vspinapp.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-core-spinkube-dev-v1alpha1-spinapp,mutating=false,failurePolicy=fail,sideEffects=None,groups=core.spinkube.dev,resources=spinapps,verbs=create;update,versions=v1alpha1,name=vspinapp.kb.io,admissionReviewVersions=v1 // SpinAppValidator validates SpinApps type SpinAppValidator struct { @@ -69,7 +69,7 @@ func (v *SpinAppValidator) validateSpinApp(ctx context.Context, spinApp *spinv1a } return apierrors.NewInvalid( - schema.GroupKind{Group: "core.spinoperator.dev", Kind: "SpinApp"}, + schema.GroupKind{Group: "core.spinkube.dev", Kind: "SpinApp"}, spinApp.Name, allErrs) } diff --git a/internal/webhook/spinappexecutor_defaulting.go b/internal/webhook/spinappexecutor_defaulting.go index b926e68d..40063cba 100644 --- a/internal/webhook/spinappexecutor_defaulting.go +++ b/internal/webhook/spinappexecutor_defaulting.go @@ -10,7 +10,7 @@ import ( ) // nolint:lll -//+kubebuilder:webhook:path=/mutate-core-spinoperator-dev-v1alpha1-spinappexecutor,mutating=true,failurePolicy=fail,sideEffects=None,groups=core.spinoperator.dev,resources=spinappexecutors,verbs=create;update,versions=v1alpha1,name=mspinappexecutor.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/mutate-core-spinkube-dev-v1alpha1-spinappexecutor,mutating=true,failurePolicy=fail,sideEffects=None,groups=core.spinkube.dev,resources=spinappexecutors,verbs=create;update,versions=v1alpha1,name=mspinappexecutor.kb.io,admissionReviewVersions=v1 // SpinAppExecutorDefaulter mutates SpinApps type SpinAppExecutorDefaulter struct { diff --git a/internal/webhook/spinappexecutor_validating.go b/internal/webhook/spinappexecutor_validating.go index a5069480..e69b7fc1 100644 --- a/internal/webhook/spinappexecutor_validating.go +++ b/internal/webhook/spinappexecutor_validating.go @@ -15,7 +15,7 @@ import ( ) // nolint:lll -//+kubebuilder:webhook:path=/validate-core-spinoperator-dev-v1alpha1-spinappexecutor,mutating=false,failurePolicy=fail,sideEffects=None,groups=core.spinoperator.dev,resources=spinappexecutors,verbs=create;update,versions=v1alpha1,name=vspinappexecutor.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-core-spinkube-dev-v1alpha1-spinappexecutor,mutating=false,failurePolicy=fail,sideEffects=None,groups=core.spinkube.dev,resources=spinappexecutors,verbs=create;update,versions=v1alpha1,name=vspinappexecutor.kb.io,admissionReviewVersions=v1 // SpinAppExecutorValidator validates SpinApps type SpinAppExecutorValidator struct { @@ -63,7 +63,7 @@ func (v *SpinAppExecutorValidator) validateSpinAppExecutor(executor *spinv1alpha } return apierrors.NewInvalid( - schema.GroupKind{Group: "core.spinoperator.dev", Kind: "SpinAppExecutor"}, + schema.GroupKind{Group: "core.spinkube.dev", Kind: "SpinAppExecutor"}, executor.Name, allErrs) }