Merge branch 'master' into cron-pod-affinity
This commit is contained in:
		
						commit
						2e4578e56f
					
				|  | @ -48,14 +48,14 @@ function aws_upload { | ||||||
| function get_pods { | function get_pods { | ||||||
|     declare -r SELECTOR="$1" |     declare -r SELECTOR="$1" | ||||||
| 
 | 
 | ||||||
|     curl "${K8S_API_URL}/pods?$SELECTOR"        \ |     curl "${K8S_API_URL}/namespaces/${POD_NAMESPACE}/pods?$SELECTOR"        \ | ||||||
|         --cacert $CERT                          \ |         --cacert $CERT                          \ | ||||||
|         -H "Authorization: Bearer ${TOKEN}" | jq .items[].status.podIP -r |         -H "Authorization: Bearer ${TOKEN}" | jq .items[].status.podIP -r | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_current_pod { | function get_current_pod { | ||||||
|     curl "${K8S_API_URL}/pods?fieldSelector=metadata.name%3D${HOSTNAME}" \ |     curl "${K8S_API_URL}/namespaces/${POD_NAMESPACE}/pods?fieldSelector=metadata.name%3D${HOSTNAME}" \ | ||||||
|         --cacert $CERT                                                   \ |         --cacert $CERT   \ | ||||||
|         -H "Authorization: Bearer ${TOKEN}" |         -H "Authorization: Bearer ${TOKEN}" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -54,9 +54,13 @@ kubectl create -f manifests/operator-service-account-rbac.yaml  # identity and p | ||||||
| kubectl create -f manifests/postgres-operator.yaml  # deployment | kubectl create -f manifests/postgres-operator.yaml  # deployment | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| When using kubectl 1.14 or newer the mentioned manifests could be also be | There is a [Kustomization](https://github.com/kubernetes-sigs/kustomize) | ||||||
| bundled in one [Kustomization](https://github.com/kubernetes-sigs/kustomize) | manifest that [combines the mentioned resources](../manifests/kustomization.yaml) -  | ||||||
| manifest. | it can be used with kubectl 1.14 or newer as easy as: | ||||||
|  | 
 | ||||||
|  | ```bash | ||||||
|  | kubectl apply -k github.com/zalando/postgres-operator/manifests | ||||||
|  | ``` | ||||||
| 
 | 
 | ||||||
| For convenience, we have automated starting the operator with minikube using the | For convenience, we have automated starting the operator with minikube using the | ||||||
| `run_operator_locally` script. It applies the [`acid-minimal-cluster`](../manifests/minimal-postgres-manifest). | `run_operator_locally` script. It applies the [`acid-minimal-cluster`](../manifests/minimal-postgres-manifest). | ||||||
|  |  | ||||||
|  | @ -277,7 +277,7 @@ configuration they are grouped under the `kubernetes` key. | ||||||
|   the same topology , e.g. node. The default is `false`. |   the same topology , e.g. node. The default is `false`. | ||||||
| 
 | 
 | ||||||
| * **pod_antiaffinity_topology_key** | * **pod_antiaffinity_topology_key** | ||||||
|   override [topology key](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#interlude-built-in-node-labels) |   override [topology key](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#built-in-node-labels) | ||||||
|   for pod anti affinity. The default is `kubernetes.io/hostname`. |   for pod anti affinity. The default is `kubernetes.io/hostname`. | ||||||
| 
 | 
 | ||||||
| * **pod_management_policy** | * **pod_management_policy** | ||||||
|  |  | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | resources: | ||||||
|  | - configmap.yaml | ||||||
|  | - operator-service-account-rbac.yaml | ||||||
|  | - postgres-operator.yaml | ||||||
|  | @ -1528,6 +1528,15 @@ func (c *Cluster) generateLogicalBackupPodEnvVars() []v1.EnvVar { | ||||||
| 			Name:  "SCOPE", | 			Name:  "SCOPE", | ||||||
| 			Value: c.Name, | 			Value: c.Name, | ||||||
| 		}, | 		}, | ||||||
|  | 		{ | ||||||
|  | 			Name: "POD_NAMESPACE", | ||||||
|  | 			ValueFrom: &v1.EnvVarSource{ | ||||||
|  | 				FieldRef: &v1.ObjectFieldSelector{ | ||||||
|  | 					APIVersion: "v1", | ||||||
|  | 					FieldPath:  "metadata.namespace", | ||||||
|  | 				}, | ||||||
|  | 			}, | ||||||
|  | 		}, | ||||||
| 		// Bucket env vars
 | 		// Bucket env vars
 | ||||||
| 		{ | 		{ | ||||||
| 			Name:  "LOGICAL_BACKUP_S3_BUCKET", | 			Name:  "LOGICAL_BACKUP_S3_BUCKET", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue