generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 29
Propagate ClusterID to Cloud Map & Endpoints #165
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
matthewgoodman13
merged 39 commits into
aws:main
from
matthewgoodman13:reconcileclusterid
Jul 29, 2022
Merged
Changes from 33 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
62bd318
Added managed by label - issue 110
matthewgoodman13 87d6b78
Merge pull request #1 from aws/main
matthewgoodman13 39b4a1e
Merge branch 'main' of https://github.com/matthewgoodman13/aws-cloud-…
matthewgoodman13 5247ede
Merge branch 'main' of https://github.com/aws/aws-cloud-map-mcs-contr…
matthewgoodman13 6101a8b
migration to multigroup structure
matthewgoodman13 51f7bfd
updated paths in PROJECT
matthewgoodman13 fe47782
updated paths in .golangci & .codecov
matthewgoodman13 b2cd852
ClusterID recognized & watched for changes + sync
matthewgoodman13 0c64aa0
clusterid sync with cloudmap + recognized
matthewgoodman13 1e2ea91
Merge branch 'multicluster-clusterproperty' of https://github.com/mat…
matthewgoodman13 317683f
fix commit - clusterid recon + synced
matthewgoodman13 e3d3628
Merge branch 'multicluster-clusterproperty' of https://github.com/mat…
matthewgoodman13 83efd8a
fix controller
matthewgoodman13 df658e1
Merge branch 'multicluster-clusterproperty' of https://github.com/mat…
matthewgoodman13 ecb982a
test constants
matthewgoodman13 875f1a6
recon
matthewgoodman13 225dc65
changes to test
matthewgoodman13 1ebd09c
cm controller
matthewgoodman13 c62594f
Merge branch 'aws:main' into main
matthewgoodman13 eb48ca3
controllers
matthewgoodman13 da59438
fix commit - clusterid recon + synced
matthewgoodman13 e2ecb4c
fix controller
matthewgoodman13 afc57c5
clusterid sync with cloudmap + recognized
matthewgoodman13 b927ad9
ClusterID recognized & watched for changes + sync
matthewgoodman13 9469117
test constants
matthewgoodman13 7c38f36
recon
matthewgoodman13 0807deb
changes to test
matthewgoodman13 e617634
cm controller
matthewgoodman13 76f2cb0
Merge branch 'reconcileclusterid' of https://github.com/matthewgoodma…
matthewgoodman13 0bbf754
rm changes
matthewgoodman13 56514cd
rm meta
matthewgoodman13 87b0dbf
rm return
matthewgoodman13 a8da279
unit tests + clusterid error
matthewgoodman13 b35bc75
addition of clustersetid and other changes
matthewgoodman13 1768755
cleanup of get/set of clusterId and clustersetId
matthewgoodman13 b04b7db
clusterUtils
matthewgoodman13 ad4e972
Merge branch 'main' into reconcileclusterid
matthewgoodman13 62e4f8d
fix merge conflicts
matthewgoodman13 1aa5dde
clusterId/setId method called twice
matthewgoodman13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,65 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.8.0 | ||
creationTimestamp: null | ||
name: clusterproperties.about.k8s.io | ||
spec: | ||
group: about.k8s.io | ||
names: | ||
kind: ClusterProperty | ||
listKind: ClusterPropertyList | ||
plural: clusterproperties | ||
singular: clusterproperty | ||
scope: Cluster | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .spec.value | ||
name: value | ||
type: string | ||
- jsonPath: .metadata.creationTimestamp | ||
name: age | ||
type: date | ||
name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: ClusterProperty is the Schema for the clusterproperties 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: ClusterPropertySpec defines the desired state of ClusterProperty | ||
properties: | ||
value: | ||
description: ClusterProperty value | ||
minLength: 1 | ||
type: string | ||
required: | ||
- value | ||
type: object | ||
status: | ||
description: ClusterPropertyStatus defines the observed state of ClusterProperty | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
This file contains hidden or 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 hidden or 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,7 @@ | ||
# The following patch adds an annotation to pass protected groups approval required to use domain "k8s.io" | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
api-approved.kubernetes.io: "https://github.com/kubernetes/kubernetes/pull/78458" | ||
name: clusterproperties.about.k8s.io |
This file contains hidden or 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,7 @@ | ||
# The following patch adds a directive for certmanager to inject CA into the CRD | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) | ||
name: clusterproperties.about.k8s.io |
This file contains hidden or 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,16 @@ | ||
# The following patch enables a conversion webhook for the CRD | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: clusterproperties.about.k8s.io | ||
spec: | ||
conversion: | ||
strategy: Webhook | ||
webhook: | ||
clientConfig: | ||
service: | ||
namespace: system | ||
name: webhook-service | ||
path: /convert | ||
conversionReviewVersions: | ||
- v1 |
This file contains hidden or 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,8 @@ | ||
# An example object of `id.k8s.io ClusterProperty` | ||
|
||
apiVersion: about.k8s.io/v1alpha1 | ||
kind: ClusterProperty | ||
metadata: | ||
name: id.k8s.io | ||
spec: | ||
value: sample-mcs-clusterid |
This file contains hidden or 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 hidden or 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,52 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
// ClusterPropertySpec defines the desired state of ClusterProperty | ||
type ClusterPropertySpec struct { | ||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
|
||
// ClusterProperty value | ||
// +kubebuilder:validation:Maxlength=128000 | ||
// +kubebuilder:validation:MinLength=1 | ||
Value string `json:"value"` | ||
} | ||
|
||
// ClusterPropertyStatus defines the observed state of ClusterProperty | ||
type ClusterPropertyStatus struct { | ||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
|
||
// ClusterProperty is the Schema for the clusterproperties API | ||
// +kubebuilder:printcolumn:name="value",type=string,JSONPath=`.spec.value` | ||
// +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp` | ||
type ClusterProperty struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ClusterPropertySpec `json:"spec,omitempty"` | ||
Status ClusterPropertyStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// ClusterPropertyList contains a list of ClusterProperty | ||
type ClusterPropertyList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []ClusterProperty `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&ClusterProperty{}, &ClusterPropertyList{}) | ||
} |
This file contains hidden or 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,20 @@ | ||
// Package v1alpha1 contains API Schema definitions for the about v1alpha1 API group | ||
//+kubebuilder:object:generate=true | ||
//+groupName=about.k8s.io | ||
package v1alpha1 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"sigs.k8s.io/controller-runtime/pkg/scheme" | ||
) | ||
|
||
var ( | ||
// GroupVersion is group version used to register these objects | ||
GroupVersion = schema.GroupVersion{Group: "about.k8s.io", Version: "v1alpha1"} | ||
|
||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme | ||
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} | ||
|
||
// AddToScheme adds the types in this group-version to the given scheme. | ||
AddToScheme = SchemeBuilder.AddToScheme | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.