Skip to content

Commit 56e92df

Browse files
committed
fix: adjust nsp response body
1 parent d891957 commit 56e92df

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

build-and-deploy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ checkCommandsAvailable helm docker kubectl yq
1212
version="$(uuidgen)"
1313
eval $(minikube docker-env)
1414
docker login
15-
WRONGSECRETS_IMAGE=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.wrongsecrets.image')
16-
WRONGSECRETS_TAG=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.wrongsecrets.tag')
17-
WEBTOP_IMAGE=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.virtualdesktop.image')
18-
WEBTOP_TAG=$(cat helm/wrongsecrets-ctf-party/values.yaml| yq '.virtualdesktop.tag')
15+
WRONGSECRETS_IMAGE=$(cat helm/wrongsecrets-ctf-party/values.yaml | yq '.wrongsecrets.image')
16+
WRONGSECRETS_TAG=$(cat helm/wrongsecrets-ctf-party/values.yaml | yq '.wrongsecrets.tag')
17+
WEBTOP_IMAGE=$(cat helm/wrongsecrets-ctf-party/values.yaml | yq '.virtualdesktop.image')
18+
WEBTOP_TAG=$(cat helm/wrongsecrets-ctf-party/values.yaml | yq '.virtualdesktop.tag')
1919
echo "doing workaround for selaed secrets"
2020
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
21-
helm install my-release sealed-secrets/sealed-secrets
21+
helm install ws-sealedsecret sealed-secrets/sealed-secrets
2222
echo "Pulling in required images to actually run $WRONGSECRETS_IMAGE:$WRONGSECRETS_TAG & $WEBTOP_IMAGE:$WEBTOP_TAG."
2323
echo "If you see an authentication failure: pull them manually by the following 2 commands"
2424
echo "'docker pull $WRONGSECRETS_IMAGE:$WRONGSECRETS_TAG'"

wrongsecrets-balancer/src/kubernetes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,9 +1096,8 @@ const getKubernetesEndpointToWhitelist = async () => {
10961096
try {
10971097
// FIX: Use correct parameter order and response structure
10981098
const response = await k8sCoreApi.readNamespacedEndpoints({name:'kubernetes', namespace:'default'});
1099-
11001099
// FIX: Extract subsets from the correct response structure
1101-
const subsets = response.body.subsets;
1100+
const subsets = response.subsets;
11021101

11031102
logger.info(`Kubernetes endpoints subsets: ${JSON.stringify(subsets)}`);
11041103

@@ -1857,7 +1856,7 @@ const changePasscodeHashForTeam = async (teamname, passcodeHash) => {
18571856
},
18581857
};
18591858

1860-
return k8sAppsApi.patchNamespacedDeployment({ name: `t-${teamname}-wrongsecrets`, namespace: `t-${teamname}`, body: deploymentPatch })
1859+
return k8sAppsApi.patchNamespacedDeployment({ name: `t-${teamname}-wrongsecrets`, namespace: `t-${teamname}`, body: deploymentPatch, options: options })
18611860
};
18621861

18631862
const deleteNamespaceForTeam = async (team) => {

0 commit comments

Comments
 (0)