8000 upgrade: fix broken reference from constellation-os to constellation-version by datosh · Pull Request #939 · edgelesssys/constellation · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

upgrade: fix broken reference from constellation-os to constellation-version #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/internal/cloudcmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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{})
}

Expand All @@ -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{})
}

Expand Down
2 changes: 1 addition & 1 deletion internal/kubernetes/kubectl/kubectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 4 additions & 4 deletions operators/constellation-node-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<image-name>"
```
Expand All @@ -34,7 +34,7 @@ Example for Azure:
apiVersion: update.edgeless.systems/v1alpha1
kind: NodeVersion
metadata:
name: constellation-os
name: constellation-version
spec:
image: "/subscriptions/<subscription-id>/resourceGroups/CONSTELLATION-IMAGES/providers/Microsoft.Compute/galleries/Constellation/images/<image-definition-name>/versions/<image-version>"
```
Expand Down Expand Up @@ -70,7 +70,7 @@ kind: ScalingGroup
metadata:
name: scalinggroup-worker
spec:
nodeImage: "constellation-os"
nodeImage: "constellation-version"
groupId: "projects/<project-id>/zones/<zone>/instanceGroupManagers/<instance-group-name>"
autoscaling: true
```
Expand All @@ -83,7 +83,7 @@ kind: ScalingGroup
metadata:
name: scalinggroup-worker
spec:
nodeImage: "constellation-os"
nodeImage: "constellation-version"
groupId: "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachineScaleSets/<scale-set-name>"
autoscaling: true
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: update.edgeless.systems/v1alpha1
kind: NodeVersion
metadata:
name: constellation-os-azure
name: constellation-version-azure
namespace: kube-system
spec:
image: "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/galleries/<gallery-name>/images/<image-definition-name>/versions/<version>"
---
apiVersion: update.edgeless.systems/v1alpha1
kind: NodeVersion
metadata:
name: constellation-os-gcp
name: constellation-version-gcp
namespace: kube-system
spec:
image: projects/<project>/global/images/<image-name>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: scalinggroup-worker-azure
namespace: kube-system
spec:
nodeImage: "constellation-os-azure"
nodeImage: "constellation-version-azure"
groupId: "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachineScaleSets/<scale-set-name>"
autoscaling: true
---
Expand All @@ -14,6 +14,6 @@ metadata:
name: scalinggroup-worker-gcp
namespace: kube-system
spec:
nodeImage: "constellation-os-gcp"
nodeImage: "constellation-version-gcp"
groupId: "projects/<project>/zones/<zone>/instanceGroupManagers/<instance-group-name>"
autoscaling: true
0