File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,14 @@ function aws_upload {
4848function get_pods {
4949 declare -r SELECTOR=" $1 "
5050
51- curl " ${K8S_API_URL} /pods?$SELECTOR " \
51+ curl " ${K8S_API_URL} /namespaces/ ${POD_NAMESPACE} / pods?$SELECTOR " \
5252 --cacert $CERT \
5353 -H " Authorization: Bearer ${TOKEN} " | jq .items[].status.podIP -r
5454}
5555
5656function get_current_pod {
57- curl " ${K8S_API_URL} /pods?fieldSelector=metadata.name%3D${HOSTNAME} " \
58- --cacert $CERT \
57+ curl " ${K8S_API_URL} /namespaces/ ${POD_NAMESPACE} / pods?fieldSelector=metadata.name%3D${HOSTNAME} " \
58+ --cacert $CERT \
5959 -H " Authorization: Bearer ${TOKEN} "
6060}
6161
Original file line number Diff line number Diff line change @@ -1528,6 +1528,15 @@ func (c *Cluster) generateLogicalBackupPodEnvVars() []v1.EnvVar {
15281528 Name : "SCOPE" ,
15291529 Value : c .Name ,
15301530 },
1531+ {
1532+ Name : "POD_NAMESPACE" ,
1533+ ValueFrom : & v1.EnvVarSource {
1534+ FieldRef : & v1.ObjectFieldSelector {
1535+ APIVersion : "v1" ,
1536+ FieldPath : "metadata.namespace" ,
1537+ },
1538+ },
1539+ },
15311540 // Bucket env vars
15321541 {
15331542 Name : "LOGICAL_BACKUP_S3_BUCKET" ,
You can’t perform that action at this time.
0 commit comments