diff --git a/cli/internal/cloudcmd/upgrade.go b/cli/internal/cloudcmd/upgrade.go index 99e216981..6770c28f4 100644 --- a/cli/internal/cloudcmd/upgrade.go +++ b/cli/internal/cloudcmd/upgrade.go @@ -82,7 +82,7 @@ func (u *Upgrader) Upgrade(ctx context.Context, imageReference, imageVersion str // GetCurrentImage returns the currently used image version of the cluster. func (u *Upgrader) GetCurrentImage(ctx context.Context) (*unstructured.Unstructured, string, error) { - imageStruct, err := u.dynamicInterface.getCurrent(ctx, "constellation-os") + imageStruct, err := u.dynamicInterface.getCurrent(ctx, "constellation-version") if err != nil { return nil, "", err } @@ -198,7 +198,7 @@ func (u *dynamicClient) getCurrent(ctx context.Context, name string) (*unstructu return u.client.Resource(schema.GroupVersionResource{ Group: "update.edgeless.systems", Version: "v1alpha1", - Resource: "nodeimages", + Resource: "nodeversions", }).Get(ctx, name, metav1.GetOptions{}) } @@ -207,7 +207,7 @@ func (u *dynamicClient) update(ctx context.Context, obj *unstructured.Unstructur return u.client.Resource(schema.GroupVersionResource{ Group: "update.edgeless.systems", Version: "v1alpha1", - Resource: "nodeimages", + Resource: "nodeversions", }).Update(ctx, obj, metav1.UpdateOptions{}) } diff --git a/internal/kubernetes/kubectl/kubectl_test.go b/internal/kubernetes/kubectl/kubectl_test.go index 57d578fb2..3ca00e51d 100644 --- a/internal/kubernetes/kubectl/kubectl_test.go +++ b/internal/kubernetes/kubectl/kubectl_test.go @@ -18,7 +18,7 @@ func TestParseCRDs(t *testing.T) { wantErr bool }{ "success": { - data: "apiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: nodeimages.update.edgeless.systems\nspec:\n group: update.edgeless.systems\n names:\n kind: NodeImage\n", + data: "apiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: nodeversions.update.edgeless.systems\nspec:\n group: update.edgeless.systems\n names:\n kind: NodeImage\n", wantErr: false, }, "wrong kind": { diff --git a/operators/constellation-node-operator/README.md b/operators/constellation-node-operator/README.md index 58f11eddf..0acc739aa 100644 --- a/operators/constellation-node-operator/README.md +++ b/operators/constellation-node-operator/README.md @@ -24,7 +24,7 @@ Example for GCP: apiVersion: update.edgeless.systems/v1alpha1 kind: NodeVersion metadata: - name: constellation-os + name: constellation-version spec: image: "projects/constellation-images/global/images/" ``` @@ -34,7 +34,7 @@ Example for Azure: apiVersion: update.edgeless.systems/v1alpha1 kind: NodeVersion metadata: - name: constellation-os + name: constellation-version spec: image: "/subscriptions//resourceGroups/CONSTELLATION-IMAGES/providers/Microsoft.Compute/galleries/Constellation/images//versions/" ``` @@ -70,7 +70,7 @@ kind: ScalingGroup metadata: name: scalinggroup-worker spec: - nodeImage: "constellation-os" + nodeImage: "constellation-version" groupId: "projects//zones//instanceGroupManagers/" autoscaling: true ``` @@ -83,7 +83,7 @@ kind: ScalingGroup metadata: name: scalinggroup-worker spec: - nodeImage: "constellation-os" + nodeImage: "constellation-version" groupId: "/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachineScaleSets/" autoscaling: true ``` diff --git a/operators/constellation-node-operator/config/samples/update_v1alpha1_nodeversion.yaml b/operators/constellation-node-operator/config/samples/update_v1alpha1_nodeversion.yaml index 8d5eb817b..559c87338 100644 --- a/operators/constellation-node-operator/config/samples/update_v1alpha1_nodeversion.yaml +++ b/operators/constellation-node-operator/config/samples/update_v1alpha1_nodeversion.yaml @@ -1,7 +1,7 @@ apiVersion: update.edgeless.systems/v1alpha1 kind: NodeVersion metadata: - name: constellation-os-azure + name: constellation-version-azure namespace: kube-system spec: image: "/subscriptions//resourceGroups//providers/Microsoft.Compute/galleries//images//versions/" @@ -9,7 +9,7 @@ spec: apiVersion: update.edgeless.systems/v1alpha1 kind: NodeVersion metadata: - name: constellation-os-gcp + name: constellation-version-gcp namespace: kube-system spec: image: projects//global/images/ diff --git a/operators/constellation-node-operator/config/samples/update_v1alpha1_scalinggroup.yaml b/operators/constellation-node-operator/config/samples/update_v1alpha1_scalinggroup.yaml index db1a5c2c4..91130dadc 100644 --- a/operators/constellation-node-operator/config/samples/update_v1alpha1_scalinggroup.yaml +++ b/operators/constellation-node-operator/config/samples/update_v1alpha1_scalinggroup.yaml @@ -4,7 +4,7 @@ metadata: name: scalinggroup-worker-azure namespace: kube-system spec: - nodeImage: "constellation-os-azure" + nodeImage: "constellation-version-azure" groupId: "/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachineScaleSets/" autoscaling: true --- @@ -14,6 +14,6 @@ metadata: name: scalinggroup-worker-gcp namespace: kube-system spec: - nodeImage: "constellation-os-gcp" + nodeImage: "constellation-version-gcp" groupId: "projects//zones//instanceGroupManagers/" autoscaling: true