File tree Expand file tree Collapse file tree 3 files changed +5
-42
lines changed Expand file tree Collapse file tree 3 files changed +5
-42
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,11 @@ func main() {
124
124
if err != nil {
125
125
log .Fatalf ("error configuring client: %s" , err .Error ())
126
126
}
127
- opClient := operatorclient .NewClientFromConfig (kubeconfig )
127
+ opClient , err := operatorclient .NewClientFromRestConfig (kubeconfig )
128
+ if err != nil {
129
+ log .Fatalf ("error configuring client: %s" , err .Error ())
130
+ }
131
+
128
132
crClient , err := client .NewClient (kubeconfig )
129
133
if err != nil {
130
134
log .Fatalf ("error configuring client: %s" , err .Error ())
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -144,11 +144,6 @@ type Client struct {
144
144
regInterface apiregistration.Interface
145
145
}
146
146
147
- // NewClientFromConfig creates a kubernetes client
148
- func NewClientFromConfig (config * rest.Config ) ClientInterface {
149
- return & Client {kubernetes .NewForConfigOrDie (config ), apiextensions .NewForConfigOrDie (config ), apiregistration .NewForConfigOrDie (config )}
150
- }
151
-
152
147
func NewClientFromRestConfig (config * rest.Config ) (client ClientInterface , err error ) {
153
148
kubernetes , err := kubernetes .NewForConfig (config )
154
149
if err != nil {
You can’t perform that action at this time.
0 commit comments