Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit server chart #9

Merged
merged 10 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci
Jordan Hoeft committed Feb 28, 2024
commit 6ef67217baf12308e3061195f8ddf87be7824a3e
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -120,12 +120,17 @@ jobs:
run: |
APP_VERSION=$(grep 'appVersion:' charts/tsm-node/Chart.yaml | awk '{print $2}')
echo "IMAGE_TAG=$APP_VERSION" >> $GITHUB_ENV
AUDIT_APP_VERSION=$(grep 'appVersion:' charts/tsm-audit-server/Chart.yaml | awk '{print $2}')
echo "AUDIT_IMAGE_TAG=$AUDIT_APP_VERSION" >> $GITHUB_ENV

- name: Pull images from ECR
run: |
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REPO
IMAGE_TAG=$(echo ${{ env.IMAGE_TAG }} | tr -d '\r')
docker pull $ECR_REPO:$IMAGE_TAG
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $AUDIT_ECR_REPO
AUDIT_IMAGE_TAG=$(echo ${{ env.AUDIT_IMAGE_TAG }} | tr -d '\r')
docker pull $AUDIT_ECR_REPO:$AUDIT_IMAGE_TAG

- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/kind-action@v1.9.0
@@ -136,13 +141,20 @@ jobs:
- name: Load image into kind cluster
run: |
IMAGE_TAG=$(echo ${{ env.IMAGE_TAG }} | tr -d '\r')
AUDIT_IMAGE_TAG=$(echo ${{ env.AUDIT_IMAGE_TAG }} | tr -d '\r')
kind load docker-image $ECR_REPO:$IMAGE_TAG -n chart-testing
kind load docker-image $AUDIT_ECR_REPO:$AUDIT_IMAGE_TAG -n chart-testing

- name: Inject ECR Repo and Image Tag into Values Files
run: |
IMAGE_TAG=$(echo ${{ env.IMAGE_TAG }} | tr -d '\r')
./.github/inject-sensitive-values.sh charts/tsm-node/ci $ECR_REPO $IMAGE_TAG ${{ secrets.PRIVATE_KEY }}

- name: Inject ECR Repo and Image Tag into Audit Values Files
run: |
IMAGE_TAG=$(echo ${{ env.IMAGE_TAG }} | tr -d '\r')
./.github/inject-sensitive-values.sh charts/tsm-audit-server/ci $AUDIT_ECR_REPO $AUDIT_IMAGE_TAG ${{ secrets.PRIVATE_KEY }}

- name: Install chart-testing
uses: helm/chart-testing-action@v2.6.0

37 changes: 37 additions & 0 deletions charts/tsm-audit-server/ci/test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
mongodb:
enabled: true
useStatefulSet: false
auth:
rootPassword: "secret"
disableJavascript: true
config:
configFile: |
[Database]
Host = "tsm-audit-mongodb:27017"
Username = "root"
Password = "secret"

[LogServer]
Port = 3000
PrivateKey = "<audit server private key>

[QueryServer]
Port = 8080
CertificateFile = "" #HTTPS disabled
CertificateKeyFile = "" # HTTP disabled

[TSM.demo]
Password = "password"
PublicKeys = [
"<node0 public key>",
"<node1 public key>",
]

image:
repository: "<image repo>"
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v1.1.0"

ingress:
enabled: false