Skip to content

Commit

Permalink
Merge pull request #1454 from vincepri/fix-objectmeta-comment
Browse files Browse the repository at this point in the history
⚠️ Clarify Machine.Spec.ObjectMeta use in godoc
  • Loading branch information
k8s-ci-robot authored Sep 26, 2019
2 parents 90cbdd1 + 872349b commit 7f82f67
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
4 changes: 1 addition & 3 deletions api/v1alpha2/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ const (

// MachineSpec defines the desired state of Machine
type MachineSpec struct {
// ObjectMeta will autopopulate the Node created. Use this to
// indicate what labels, annotations, name prefix, etc., should be used
// when creating the Node.
// DEPRECATED: ObjectMeta has no function and isn't used anywhere.
// +optional
ObjectMeta `json:"metadata,omitempty"`

Expand Down
5 changes: 2 additions & 3 deletions config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,8 @@ spec:
type: string
type: object
metadata:
description: ObjectMeta will autopopulate the Node created.
Use this to indicate what labels, annotations, name prefix,
etc., should be used when creating the Node.
description: 'DEPRECATED: ObjectMeta has no function and isn''t
used anywhere.'
properties:
annotations:
additionalProperties:
Expand Down
5 changes: 2 additions & 3 deletions config/crd/bases/cluster.x-k8s.io_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ spec:
type: string
type: object
metadata:
description: ObjectMeta will autopopulate the Node created. Use this
to indicate what labels, annotations, name prefix, etc., should be
used when creating the Node.
description: 'DEPRECATED: ObjectMeta has no function and isn''t used
anywhere.'
properties:
annotations:
additionalProperties:
Expand Down
5 changes: 2 additions & 3 deletions config/crd/bases/cluster.x-k8s.io_machinesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,8 @@ spec:
type: string
type: object
metadata:
description: ObjectMeta will autopopulate the Node created.
Use this to indicate what labels, annotations, name prefix,
etc., should be used when creating the Node.
description: 'DEPRECATED: ObjectMeta has no function and isn''t
used anywhere.'
properties:
annotations:
additionalProperties:
Expand Down
4 changes: 2 additions & 2 deletions controllers/mdutil/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func TestFindNewMachineSet(t *testing.T) {
newMSDup.CreationTimestamp = now

oldDeployment := generateDeployment("nginx")
oldDeployment.Spec.Template.Spec.Name = "nginx-old-1"
oldDeployment.Spec.Template.Name = "nginx-old-1"
oldMS := generateMS(oldDeployment)
oldMS.Status.FullyLabeledReplicas = *(oldMS.Spec.Replicas)

Expand Down Expand Up @@ -259,7 +259,7 @@ func TestFindOldMachineSets(t *testing.T) {
newMSDup.CreationTimestamp = now

oldDeployment := generateDeployment("nginx")
oldDeployment.Spec.Template.Spec.Name = "nginx-old-1"
oldDeployment.Spec.Template.Name = "nginx-old-1"
oldMS := generateMS(oldDeployment)
oldMS.Status.FullyLabeledReplicas = *(oldMS.Spec.Replicas)
oldMS.CreationTimestamp = before
Expand Down

0 comments on commit 7f82f67

Please sign in to comment.