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

Function getInvolvedConfigMapNames

pkg/specs/roles.go:349–363  ·  view source on GitHub ↗
(cluster *apiv1.Cluster)

Source from the content-addressed store, hash-verified

347}
348
349func getInvolvedConfigMapNames(cluster *apiv1.Cluster) []string {
350 involvedConfigMapNames := []string{
351 cluster.Name,
352 }
353
354 if cluster.Spec.Monitoring != nil {
355 // If custom queries are used, the instance manager need privileges to read those
356 // entries
357 for _, configMapName := range cluster.Spec.Monitoring.CustomQueriesConfigMap {
358 involvedConfigMapNames = append(involvedConfigMapNames, configMapName.Name)
359 }
360 }
361
362 return cleanupResourceList(involvedConfigMapNames)
363}
364
365// cleanupResourceList returns a new list with the same elements as resourceList, where
366// the empty and duplicate entries have been removed

Callers 1

CreateRoleFunction · 0.85

Calls 1

cleanupResourceListFunction · 0.85

Tested by

no test coverage detected