Skip to content

Commit 75e5c6c

Browse files
authored
chore: fix some typos (#476)
Signed-off-by: avoidalone <wuguangdong@outlook.com>
1 parent b078aee commit 75e5c6c

29 files changed

+95
-95
lines changed

pkg/k8s/containers/containers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
// Containers represents Kubernetes Containers
88
type Containers []Container
99

10-
// ToK8S converts Containers to Kuberntes client objects
10+
// ToK8S converts Containers to Kubernetes client objects
1111
func (cs Containers) ToK8S() (l []v1.Container) {
1212
if len(cs) > 0 {
1313
l = make([]v1.Container, 0, len(cs))
@@ -44,7 +44,7 @@ type Container struct {
4444
WorkingDir string
4545
}
4646

47-
// ToK8S converts Container to Kuberntes client object
47+
// ToK8S converts Container to Kubernetes client object
4848
func (c *Container) ToK8S() v1.Container {
4949
return v1.Container{
5050
Name: c.Name,

pkg/k8s/containers/env.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
// EnvVars represents Kubernetes EnvVars
99
type EnvVars []EnvVar
1010

11-
// toK8S converts EnvVars to Kuberntes client objects
11+
// toK8S converts EnvVars to Kubernetes client objects
1212
func (evs EnvVars) toK8S() (l []v1.EnvVar) {
1313
if len(evs) > 0 {
1414
l = make([]v1.EnvVar, 0, len(evs))
@@ -27,7 +27,7 @@ type EnvVar struct {
2727
ValueFrom ValueFrom
2828
}
2929

30-
// toK8S converts EnvVar to Kuberntes client object
30+
// toK8S converts EnvVar to Kubernetes client object
3131
func (ev *EnvVar) toK8S() v1.EnvVar {
3232
return v1.EnvVar{
3333
Name: ev.Name,
@@ -55,7 +55,7 @@ type Field struct {
5555
Path string
5656
}
5757

58-
// toK8S converts Field to Kuberntes client object
58+
// toK8S converts Field to Kubernetes client object
5959
func (f *Field) toK8S() *v1.ObjectFieldSelector {
6060
return &v1.ObjectFieldSelector{
6161
APIVersion: f.APIVersion,
@@ -70,7 +70,7 @@ type ResourceField struct {
7070
Divisor string
7171
}
7272

73-
// toK8S converts ResourceField to Kuberntes client object
73+
// toK8S converts ResourceField to Kubernetes client object
7474
func (rf *ResourceField) toK8S() *v1.ResourceFieldSelector {
7575
return &v1.ResourceFieldSelector{
7676
ContainerName: rf.ContainerName,
@@ -86,7 +86,7 @@ type ConfigMapKey struct {
8686
Optional bool
8787
}
8888

89-
// toK8S converts ConfigMapKey to Kuberntes client object
89+
// toK8S converts ConfigMapKey to Kubernetes client object
9090
func (cmk *ConfigMapKey) toK8S() *v1.ConfigMapKeySelector {
9191
return &v1.ConfigMapKeySelector{
9292
LocalObjectReference: v1.LocalObjectReference{Name: cmk.ConfigMapName},
@@ -102,7 +102,7 @@ type SecretKey struct {
102102
Optional bool
103103
}
104104

105-
// toK8S converts SecretKey to Kuberntes client object
105+
// toK8S converts SecretKey to Kubernetes client object
106106
func (sk *SecretKey) toK8S() *v1.SecretKeySelector {
107107
return &v1.SecretKeySelector{
108108
LocalObjectReference: v1.LocalObjectReference{Name: sk.SecretName},
@@ -131,7 +131,7 @@ type EnvFrom struct {
131131
Secret SecretRef
132132
}
133133

134-
// toK8S converts EnvFrom to Kuberntes client object
134+
// toK8S converts EnvFrom to Kubernetes client object
135135
func (ef *EnvFrom) toK8S() v1.EnvFromSource {
136136
return v1.EnvFromSource{
137137
Prefix: ef.Prefix,
@@ -146,7 +146,7 @@ type ConfigMapRef struct {
146146
Optional bool
147147
}
148148

149-
// toK8S converts ConfigMapRef to Kuberntes client object
149+
// toK8S converts ConfigMapRef to Kubernetes client object
150150
func (cm *ConfigMapRef) toK8S() *v1.ConfigMapEnvSource {
151151
return &v1.ConfigMapEnvSource{
152152
LocalObjectReference: v1.LocalObjectReference{Name: cm.Name},
@@ -160,7 +160,7 @@ type SecretRef struct {
160160
Optional bool
161161
}
162162

163-
// toK8S converts SecretRef to Kuberntes client object
163+
// toK8S converts SecretRef to Kubernetes client object
164164
func (s *SecretRef) toK8S() *v1.SecretEnvSource {
165165
return &v1.SecretEnvSource{
166166
LocalObjectReference: v1.LocalObjectReference{Name: s.Name},

pkg/k8s/containers/ephemeral.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import v1 "k8s.io/api/core/v1"
55
// EphemeralContainers represents Kubernetes EphemeralContainers
66
type EphemeralContainers []EphemeralContainer
77

8-
// ToK8S converts EphemeralContainers to Kuberntes client objects
8+
// ToK8S converts EphemeralContainers to Kubernetes client objects
99
func (ecs EphemeralContainers) ToK8S() (l []v1.EphemeralContainer) {
1010
if len(ecs) > 0 {
1111
l = make([]v1.EphemeralContainer, 0, len(ecs))
@@ -22,7 +22,7 @@ type EphemeralContainer struct {
2222
TargetContainerName string
2323
}
2424

25-
// ToK8S converts EphemeralContainer to Kuberntes client object
25+
// ToK8S converts EphemeralContainer to Kubernetes client object
2626
func (ec *EphemeralContainer) ToK8S() v1.EphemeralContainer {
2727
return v1.EphemeralContainer{
2828
EphemeralContainerCommon: ec.EphemeralContainerCommon.toK8S(),
@@ -56,7 +56,7 @@ type EphemeralContainerCommon struct {
5656
WorkingDir string
5757
}
5858

59-
// ToK8S converts EphemeralContainerCommon to Kuberntes client object
59+
// ToK8S converts EphemeralContainerCommon to Kubernetes client object
6060
func (ecc *EphemeralContainerCommon) toK8S() v1.EphemeralContainerCommon {
6161
return v1.EphemeralContainerCommon{
6262
Name: ecc.Name,

pkg/k8s/containers/handler.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type LifecycleHandler struct {
1212
TCPSocket *TCPSocketHandler
1313
}
1414

15-
// toK8S converts Handler to Kuberntes client object
15+
// toK8S converts Handler to Kubernetes client object
1616
func (h *LifecycleHandler) toK8S() v1.LifecycleHandler {
1717
if h.Exec != nil {
1818
return v1.LifecycleHandler{
@@ -35,7 +35,7 @@ type ExecHandler struct {
3535
Command []string
3636
}
3737

38-
// toK8S converts ExecHandler to Kuberntes client object
38+
// toK8S converts ExecHandler to Kubernetes client object
3939
func (eh *ExecHandler) toK8S() *v1.ExecAction {
4040
return &v1.ExecAction{
4141
Command: eh.Command,
@@ -51,7 +51,7 @@ type HTTPGetHandler struct {
5151
HTTPHeaders HTTPHeaders
5252
}
5353

54-
// toK8S converts HTTPGetHandler to Kuberntes client object
54+
// toK8S converts HTTPGetHandler to Kubernetes client object
5555
func (hg *HTTPGetHandler) toK8S() *v1.HTTPGetAction {
5656
return &v1.HTTPGetAction{
5757
Host: hg.Host,
@@ -65,7 +65,7 @@ func (hg *HTTPGetHandler) toK8S() *v1.HTTPGetAction {
6565
// HTTPHeaders represents Kubernetes HTTPHeader
6666
type HTTPHeaders []HTTPHeader
6767

68-
// toK8S converts HTTPHeaders to Kuberntes client objects
68+
// toK8S converts HTTPHeaders to Kubernetes client objects
6969
func (hhs HTTPHeaders) toK8S() (l []v1.HTTPHeader) {
7070
if len(hhs) > 0 {
7171
l = make([]v1.HTTPHeader, 0, len(hhs))
@@ -82,7 +82,7 @@ type HTTPHeader struct {
8282
Value string
8383
}
8484

85-
// toK8S converts HTTPHeader to Kuberntes client object
85+
// toK8S converts HTTPHeader to Kubernetes client object
8686
func (hh *HTTPHeader) toK8S() v1.HTTPHeader {
8787
return v1.HTTPHeader{
8888
Name: hh.Name,
@@ -96,7 +96,7 @@ type TCPSocketHandler struct {
9696
Port string
9797
}
9898

99-
// toK8S converts TCPSocketHandler to Kuberntes client object
99+
// toK8S converts TCPSocketHandler to Kubernetes client object
100100
func (tcps *TCPSocketHandler) toK8S() *v1.TCPSocketAction {
101101
return &v1.TCPSocketAction{
102102
Host: tcps.Host,

pkg/k8s/containers/lifecycle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Lifecycle struct {
88
PreStop *LifecycleHandler
99
}
1010

11-
// toK8S converts Lifecycle to Kuberntes client object
11+
// toK8S converts Lifecycle to Kubernetes client object
1212
func (l *Lifecycle) toK8S() *v1.Lifecycle {
1313
if l.PostStart == nil && l.PreStop == nil {
1414
return nil

pkg/k8s/containers/port.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import v1 "k8s.io/api/core/v1"
55
// Ports represents Kubernetes ContainerPorts
66
type Ports []Port
77

8-
// toK8S converts Ports to Kuberntes client object
8+
// toK8S converts Ports to Kubernetes client object
99
func (ps Ports) toK8S() (l []v1.ContainerPort) {
1010
if len(ps) > 0 {
1111
l = make([]v1.ContainerPort, 0, len(ps))
@@ -25,7 +25,7 @@ type Port struct {
2525
Protocol string
2626
}
2727

28-
// toK8S converts Port to Kuberntes client object
28+
// toK8S converts Port to Kubernetes client object
2929
func (p *Port) toK8S() v1.ContainerPort {
3030
return v1.ContainerPort{
3131
Name: p.Name,

pkg/k8s/containers/probe.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Probe struct {
1111
TCPSocket *TCPSocketProbe
1212
}
1313

14-
// toK8S converts Containers to Kuberntes client object
14+
// toK8S converts Containers to Kubernetes client object
1515
func (p *Probe) toK8S() *v1.Probe {
1616
if p.Exec != nil {
1717
return p.Exec.toK8S()
@@ -33,7 +33,7 @@ type ExecProbe struct {
3333
TimeoutSeconds int32
3434
}
3535

36-
// toK8S converts ExecProbe to Kuberntes client object
36+
// toK8S converts ExecProbe to Kubernetes client object
3737
func (ep *ExecProbe) toK8S() *v1.Probe {
3838
return &v1.Probe{
3939
FailureThreshold: ep.FailureThreshold,
@@ -57,7 +57,7 @@ type HTTPGetProbe struct {
5757
TimeoutSeconds int32
5858
}
5959

60-
// toK8S converts HTTPGetProbe to Kuberntes client object
60+
// toK8S converts HTTPGetProbe to Kubernetes client object
6161
func (hgp *HTTPGetProbe) toK8S() *v1.Probe {
6262
return &v1.Probe{
6363
FailureThreshold: hgp.FailureThreshold,
@@ -81,7 +81,7 @@ type TCPSocketProbe struct {
8181
TimeoutSeconds int32
8282
}
8383

84-
// toK8S converts TCPSocketProbe to Kuberntes client object
84+
// toK8S converts TCPSocketProbe to Kubernetes client object
8585
func (tsp *TCPSocketProbe) toK8S() *v1.Probe {
8686
return &v1.Probe{
8787
FailureThreshold: tsp.FailureThreshold,

pkg/k8s/containers/resources.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Resources struct {
1111
Request Request
1212
}
1313

14-
// toK8S converts Resources to Kuberntes client object
14+
// toK8S converts Resources to Kubernetes client object
1515
func (r *Resources) toK8S() v1.ResourceRequirements {
1616
return v1.ResourceRequirements{
1717
Limits: r.Limit.toK8S(),
@@ -27,7 +27,7 @@ type Limit struct {
2727
EphemeralStorage string
2828
}
2929

30-
// toK8S converts Limit to Kuberntes client object
30+
// toK8S converts Limit to Kubernetes client object
3131
func (l *Limit) toK8S() v1.ResourceList {
3232
m := map[v1.ResourceName]resource.Quantity{}
3333
if len(l.CPU) > 0 {
@@ -53,7 +53,7 @@ type Request struct {
5353
EphemeralStorage string
5454
}
5555

56-
// toK8S converts Request to Kuberntes client object
56+
// toK8S converts Request to Kubernetes client object
5757
func (r *Request) toK8S() v1.ResourceList {
5858
m := map[v1.ResourceName]resource.Quantity{}
5959
if len(r.CPU) > 0 {

pkg/k8s/containers/security.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type SecurityContext struct {
1616
WindowsOptions WindowsOptions
1717
}
1818

19-
// toK8S converts SecurityContext to Kuberntes client object
19+
// toK8S converts SecurityContext to Kubernetes client object
2020
func (sc *SecurityContext) toK8S() *v1.SecurityContext {
2121
return &v1.SecurityContext{
2222
AllowPrivilegeEscalation: &sc.AllowPrivilegeEscalation,
@@ -41,7 +41,7 @@ type Capabilities struct {
4141
Drop []string
4242
}
4343

44-
// toK8S converts Capabilities to Kuberntes client object
44+
// toK8S converts Capabilities to Kubernetes client object
4545
func (cap *Capabilities) toK8S() *v1.Capabilities {
4646
if cap.Add == nil && cap.Drop == nil {
4747
return nil
@@ -65,7 +65,7 @@ type SELinuxOptions struct {
6565
Level string
6666
}
6767

68-
// toK8S converts SELinuxOptions to Kuberntes client object
68+
// toK8S converts SELinuxOptions to Kubernetes client object
6969
func (se *SELinuxOptions) toK8S() *v1.SELinuxOptions {
7070
return &v1.SELinuxOptions{
7171
User: se.User,

pkg/k8s/containers/volume.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import v1 "k8s.io/api/core/v1"
55
// VolumeDevices represents Kubernetes VolumeDevices
66
type VolumeDevices []VolumeDevice
77

8-
// toK8S converts VolumeDevices to Kuberntes client objects
8+
// toK8S converts VolumeDevices to Kubernetes client objects
99
func (vds VolumeDevices) toK8S() (l []v1.VolumeDevice) {
1010
if len(vds) > 0 {
1111
l = make([]v1.VolumeDevice, 0, len(vds))
@@ -22,7 +22,7 @@ type VolumeDevice struct {
2222
DevicePath string
2323
}
2424

25-
// toK8S converts VolumeDevice to Kuberntes client object
25+
// toK8S converts VolumeDevice to Kubernetes client object
2626
func (vd *VolumeDevice) toK8S() v1.VolumeDevice {
2727
return v1.VolumeDevice{
2828
Name: vd.Name,
@@ -33,7 +33,7 @@ func (vd *VolumeDevice) toK8S() v1.VolumeDevice {
3333
// VolumeMounts represents Kubernetes VolumeMounts
3434
type VolumeMounts []VolumeMount
3535

36-
// toK8S converts VolumeMounts to Kuberntes client objects
36+
// toK8S converts VolumeMounts to Kubernetes client objects
3737
func (vms VolumeMounts) toK8S() (l []v1.VolumeMount) {
3838
if len(vms) > 0 {
3939
l = make([]v1.VolumeMount, 0, len(vms))
@@ -52,7 +52,7 @@ type VolumeMount struct {
5252
ReadOnly bool
5353
}
5454

55-
// toK8S converts VolumeMount to Kuberntes client object
55+
// toK8S converts VolumeMount to Kubernetes client object
5656
func (v *VolumeMount) toK8S() v1.VolumeMount {
5757
return v1.VolumeMount{
5858
Name: v.Name,

0 commit comments

Comments
 (0)