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

Update zz-default.provisioners.yaml - postgres:17-alpine + securityContext #38

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

mathieu-benoit
Copy link
Contributor

@mathieu-benoit mathieu-benoit commented Oct 9, 2024

More security for the default postgres provisioner:

  • postgres:17-alpine
  • securityContext
  • automountServiceAccountToken=false

Tested with this app: https://github.com/score-spec/sample-score-app.

k get pods:

NAME                           READY   STATUS    RESTARTS        AGE
hello-world-6bf94c85dc-h54rl   1/1     Running   3 (9m38s ago)   9m55s
pg-hello-world-edea9043-0      1/1     Running   0               9m57s

curl $(score-k8s resources get-outputs dns.default#hello-world.dns --format '{{ .host }}'):

  <html>
    <body>
      <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
      <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
      <div class="container text-center mt-5 pt-5">
        <h1>Hello, Kubernetes!</h1>
        <p>This is an application talking to a PostgreSQL <code>17.0</code> database on host <code>pg-hello-world-edea9043</code>, deployed with Score!</p>
        <p><code></p>
        <p>
          <pre>
          SELECT version();
          PostgreSQL 17.0 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
          </pre>
        </p>
      </div>
    </body>
  </html>

@mathieu-benoit mathieu-benoit force-pushed the postgre-securitycontext branch from dd2e6b3 to 83cb05e Compare October 9, 2024 03:57
@mathieu-benoit
Copy link
Contributor Author

Ready for your review, thanks!

@Nilsty Nilsty self-requested a review October 9, 2024 13:16
Copy link

@Nilsty Nilsty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mathieu-benoit mathieu-benoit merged commit c79bb32 into main Oct 9, 2024
5 checks passed
@mathieu-benoit mathieu-benoit deleted the postgre-securitycontext branch October 9, 2024 13:19
@mathieu-benoit mathieu-benoit changed the title postgres:17-alpine + securityContext Update zz-default.provisioners.yaml - postgres:17-alpine + securityContext Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants