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

Function addManagerLoggingOptions

pkg/specs/containers.go:56–61  ·  view source on GitHub ↗

addManagerLoggingOptions propagate the logging configuration to the manager inside the generated pod.

(cluster apiv1.Cluster, container *corev1.Container)

Source from the content-addressed store, hash-verified

54// addManagerLoggingOptions propagate the logging configuration
55// to the manager inside the generated pod.
56func addManagerLoggingOptions(cluster apiv1.Cluster, container *corev1.Container) {
57 if cluster.Spec.LogLevel != "" {
58 container.Command = append(container.Command, fmt.Sprintf("--log-level=%s", cluster.Spec.LogLevel))
59 }
60 container.Command = append(container.Command, log.GetFieldsRemapFlags()...)
61}
62
63// GetSecurityContext return the proper SecurityContext in the cluster for Containers in Pods
64func GetSecurityContext(cluster *apiv1.Cluster) *corev1.SecurityContext {

Callers 3

CreatePrimaryJobFunction · 0.85
createPostgresContainersFunction · 0.85
createBootstrapContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected