Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
remove unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingtao Ren committed Jan 18, 2018
1 parent 3e42083 commit 1b8aef4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
4 changes: 0 additions & 4 deletions pkg/apis/etcd/v1beta2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ type PodPolicy struct {

// PersistentVolumeClaimSpec ...
PersistentVolumeClaimSpec *v1.PersistentVolumeClaimSpec `json:"persistentVolumeClaimSpec,omitempty"`

// By default, kubernetes will mount a service account token into the etcd pods.
// AutomountServiceAccountToken indicates whether pods running with the service account should have an API token automatically mounted.
AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`
}

func (c *ClusterSpec) Validate() error {
Expand Down
9 changes: 0 additions & 9 deletions pkg/apis/etcd/v1beta2/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,15 +572,6 @@ func (in *PodPolicy) DeepCopyInto(out *PodPolicy) {
(*in).DeepCopyInto(*out)
}
}
if in.AutomountServiceAccountToken != nil {
in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
}
return
}

Expand Down
1 change: 0 additions & 1 deletion pkg/controller/restore-operator/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ func (r *Restore) createSeedMember(ec *api.EtcdCluster, svcAddr, clusterName str
}
ms := etcdutil.NewMemberSet(m)
backupURL := backupapi.BackupURLForRestore("http", svcAddr, clusterName)

ec.SetDefaults()
pod := k8sutil.NewSeedMemberPod(clusterName, ms, m, ec.Spec, owner, backupURL)
_, err := r.kubecli.Core().Pods(r.namespace).Create(pod)
Expand Down
15 changes: 7 additions & 8 deletions pkg/util/k8sutil/self_hosted.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,13 @@ done
Spec: v1.PodSpec{
// Self-hosted etcd pod need to endure node restart.
// If we set it to Never, the pod won't restart. If etcd won't come up, nor does other k8s API components.
RestartPolicy: v1.RestartPolicyAlways,
Containers: []v1.Container{c},
Volumes: volumes,
HostNetwork: true,
DNSPolicy: v1.DNSClusterFirstWithHostNet,
Hostname: m.Name,
Subdomain: clusterName,
AutomountServiceAccountToken: func(b bool) *bool { return &b }(false),
RestartPolicy: v1.RestartPolicyAlways,
Containers: []v1.Container{c},
Volumes: volumes,
HostNetwork: true,
DNSPolicy: v1.DNSClusterFirstWithHostNet,
Hostname: m.Name,
Subdomain: clusterName,
},
}

Expand Down

0 comments on commit 1b8aef4

Please sign in to comment.