update docs and comments
This commit is contained in:
		
							parent
							
								
									6c3d4a923e
								
							
						
					
					
						commit
						b763710573
					
				|  | @ -321,11 +321,12 @@ spec: | ||||||
| ## Custom Pod Environment Variables | ## Custom Pod Environment Variables | ||||||
| 
 | 
 | ||||||
| It is possible to configure a ConfigMap which is used by the Postgres pods as | It is possible to configure a ConfigMap which is used by the Postgres pods as | ||||||
| an additional provider for environment variables. | an additional provider for environment variables. One use case is to customize | ||||||
| 
 | the Spilo image and configure it with environment variables. The ConfigMap with | ||||||
| One use case is to customize the Spilo image and configure it with environment | the additional settings is referenced in the operator's main configuration. | ||||||
| variables. The ConfigMap with the additional settings is configured in the | A namespace can be specified along with the name. If left out, the configured | ||||||
| operator's main ConfigMap: | default namespace of your K8s client will be used and if the ConfigMap is not | ||||||
|  | found there, the Postgres cluster's namespace is taken when different: | ||||||
| 
 | 
 | ||||||
| **postgres-operator ConfigMap** | **postgres-operator ConfigMap** | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -852,7 +852,7 @@ func (c *Cluster) generateStatefulSet(pgSpec *acidv1.PostgresSpec) (*appsv1.Stat | ||||||
| 		var cm *v1.ConfigMap | 		var cm *v1.ConfigMap | ||||||
| 		cm, err = c.KubeClient.ConfigMaps(c.OpConfig.PodEnvironmentConfigMap.Namespace).Get(c.OpConfig.PodEnvironmentConfigMap.Name, metav1.GetOptions{}) | 		cm, err = c.KubeClient.ConfigMaps(c.OpConfig.PodEnvironmentConfigMap.Namespace).Get(c.OpConfig.PodEnvironmentConfigMap.Name, metav1.GetOptions{}) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			// if not found, try again using the operator namespace (old behavior)
 | 			// if not found, try again using the cluster's namespace if it's different (old behavior)
 | ||||||
| 			if k8sutil.ResourceNotFound(err) && c.Namespace != c.OpConfig.PodEnvironmentConfigMap.Namespace { | 			if k8sutil.ResourceNotFound(err) && c.Namespace != c.OpConfig.PodEnvironmentConfigMap.Namespace { | ||||||
| 				cm, err = c.KubeClient.ConfigMaps(c.Namespace).Get(c.OpConfig.PodEnvironmentConfigMap.Name, metav1.GetOptions{}) | 				cm, err = c.KubeClient.ConfigMaps(c.Namespace).Get(c.OpConfig.PodEnvironmentConfigMap.Name, metav1.GetOptions{}) | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue