Skip to content

Commit

Permalink
Merge pull request #70 from checkr/add-security-context
Browse files Browse the repository at this point in the history
Update helm chart generation
  • Loading branch information
ask-42 authored May 8, 2024
2 parents 9970634 + 363d93a commit b645bff
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: yarn setup
- run: yarn lint:js
- run: yarn lint:style
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM node:16.19.0

RUN mkdir -p /usr/src/app
RUN chown -R 1001:1001 /usr/src/app

WORKDIR /usr/src/app

COPY . .
RUN yarn install --frozen-lockfile
RUN yarn heroku-postbuild

USER 1001
EXPOSE 8000
11 changes: 11 additions & 0 deletions bin/generate_chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ printf " alias: $CHART_ALIAS\n" >> .gitops/helm/oauth-reference-integration/Cha
printf "microservice:\n" > .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " environment: sandbox\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " nameOverride: oauth-reference-integration\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " deploymentDefaults:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " containerSecurityContext:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " allowPrivilegeEscalation: false\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " capabilities:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " drop:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " - ALL\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " securityContext:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " runAsUser: 1001\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " runAsGroup: 1001\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " fsGroup: 1001\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " runAsNonRoot: true\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " podDefaults:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " env:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
printf " sandbox:\n" >> .gitops/helm/oauth-reference-integration/sandbox_us.yaml
Expand Down

0 comments on commit b645bff

Please sign in to comment.