Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #599 from marun/remove-references-to-primitives
Browse files Browse the repository at this point in the history
Replace references to 'federation primitives' with 'federated type'
  • Loading branch information
k8s-ci-robot authored Feb 21, 2019
2 parents 5f523fc + 19f1f49 commit d56dfb3
Show file tree
Hide file tree
Showing 27 changed files with 73 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: clusterroles.rbac.authorization.k8s.io
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedClusterRole
pluralName: federatedclusterroles
version: v1alpha1
Expand All @@ -20,9 +20,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedclusterroles.primitives.federation.k8s.io
name: federatedclusterroles.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedClusterRole
plural: federatedclusterroles
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: configmaps
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedConfigMap
pluralName: federatedconfigmaps
version: v1alpha1
Expand All @@ -19,9 +19,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedconfigmaps.primitives.federation.k8s.io
name: federatedconfigmaps.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedConfigMap
plural: federatedconfigmaps
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/deployments.apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: deployments.apps
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedDeployment
pluralName: federateddeployments
version: v1alpha1
Expand All @@ -20,9 +20,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federateddeployments.primitives.federation.k8s.io
name: federateddeployments.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedDeployment
plural: federateddeployments
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/ingresses.extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: ingresses.extensions
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedIngress
pluralName: federatedingresses
version: v1alpha1
Expand All @@ -20,9 +20,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedingresses.primitives.federation.k8s.io
name: federatedingresses.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedIngress
plural: federatedingresses
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/jobs.batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: jobs.batch
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedJob
pluralName: federatedjobs
version: v1alpha1
Expand All @@ -20,9 +20,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedjobs.primitives.federation.k8s.io
name: federatedjobs.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedJob
plural: federatedjobs
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/namespaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: namespaces
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedNamespace
pluralName: federatednamespaces
version: v1alpha1
Expand All @@ -19,9 +19,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatednamespaces.primitives.federation.k8s.io
name: federatednamespaces.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedNamespace
plural: federatednamespaces
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/replicasets.apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: replicasets.apps
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedReplicaSet
pluralName: federatedreplicasets
version: v1alpha1
Expand All @@ -20,9 +20,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedreplicasets.primitives.federation.k8s.io
name: federatedreplicasets.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedReplicaSet
plural: federatedreplicasets
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: secrets
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedSecret
pluralName: federatedsecrets
version: v1alpha1
Expand All @@ -19,9 +19,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedsecrets.primitives.federation.k8s.io
name: federatedsecrets.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedSecret
plural: federatedsecrets
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/serviceaccounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: serviceaccounts
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedServiceAccount
pluralName: federatedserviceaccounts
version: v1alpha1
Expand All @@ -19,9 +19,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedserviceaccounts.primitives.federation.k8s.io
name: federatedserviceaccounts.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedServiceAccount
plural: federatedserviceaccounts
Expand Down
6 changes: 3 additions & 3 deletions charts/federation-v2/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: services
spec:
federatedType:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
kind: FederatedService
pluralName: federatedservices
version: v1alpha1
Expand All @@ -19,9 +19,9 @@ spec:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: federatedservices.primitives.federation.k8s.io
name: federatedservices.types.federation.k8s.io
spec:
group: primitives.federation.k8s.io
group: types.federation.k8s.io
names:
kind: FederatedService
plural: federatedservices
Expand Down
4 changes: 2 additions & 2 deletions docs/userguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ If the goal is to permanently disable federation of the target API type, passing
kubefed2 disable <FederatedTypeConfig Name> --delete-from-api
```

**WARNING: All primitive custom resources for the type will be removed by this command.**
**WARNING: All custom resources for the type will be removed by this command.**

## Example

Expand Down Expand Up @@ -253,7 +253,7 @@ kubectl apply -R -f example/sample1
**NOTE:** If you get the following error while creating a test resource i.e.

```
unable to recognize "example/sample1/federated<type>.yaml": no matches for kind "Federated<type>" in version "primitives.federation.k8s.io/v1alpha1",
unable to recognize "example/sample1/federated<type>.yaml": no matches for kind "Federated<type>" in version "types.federation.k8s.io/v1alpha1",

```
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedclusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedClusterRole
metadata:
name: test-clusterrole
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedclusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedClusterRoleBinding
metadata:
name: test-clusterrolebinding
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedconfigmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedConfigMap
metadata:
name: test-configmap
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federateddeployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedDeployment
metadata:
name: test-deployment
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedIngress
metadata:
name: test-ingress
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedJob
metadata:
name: test-job
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatednamespace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedNamespace
metadata:
name: test-namespace
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedsecret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedSecret
metadata:
name: test-secret
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedservice.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedService
metadata:
name: test-service
Expand Down
2 changes: 1 addition & 1 deletion example/sample1/federatedserviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: primitives.federation.k8s.io/v1alpha1
apiVersion: types.federation.k8s.io/v1alpha1
kind: FederatedServiceAccount
metadata:
name: test-serviceaccount
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/core/v1alpha1/federatedtypeconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ func (f *FederatedTypeConfig) GetEnableStatus() bool {
// TODO(marun) Remove in favor of using 'true' for namespaces and the
// value from target otherwise.
func (f *FederatedTypeConfig) GetFederatedNamespaced() bool {
// Special-case the scope of namespace primitives since it will
// hopefully be the only instance of the scope of a federation
// primitive differing from the scope of its target.
// Special-case the scope of federated namespace since it will
// hopefully be the only instance of the scope of a federated
// type differing from the scope of its target.

// TODO(marun) Use the constant in pkg/controller/util
if f.Name == "namespaces" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/sync/accessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (a *resourceAccessor) FederatedResource(eventSource util.QualifiedName) (Fe
Name: eventSource.Name,
}

// A federated primitive for namespace "foo" is namespaced
// A federated type for namespace "foo" is namespaced
// (e.g. "foo/foo"). An event sourced from a namespace in the host
// or member clusters will have the name "foo", and an event
// sourced from a federated resource will have the name "foo/foo".
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/sync/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ func (r *federatedResource) ObjectForCluster(clusterName string) (*unstructured.
//
// Namespace is the only type that can contain other resources,
// and adding a federation-specific container type would be
// difficult or impossible. This implies that federation
// primitives need to exist in regular namespaces.
// difficult or impossible. This implies that federated types need
// to exist in regular namespaces.
//
// TODO(marun) Ensure this is reflected in documentation
obj := &unstructured.Unstructured{}
Expand Down
12 changes: 6 additions & 6 deletions pkg/kubefed2/federate/directive.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ type EnableTypeDirectiveSpec struct {
// considers two resources to be equal.
ComparisonField common.VersionComparisonField `json:"comparisonField"`

// The name of the API group to use for generated federation primitives.
// The name of the API group to use for generated federation types.
// +optional
PrimitiveGroup string `json:"primitiveGroup,omitempty"`
FederationGroup string `json:"federationGroup,omitempty"`

// The API version to use for generated federation primitives.
// The API version to use for generated federation types.
// +optional
PrimitiveVersion string `json:"primitiveVersion,omitempty"`
FederationVersion string `json:"federationVersion,omitempty"`
}

// TODO(marun) This should become a proper API type and drive enabling
Expand All @@ -52,8 +52,8 @@ type EnableTypeDirective struct {
}

func (ft *EnableTypeDirective) SetDefaults() {
ft.Spec.PrimitiveGroup = defaultPrimitiveGroup
ft.Spec.PrimitiveVersion = defaultPrimitiveVersion
ft.Spec.FederationGroup = defaultFederationGroup
ft.Spec.FederationVersion = defaultFederationVersion
}

func NewEnableTypeDirective() *EnableTypeDirective {
Expand Down
Loading

0 comments on commit d56dfb3

Please sign in to comment.