This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from rfranzke/fix/worker-machine-image
Worker delegates store machine image information in provider status
- Loading branch information
Showing
90 changed files
with
2,843 additions
and
128 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
controllers/provider-alicloud/pkg/apis/alicloud/types_worker.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package alicloud | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// WorkerStatus contains information about created worker resources. | ||
type WorkerStatus struct { | ||
metav1.TypeMeta | ||
|
||
// MachineImages is a list of machine images that have been used in this worker. Usually, the extension controller | ||
// gets the mapping from name/version to the provider-specific machine image data in its componentconfig. However, if | ||
// a version that is still in use gets removed from this componentconfig it cannot reconcile anymore existing `Worker` | ||
// resources that are still using this version. Hence, it stores the used versions in the provider status to ensure | ||
// reconciliation is possible. | ||
MachineImages []MachineImage | ||
} | ||
|
||
// MachineImage is a mapping from logical names and versions to provider-specific machine image data. | ||
type MachineImage struct { | ||
// Name is the logical name of the machine image. | ||
Name string | ||
// Version is the logical version of the machine image. | ||
Version string | ||
// ID is the id of the image. | ||
ID string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
controllers/provider-alicloud/pkg/apis/alicloud/v1alpha1/types_worker.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// WorkerStatus contains information about created worker resources. | ||
type WorkerStatus struct { | ||
metav1.TypeMeta `json:",inline"` | ||
|
||
// MachineImages is a list of machine images that have been used in this worker. Usually, the extension controller | ||
// gets the mapping from name/version to the provider-specific machine image data in its componentconfig. However, if | ||
// a version that is still in use gets removed from this componentconfig it cannot reconcile anymore existing `Worker` | ||
// resources that are still using this version. Hence, it stores the used versions in the provider status to ensure | ||
// reconciliation is possible. | ||
// +optional | ||
MachineImages []MachineImage `json:"machineImages,omitempty"` | ||
} | ||
|
||
// MachineImage is a mapping from logical names and versions to provider-specific machine image data. | ||
type MachineImage struct { | ||
// Name is the logical name of the machine image. | ||
Name string `json:"name"` | ||
// Version is the logical version of the machine image. | ||
Version string `json:"version"` | ||
// ID is the id of the image. | ||
ID string `json:"id"` | ||
} |
64 changes: 64 additions & 0 deletions
64
controllers/provider-alicloud/pkg/apis/alicloud/v1alpha1/zz_generated.conversion.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
controllers/provider-alicloud/pkg/apis/alicloud/v1alpha1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
controllers/provider-alicloud/pkg/apis/alicloud/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.