Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ trap "cleanup" EXIT SIGINT
bash "${CODEGEN_PKG}/generate-groups.sh" all \
"${OPERATOR_PACKAGE_ROOT}/pkg/generated" "${OPERATOR_PACKAGE_ROOT}/pkg/apis" \
"acid.zalan.do:v1 zalando.org:v1" \
--go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt
--go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt \
-o ./
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change. What is it for?

Copy link
Contributor Author

@dmvolod dmvolod Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fix when GOPATH installed explicitly (for example in GoLand IDE and multiple golang version installed, but not happens for the single and system golang version) code generation will be targeted to the GOPATH\src instead of the root project path.


cp -r "${OPERATOR_PACKAGE_ROOT}"/pkg/* "${TARGET_CODE_DIR}"

Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/connection_pooler.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
Protocol: v1.ProtocolTCP,
},
},
Env: envVars,
ReadinessProbe: &v1.Probe{
ProbeHandler: v1.ProbeHandler{
TCPSocket: &v1.TCPSocketAction{
Expand All @@ -341,7 +340,7 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
// 1. Add environment variables to tell pgBouncer where to find the TLS certificates
// 2. Reference the secret in a volume
// 3. Mount the volume to the container at /tls
poolerVolumes := []v1.Volume{}
var poolerVolumes []v1.Volume
if spec.TLS != nil && spec.TLS.SecretName != "" {
// Env vars
crtFile := spec.TLS.CertificateFile
Expand Down Expand Up @@ -383,6 +382,7 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
}}
}

poolerContainer.Env = envVars
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)

podTemplate := &v1.PodTemplateSpec{
Expand Down