@@ -94,16 +94,16 @@ type SubResourceClientConstructor interface {
94
94
// - ServiceAccount token creation:
95
95
// sa := &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}
96
96
// token := &authenticationv1.TokenRequest{}
97
- // c.SubResourceClient ("token").Create(ctx, sa, token)
97
+ // c.SubResource ("token").Create(ctx, sa, token)
98
98
//
99
99
// - Pod eviction creation:
100
100
// pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}
101
- // c.SubResourceClient ("eviction").Create(ctx, pod, &policyv1.Eviction{})
101
+ // c.SubResource ("eviction").Create(ctx, pod, &policyv1.Eviction{})
102
102
//
103
103
// - Pod binding creation:
104
104
// pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}
105
105
// binding := &corev1.Binding{Target: corev1.ObjectReference{Name: "my-node"}}
106
- // c.SubResourceClient ("binding").Create(ctx, pod, binding)
106
+ // c.SubResource ("binding").Create(ctx, pod, binding)
107
107
//
108
108
// - CertificateSigningRequest approval:
109
109
// csr := &certificatesv1.CertificateSigningRequest{
@@ -115,17 +115,17 @@ type SubResourceClientConstructor interface {
115
115
// }},
116
116
// },
117
117
// }
118
- // c.SubResourceClient ("approval").Update(ctx, csr)
118
+ // c.SubResource ("approval").Update(ctx, csr)
119
119
//
120
120
// - Scale retrieval:
121
121
// dep := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}
122
122
// scale := &autoscalingv1.Scale{}
123
- // c.SubResourceClient ("scale").Get(ctx, dep, scale)
123
+ // c.SubResource ("scale").Get(ctx, dep, scale)
124
124
//
125
125
// - Scale update:
126
126
// dep := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}
127
127
// scale := &autoscalingv1.Scale{Spec: autoscalingv1.ScaleSpec{Replicas: 2}}
128
- // c.SubResourceClient ("scale").Update(ctx, dep, client.WithSubResourceBody(scale))
128
+ // c.SubResource ("scale").Update(ctx, dep, client.WithSubResourceBody(scale))
129
129
SubResource (subResource string ) SubResourceClient
130
130
}
131
131
0 commit comments