MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / setDefaultPlugins

Method setDefaultPlugins

api/v1/cluster_defaults.go:149–164  ·  view source on GitHub ↗
(config *configuration.Data)

Source from the content-addressed store, hash-verified

147}
148
149func (r *Cluster) setDefaultPlugins(config *configuration.Data) {
150 // Add the list of pre-defined plugins
151 foundPlugins := stringset.New()
152 for _, plugin := range r.Spec.Plugins {
153 foundPlugins.Put(plugin.Name)
154 }
155
156 for _, pluginName := range config.GetIncludePlugins() {
157 if !foundPlugins.Has(pluginName) {
158 r.Spec.Plugins = append(r.Spec.Plugins, PluginConfiguration{
159 Name: pluginName,
160 Enabled: ptr.To(true),
161 })
162 }
163 }
164}
165
166// defaultTablespaces adds the tablespace owner where the
167// user didn't specify it

Callers 2

setDefaultsMethod · 0.95

Calls 2

GetIncludePluginsMethod · 0.80
HasMethod · 0.80

Tested by

no test coverage detected