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 {
48
48
function get_pods {
49
49
declare -r SELECTOR=" $1 "
50
50
51
- curl " ${K8S_API_URL} /pods?$SELECTOR " \
51
+ curl " ${K8S_API_URL} /namespaces/ ${POD_NAMESPACE} / pods?$SELECTOR " \
52
52
--cacert $CERT \
53
53
-H " Authorization: Bearer ${TOKEN} " | jq .items[].status.podIP -r
54
54
}
55
55
56
56
function 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 \
59
59
-H " Authorization: Bearer ${TOKEN} "
60
60
}
61
61
Original file line number Diff line number Diff line change @@ -1528,6 +1528,15 @@ func (c *Cluster) generateLogicalBackupPodEnvVars() []v1.EnvVar {
1528
1528
Name : "SCOPE" ,
1529
1529
Value : c .Name ,
1530
1530
},
1531
+ {
1532
+ Name : "POD_NAMESPACE" ,
1533
+ ValueFrom : & v1.EnvVarSource {
1534
+ FieldRef : & v1.ObjectFieldSelector {
1535
+ APIVersion : "v1" ,
1536
+ FieldPath : "metadata.namespace" ,
1537
+ },
1538
+ },
1539
+ },
1531
1540
// Bucket env vars
1532
1541
{
1533
1542
Name : "LOGICAL_BACKUP_S3_BUCKET" ,
You can’t perform that action at this time.
0 commit comments