Skip to content

Commit

Permalink
Nats-bitnami fix (#408)
Browse files Browse the repository at this point in the history
* Nats-bitnami temporary fix

Signed-off-by: nrupen <[email protected]>

* Updated coverage to disable GOSUMDB

Signed-off-by: nrupen <[email protected]>

* Fixed bitnami + ib + shellcheck

Signed-off-by: nrupen <[email protected]>

* Fixed Nats-Official

Signed-off-by: nrupen <[email protected]>

* Fixed official

Signed-off-by: nrupen <[email protected]>

---------

Signed-off-by: nrupen <[email protected]>
Co-authored-by: nrupen <[email protected]>
  • Loading branch information
Kirandeep-Singh-Khehra and nrupen authored Jan 2, 2024
1 parent acb96ac commit 4d63636
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
9 changes: 3 additions & 6 deletions community_images/nats/bitnami/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ function test_nats() {
local NAMESPACE=$1
local HELM_RELEASE=$2

NATS_SERVER=${HELM_RELEASE}.${NAMESPACE}.svc.cluster.local

NATS_USER=$(kubectl get secret --namespace "${NAMESPACE}" "${HELM_RELEASE}" -o jsonpath='{.data.*}' | base64 -d | grep -m 1 user | awk '{print $2}' | tr -d '"')
NATS_PASS=$(kubectl get secret --namespace "${NAMESPACE}" "${HELM_RELEASE}" -o jsonpath='{.data.*}' | base64 -d | grep -m 1 password | awk '{print $2}' | tr -d '"')
echo -e "Client credentials:\n\tUser: $NATS_USER\n\tPassword: $NATS_PASS"
Expand All @@ -24,10 +22,9 @@ function test_nats() {
set -e
set -x
GO111MODULE=off go get github.com/nats-io/nats.go
go env -w GOPROXY=http://${NATS_SERVER}:8222,direct
go install golang.org/x/crypto/[email protected]
go mod tidy
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-pub && go install && cd || exit
go env -w GOPROXY=direct
go env -w GOSUMDB=off
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-pub && go get golang.org/x/crypto/[email protected] && go install && cd || exit
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-echo && go install && cd || exit
nats-echo -s nats://$NATS_USER:$NATS_PASS@${HELM_RELEASE}.${NAMESPACE}.svc.cluster.local:4222 SomeSubject &
nats-pub -s nats://$NATS_USER:$NATS_PASS@${HELM_RELEASE}.${NAMESPACE}.svc.cluster.local:4222 -reply Hi SomeSubject 'Hi everyone'" > "$SCRIPTPATH"/commands.sh
Expand Down
9 changes: 3 additions & 6 deletions community_images/nats/ironbank/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ function test_nats() {
set -x
set -e
GO111MODULE=off go get github.com/nats-io/nats.go
go env -w GOPROXY=http://${NATS_SERVER}:8222,direct
go install golang.org/x/crypto/[email protected]
go mod tidy
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-pub && go install && cd || exit
go env -w GOPROXY=direct
go env -w GOSUMDB=off
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-pub && go get golang.org/x/crypto/[email protected] && go install && cd || exit
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-echo && go install && cd || exit
nats-echo -s nats://$NATS_USER:$NATS_PASS@${NATS_SERVER}:4222 SomeSubject &
nats-pub -s nats://$NATS_USER:$NATS_PASS@${NATS_SERVER}:4222 -reply Hi SomeSubject 'Hi everyone'" > "$SCRIPTPATH"/commands.sh
# nats-echo -s nats://$NATS_USER:$NATS_PASS@${RELEASE_NAME}.${NAMESPACE}.svc.cluster.local:4222 SomeSubject &
# nats-pub -s nats://$NATS_USER:$NATS_PASS@${RELEASE_NAME}.${NAMESPACE}.svc.cluster.local:4222 -reply Hi SomeSubject 'Hi everyone'" > "$SCRIPTPATH"/commands.sh

chmod +x "$SCRIPTPATH"/commands.sh
POD_NAME="nats-release-client"
Expand Down
9 changes: 5 additions & 4 deletions community_images/nats/official/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ function test_nats() {
# wait for nats client to come up
kubectl wait pods nats-release-client -n "${NAMESPACE}" --for=condition=ready --timeout=10m
echo "#!/bin/bash
set -x
set -e
GO111MODULE=off go get github.com/nats-io/nats.go
go env -w GOPROXY=http://${NATS_SERVER}:8222,direct
go install golang.org/x/crypto/[email protected]
go mod tidy
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-pub && go install && cd || exit
go env -w GOPROXY=direct
go env -w GOSUMDB=off
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-pub && go get golang.org/x/crypto/[email protected] && go install && cd || exit
cd \"\$GOPATH\"/src/github.com/nats-io/nats.go/examples/nats-echo && go install && cd || exit
nats-echo -s nats://$NATS_USER:$NATS_PASS@${HELM_RELEASE}.${NAMESPACE}.svc.cluster.local:4222 SomeSubject &
nats-pub -s nats://$NATS_USER:$NATS_PASS@${HELM_RELEASE}.${NAMESPACE}.svc.cluster.local:4222 -reply Hi SomeSubject 'Hi everyone'" > "$SCRIPTPATH"/commands.sh
Expand Down

0 comments on commit 4d63636

Please sign in to comment.