MCPcopy
hub / github.com/operator-framework/operator-sdk / initialize

Method initialize

internal/olm/installer/manager.go:45–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func (m *Manager) initialize() (err error) {
46 m.once.Do(func() {
47 if m.Client == nil {
48 cfg, cerr := config.GetConfig()
49 if cerr != nil {
50 err = fmt.Errorf("failed to get Kubernetes config: %v", cerr)
51 return
52 }
53
54 client, cerr := ClientForConfig(cfg)
55 if cerr != nil {
56 err = fmt.Errorf("failed to create manager client: %v", cerr)
57 return
58 }
59 m.Client = client
60 }
61 if m.Timeout <= 0 {
62 m.Timeout = DefaultTimeout
63 }
64 if m.OLMNamespace == "" {
65 m.OLMNamespace = DefaultOLMNamespace
66 }
67 })
68 return err
69}
70
71func (m *Manager) Install() error {
72 if err := m.initialize(); err != nil {

Callers 3

InstallMethod · 0.95
UninstallMethod · 0.95
StatusMethod · 0.95

Implementers 1

managerinternal/helm/release/manager.go

Calls 1

ClientForConfigFunction · 0.85

Tested by

no test coverage detected