Skip to content

Commit

Permalink
Rename ProviderConfig to ProviderSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lipovetsky committed Oct 17, 2018
1 parent 19551f1 commit 3d67d3e
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ for machine in machines:
upgrade machine
```

The specific upgrade logic will be implement as part of the machine controller, and is specific to the provider. The user provided provider config will be in `machine.Spec.ProviderConfig`.
The specific upgrade logic will be implement as part of the machine controller, and is specific to the provider. The user provided provider config will be in `machine.Spec.ProviderSpec`.

Discussion around in-place vs replace upgrades [is here](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0003-cluster-api.md#in-place-vs-replace).

Expand Down
2 changes: 1 addition & 1 deletion config/crds/cluster_v1alpha1_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
- pods
- serviceDomain
type: object
providerConfig:
providerSpec:
properties:
value:
type: object
Expand Down
4 changes: 2 additions & 2 deletions config/crds/cluster_v1alpha1_machine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
type: object
metadata:
type: object
providerConfig:
providerSpec:
properties:
value:
type: object
Expand All @@ -49,7 +49,7 @@ spec:
- kubelet
type: object
required:
- providerConfig
- providerSpec
type: object
status:
properties:
Expand Down
4 changes: 2 additions & 2 deletions config/crds/cluster_v1alpha1_machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
type: object
metadata:
type: object
providerConfig:
providerSpec:
properties:
value:
type: object
Expand All @@ -81,7 +81,7 @@ spec:
- kubelet
type: object
required:
- providerConfig
- providerSpec
type: object
type: object
required:
Expand Down
4 changes: 2 additions & 2 deletions config/crds/cluster_v1alpha1_machineset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
type: object
metadata:
type: object
providerConfig:
providerSpec:
properties:
value:
type: object
Expand All @@ -63,7 +63,7 @@ spec:
- kubelet
type: object
required:
- providerConfig
- providerSpec
type: object
type: object
required:
Expand Down
6 changes: 3 additions & 3 deletions docs/proposals/machine-api-proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ provider-specific controller, and should be deleted as well.

Fields like the kubelet version are modeled as fields on the Machine's spec.
Any other information that is provider-specific, though, is part of an opaque
ProviderConfig string that is not portable between different providers.
ProviderSpec string that is not portable between different providers.

The ProviderConfig is recommended to be a serialized API object in a format
The ProviderSpec is recommended to be a serialized API object in a format
owned by that provider, akin to the [Component Config](https://goo.gl/opSc2o)
pattern. This will allow the configuration to be strongly typed, versioned, and
have as much nested depth as appropriate. These provider-specific API
definitions are meant to live outside of the Machines API, which will allow them
to evolve independently of it. Attributes like instance type, which network to
use, and the OS image all belong in the ProviderConfig.
use, and the OS image all belong in the ProviderSpec.

## In-place vs. Replace

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/cluster/common/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
// is not supported by this cluster. This is not a transient error, but
// indicates a state that must be fixed before progress can be made.
//
// Example: the ProviderConfig specifies an instance type that doesn't exist,
// Example: the ProviderSpec specifies an instance type that doesn't exist,
InvalidConfigurationMachineError MachineStatusError = "InvalidConfiguration"

// This indicates that the MachineSpec has been updated in a way that
Expand Down Expand Up @@ -92,7 +92,7 @@ const (
// is not supported by this cluster. This is not a transient error, but
// indicates a state that must be fixed before progress can be made.
//
// Example: the ProviderConfig specifies an instance type that doesn't exist.
// Example: the ProviderSpec specifies an instance type that doesn't exist.
InvalidConfigurationMachineSetError MachineSetStatusError = "InvalidConfiguration"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/cluster/v1alpha1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type ClusterSpec struct {
// their own versioned API types that should be
// serialized/deserialized from this field.
// +optional
ProviderConfig ProviderConfig `json:"providerConfig,omitempty"`
ProviderSpec ProviderSpec `json:"providerSpec,omitempty"`
}

// ClusterNetworkingConfig specifies the different networking
Expand Down
10 changes: 5 additions & 5 deletions pkg/apis/cluster/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package v1alpha1

import "k8s.io/apimachinery/pkg/runtime"

// ProviderConfig defines the configuration to use during node creation.
type ProviderConfig struct {
// ProviderSpec defines the configuration to use during node creation.
type ProviderSpec struct {

// No more than one of the following may be specified.

Expand All @@ -33,11 +33,11 @@ type ProviderConfig struct {
// Source for the provider configuration. Cannot be used if value is
// not empty.
// +optional
ValueFrom *ProviderConfigSource `json:"valueFrom,omitempty"`
ValueFrom *ProviderSpecSource `json:"valueFrom,omitempty"`
}

// ProviderConfigSource represents a source for the provider-specific
// ProviderSpecSource represents a source for the provider-specific
// resource configuration.
type ProviderConfigSource struct {
type ProviderSpecSource struct {
// TODO(roberthbailey): Fill these in later
}
2 changes: 1 addition & 1 deletion pkg/apis/cluster/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type MachineSpec struct {

// Provider-specific configuration to use during node creation.
// +optional
ProviderConfig ProviderConfig `json:"providerConfig"`
ProviderSpec ProviderSpec `json:"providerSpec"`

// Versions of key software to use. This field is optional at cluster
// creation time, and omitting the field indicates that the cluster
Expand Down
22 changes: 11 additions & 11 deletions pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sample/machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
labels:
foo: bar
spec:
providerConfig:
providerSpec:
value:
apiVersion: "gceproviderconfig/v1alpha1"
kind: "GCEProviderConfig"
Expand Down
2 changes: 1 addition & 1 deletion sample/machineset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
labels:
foo: bar
spec:
providerConfig:
providerSpec:
value:
apiVersion: "gceproviderconfig/v1alpha1"
kind: "GCEMachineProviderConfig"
Expand Down

0 comments on commit 3d67d3e

Please sign in to comment.