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

Function createBootstrapContainer

pkg/specs/containers.go:34–52  ·  view source on GitHub ↗

createBootstrapContainer creates the init container bootstrapping the operator executable inside the generated Pods

(cluster apiv1.Cluster, extensions []apiv1.ExtensionConfiguration)

Source from the content-addressed store, hash-verified

32// createBootstrapContainer creates the init container bootstrapping the operator
33// executable inside the generated Pods
34func createBootstrapContainer(cluster apiv1.Cluster, extensions []apiv1.ExtensionConfiguration) corev1.Container {
35 container := corev1.Container{
36 Name: BootstrapControllerContainerName,
37 Image: configuration.Current.OperatorImageName,
38 ImagePullPolicy: cluster.Spec.ImagePullPolicy,
39 Command: []string{
40 "/manager",
41 "bootstrap",
42 "/controller/manager",
43 },
44 VolumeMounts: CreatePostgresVolumeMounts(cluster, extensions),
45 Resources: cluster.Spec.Resources,
46 SecurityContext: GetSecurityContext(&cluster),
47 }
48
49 addManagerLoggingOptions(cluster, &container)
50
51 return container
52}
53
54// addManagerLoggingOptions propagate the logging configuration
55// to the manager inside the generated pod.

Callers 3

containers_test.goFile · 0.85
CreatePrimaryJobFunction · 0.85
createClusterPodSpecFunction · 0.85

Calls 3

GetSecurityContextFunction · 0.85
addManagerLoggingOptionsFunction · 0.85

Tested by

no test coverage detected