Skip to content

Switch apiGroup to cluster.x-k8s.io #919

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 1 commit into from
Jul 23, 2019
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
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version: "1"
domain: cluster.sigs.k8s.io
domain: cluster.x-k8s.io
repo: sigs.k8s.io/cluster-api-provider-aws
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func main() {
// Get a config to talk to the api-server.
cfg := config.GetConfigOrDie()
mgr, err := manager.New(cfg, manager.Options{
SyncPeriod: &syncPeriod,
Namespace: *watchNamespace,
SyncPeriod: &syncPeriod,
Namespace: *watchNamespace,
MetricsBindAddress: *metricsAddress,
})
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: awsclusterproviderspecs.infrastructure.cluster.sigs.k8s.io
name: awsclusterproviderspecs.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.sigs.k8s.io
group: infrastructure.cluster.x-k8s.io
names:
kind: AWSClusterProviderSpec
plural: awsclusterproviderspecs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: awsclusterproviderstatuses.infrastructure.cluster.sigs.k8s.io
name: awsclusterproviderstatuses.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.sigs.k8s.io
group: infrastructure.cluster.x-k8s.io
names:
kind: AWSClusterProviderStatus
plural: awsclusterproviderstatuses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: awsmachines.infrastructure.cluster.sigs.k8s.io
name: awsmachines.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.sigs.k8s.io
group: infrastructure.cluster.x-k8s.io
names:
kind: AWSMachine
plural: awsmachines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: awsmachinetemplates.infrastructure.cluster.sigs.k8s.io
name: awsmachinetemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.sigs.k8s.io
group: infrastructure.cluster.x-k8s.io
names:
kind: AWSMachineTemplate
plural: awsmachinetemplates
Expand Down
7 changes: 4 additions & 3 deletions config/crds/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# YAML string, with resources separated by document
# markers ("---").
resources:
- infrastructure.cluster.sigs.k8s.io_awsmachines.yaml
- infrastructure.cluster.sigs.k8s.io_awsclusterproviderspecs.yaml
- infrastructure.cluster.sigs.k8s.io_awsclusterproviderstatuses.yaml
- infrastructure.cluster.x-k8s.io_awsmachines.yaml
- infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml
- infrastructure.cluster.x-k8s.io_awsclusterproviderspecs.yaml
- infrastructure.cluster.x-k8s.io_awsclusterproviderstatuses.yaml
- awsprovider_v1alpha1_awsclusterproviderspec.yaml
- awsprovider_v1alpha1_awsclusterproviderstatus.yaml
- awsprovider_v1alpha1_awsmachineproviderspec.yaml
Expand Down
46 changes: 23 additions & 23 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ metadata:
name: manager-role
rules:
- apiGroups:
- awsprovider.k8s.io
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wish there was consistent sorting for the generation of this file 😂

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should have been fixed in the latest controller-tools

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- infrastructure.cluster.x-k8s.io
resources:
- awsclusterproviderconfigs
- awsclusterproviderstatuses
- awsmachines
- awsmachines/status
verbs:
- create
- delete
Expand All @@ -20,54 +20,54 @@ rules:
- update
- watch
- apiGroups:
- cluster.sigs.k8s.io
- ""
resources:
- clusters
- clusters/status
- machines
- machines/status
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.sigs.k8s.io
- ""
resources:
- awsmachines
- awsmachines/status
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- secrets
- events
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
- awsprovider.k8s.io
resources:
- configmaps
- awsclusterproviderconfigs
- awsclusterproviderstatuses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
- cluster.x-k8s.io
resources:
- events
- clusters
- clusters/status
- machines
- machines/status
verbs:
- create
- delete
Expand Down
2 changes: 1 addition & 1 deletion config/samples/infrastructure_v1alpha2_awsmachine.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: infrastructure.cluster.sigs.k8s.io/v1alpha2
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachine
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: infrastructure.cluster.sigs.k8s.io/v1alpha2
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSMachineTemplate
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/infrastructure_v1alpha2_machine.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: infrastructure.cluster.sigs.k8s.io/v1alpha2
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: Machine
metadata:
labels:
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/awsprovider/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
)

const (
AnnotationClusterInfrastructureReady = "aws.cluster.sigs.k8s.io/infrastructure-ready"
AnnotationControlPlaneReady = "aws.cluster.sigs.k8s.io/control-plane-ready"
AnnotationClusterInfrastructureReady = "aws.cluster.x-k8s.io/infrastructure-ready"
AnnotationControlPlaneReady = "aws.cluster.x-k8s.io/control-plane-ready"
ValueReady = "true"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/infrastructure/v1alpha2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/pkg/apis/infrastructure
// +k8s:defaulter-gen=TypeMeta
// +groupName=infrastructure.cluster.sigs.k8s.io
// +groupName=infrastructure.cluster.x-k8s.io
package v1alpha2
4 changes: 2 additions & 2 deletions pkg/apis/infrastructure/v1alpha2/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-aws/pkg/apis/infrastructure
// +k8s:defaulter-gen=TypeMeta
// +groupName=infrastructure.cluster.sigs.k8s.io
// +groupName=infrastructure.cluster.x-k8s.io
package v1alpha2

import (
Expand All @@ -33,7 +33,7 @@ import (

var (
// SchemeGroupVersion is group version used to register these objects
SchemeGroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.sigs.k8s.io", Version: "v1alpha2"}
SchemeGroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha2"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/infrastructure/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
)

const (
AnnotationClusterInfrastructureReady = "aws.infrastructure.cluster.sigs.k8s.io/infrastructure-ready"
AnnotationControlPlaneReady = "aws.infrastructure.cluster.sigs.k8s.io/control-plane-ready"
AnnotationClusterInfrastructureReady = "aws.infrastructure.cluster.x-k8s.io/infrastructure-ready"
AnnotationControlPlaneReady = "aws.infrastructure.cluster.x-k8s.io/control-plane-ready"
ValueReady = "true"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=create;get;delete
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=awsprovider.k8s.io,resources=awsclusterproviderconfigs;awsclusterproviderstatuses,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=cluster.sigs.k8s.io,resources=machines;machines/status;clusters;clusters/status,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=infrastructure.cluster.sigs.k8s.io,resources=awsmachines;awsmachines/status,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status;clusters;clusters/status,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=awsmachines;awsmachines/status,verbs=get;list;watch;create;update;patch;delete

// AddToManagerFuncs is a list of functions to add all Controllers to the Manager
var AddToManagerFuncs []func(manager.Manager) error
Expand Down