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

feat: Add pod_service_account_annotations #2389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dennislapchenko
Copy link

Added pod_service_account_annotations.
This will allow avoiding custom creation of service account with gcp/aws annotations for wal needs.
Since by default service account is created, makes sense to allow passing annotations as well.

Also tested locally via ./run_operator_locally.sh

@oopjot
Copy link

oopjot commented Oct 10, 2023

Hi, are there any plans regarding this feature? This would be very helpful for IRSA users. Thank you.

@dennislapchenko
Copy link
Author

Hi, are there any plans regarding this feature? This would be very helpful for IRSA users. Thank you.

There actually exists a way how to already add this, but its less than ideal when you only need an annotation..
So hopefully this PR still gets merged.

configKubernetes:
  pod_service_account_definition: |
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      annotations:
        eks.amazonaws.com/role-arn: <role_arn>
      name: postgres-operator-pod
      namespace: postgres-operator

namespace seems to be irrelevant too, since in required namespaces the SA is still created correctly

@oopjot
Copy link

oopjot commented Oct 11, 2023

@dennislapchenko I must've missed this field, thank you so much!

@psolarcz
Copy link

@dennislapchenko Can we add a unique role per cluster? Currently I'm able to add same annotation for all SAs created by the operator.

@dennislapchenko
Copy link
Author

@dennislapchenko Can we add a unique role per cluster? Currently I'm able to add same annotation for all SAs created by the operator.

I am not fully aware of the inner workings, it would make sense to be able to overwrite this from each cluster, but it would most likely require some heavy code alterations.

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.

None yet

3 participants