Skip to content
New issue

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

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

Already on GitHub? # to your account

manifest updates #1077

Merged
merged 3 commits into from
Jul 25, 2024
Merged

manifest updates #1077

merged 3 commits into from
Jul 25, 2024

Conversation

v0lkan
Copy link
Contributor

@v0lkan v0lkan commented Jul 25, 2024

documentation updates and also setting version to :latest in some example manifests to make following quickstart tutorials easier.

Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
@v0lkan v0lkan self-assigned this Jul 25, 2024
@v0lkan v0lkan requested a review from BulldromeQ as a code owner July 25, 2024 05:34
v0lkan added 2 commits July 25, 2024 00:06
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
@v0lkan
Copy link
Contributor Author

v0lkan commented Jul 25, 2024

cc: @abhishek44sharma @BulldromeQ because there are some helm charts changes, especially around binding secrets to service account.

I ran tests, all passing : I'll annotate my changes and merge momentarily.

Feel free to let me know if you see anything fishy.

@v0lkan v0lkan requested a review from abhishek44sharma July 25, 2024 07:36
Comment on lines +52 to +61
> **Türkçe Konuşanlar İçin:**
>
> Özgür yazılım birlikte olunca güzel 🤗.
>
> Eğer **VMware Secrets Manager** ile ilgili bir sorun varsa, projeye
> katkıda bulunmak istiyorsan veya başka bir konuda yardıma ihtiyacın varsa,
> dil engeli olmadan bize ulaşabilirsin.
>
> [Kampus Discord Sunucusu'nda **VMware Secrets Manager** kanalında][kampus]
> buluşalım ve birlikte dünyayı daha güvenli hale getirelim 🤘.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is for the Turkish developer community.

There is an unofficial discord channel on a discord server where we discuss VSecM in Turkish.

@@ -28,7 +28,7 @@ spec:
serviceAccountName: example
containers:
- name: main
image: vsecm/example-multiple-secrets:0.26.2
image: vsecm/example-multiple-secrets:latest
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pinning version was causing issues in quickstart tutorials.

This would be easier to manage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are setting :latest only for things under the examples folder.

The rest of the apps still have whatever the future version under development is.

- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch"]
resourceNames: ["vsecm-sentinel-init-secret"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After defining the service account to explicitly list the secrets it allows to mount, we needed to create a role and rolebinding to support that.

This is a couple of extra annotations, but better security too.

@@ -17,6 +17,8 @@ metadata:
labels:
{{- include "sentinel.labels" . | nindent 4 }}
app.kubernetes.io/operated-by: vsecm
annotations:
kubernetes.io/service-account.name: {{ include "sentinel.serviceAccountName" . }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The secret explicitly specifies which ServiceAccount it is managed by.

Again, tighter security.

@@ -95,6 +97,8 @@ metadata:
kubernetes.io/enforce-mountable-secrets: "true"
kubernetes.io/mountable-secrets: vsecm-sentinel-init-secret
automountServiceAccountToken: false
secrets:
- name: vsecm-sentinel-init-secret
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It feels like repetitive since the above annotation already has the secret's name; but without it I get errors and the statefulset did not initialize — so I'm adding it nonetheless.

Also k8s docs say it's a good practice to be explicit about these kinds of secrets.

@v0lkan v0lkan merged commit 292a648 into main Jul 25, 2024
@v0lkan v0lkan deleted the ovolkan/manifest-updates branch July 25, 2024 07:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant