Ineffectual assignment of the envVars for connection pooler (#2165)
* Ineffectual assignment of the envVars for connection pooler * Fixed codegen in case of the GOPATH is specified explicitly
This commit is contained in:
		
							parent
							
								
									021ab07a23
								
							
						
					
					
						commit
						ce1fee8586
					
				|  | @ -18,7 +18,8 @@ trap "cleanup" EXIT SIGINT | ||||||
| bash "${CODEGEN_PKG}/generate-groups.sh" all \ | bash "${CODEGEN_PKG}/generate-groups.sh" all \ | ||||||
|   "${OPERATOR_PACKAGE_ROOT}/pkg/generated" "${OPERATOR_PACKAGE_ROOT}/pkg/apis" \ |   "${OPERATOR_PACKAGE_ROOT}/pkg/generated" "${OPERATOR_PACKAGE_ROOT}/pkg/apis" \ | ||||||
|   "acid.zalan.do:v1 zalando.org:v1" \ |   "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 ./ | ||||||
| 
 | 
 | ||||||
| cp -r "${OPERATOR_PACKAGE_ROOT}"/pkg/* "${TARGET_CODE_DIR}" | cp -r "${OPERATOR_PACKAGE_ROOT}"/pkg/* "${TARGET_CODE_DIR}" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -324,7 +324,6 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) ( | ||||||
| 				Protocol:      v1.ProtocolTCP, | 				Protocol:      v1.ProtocolTCP, | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 		Env: envVars, |  | ||||||
| 		ReadinessProbe: &v1.Probe{ | 		ReadinessProbe: &v1.Probe{ | ||||||
| 			ProbeHandler: v1.ProbeHandler{ | 			ProbeHandler: v1.ProbeHandler{ | ||||||
| 				TCPSocket: &v1.TCPSocketAction{ | 				TCPSocket: &v1.TCPSocketAction{ | ||||||
|  | @ -341,7 +340,7 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) ( | ||||||
| 	//  1. Add environment variables to tell pgBouncer where to find the TLS certificates
 | 	//  1. Add environment variables to tell pgBouncer where to find the TLS certificates
 | ||||||
| 	//  2. Reference the secret in a volume
 | 	//  2. Reference the secret in a volume
 | ||||||
| 	//  3. Mount the volume to the container at /tls
 | 	//  3. Mount the volume to the container at /tls
 | ||||||
| 	poolerVolumes := []v1.Volume{} | 	var poolerVolumes []v1.Volume | ||||||
| 	if spec.TLS != nil && spec.TLS.SecretName != "" { | 	if spec.TLS != nil && spec.TLS.SecretName != "" { | ||||||
| 		// Env vars
 | 		// Env vars
 | ||||||
| 		crtFile := spec.TLS.CertificateFile | 		crtFile := spec.TLS.CertificateFile | ||||||
|  | @ -383,6 +382,7 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) ( | ||||||
| 		}} | 		}} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	poolerContainer.Env = envVars | ||||||
| 	tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration) | 	tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration) | ||||||
| 
 | 
 | ||||||
| 	podTemplate := &v1.PodTemplateSpec{ | 	podTemplate := &v1.PodTemplateSpec{ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue