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

kind/feature/5395/expand pod template spec #5445

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

Conversation

hernanDatgDev
Copy link
Contributor

Adding pod template support for field: AutomountServiceAccountToken

Release Note

NONE

@hernanDatgDev
Copy link
Contributor Author

Hi, I'm not sure what value should actually be added for the "protobuf" string in pkg/apis/camel/v1/integration_types.go. The value I gave was protobuf:"varint,8,opt,name=automountServiceAccountToken" taking inspiration from other boolean values however the 8 is just a guess. What's an appropriate value to add when introducing new fields?

@claudio4j
Copy link
Contributor

You can follow the k8s api podspec and set 21

@hernanDatgDev
Copy link
Contributor Author

@claudio4j Thanks I found the right values. Also I noticed in pkg/apis/camel/v1/integration_types.go it has some outdated make goal. To get the right functionality I ran make generate instead. Would it be appropriate to update this comment as well?

Run "make generate-deepcopy" to regenerate code after modifying this file

@claudio4j
Copy link
Contributor

To get the right functionality I ran make generate instead. Would it be appropriate to update this comment as well?

Yes, thanks.

Can you squash the commits once you have it ready for review ?

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

This is where we definetely need at least a unit test to validate the feature. Have a look at https://github.com/apache/camel-k/blob/main/pkg/trait/pod_test.go and create at least one test that would add the new value and verify this is correctly added to the Deployment.

@squakez
Copy link
Contributor

squakez commented May 3, 2024

@squakez squakez added the status/wip Work in progress label May 3, 2024
@hernanDatgDev hernanDatgDev force-pushed the feature/5395/expand-pod-template-spec branch from 33603aa to d14541a Compare May 7, 2024 22:14
@hernanDatgDev hernanDatgDev force-pushed the feature/5395/expand-pod-template-spec branch from d14541a to 37fb704 Compare May 7, 2024 22:17
@hernanDatgDev hernanDatgDev reopened this May 7, 2024
@hernanDatgDev hernanDatgDev force-pushed the feature/5395/expand-pod-template-spec branch from 8c35a8c to d55c64b Compare May 8, 2024 20:14
@hernanDatgDev
Copy link
Contributor Author

I added the test to ensure that the field is set properly on the deployment. I also relayed with my security team and it we only need this field so that we can set it to false which does not interfere with Knative. It is only when this field is explicitly set to True that Knative interferes through validation.
So for my team and this field specifically this PR would be enough. There are other fields that we'd like set however those do have issues with Knative so I'm working on getting conversations started with the Knative teams.

@hernanDatgDev hernanDatgDev marked this pull request as ready for review May 10, 2024 17:49
@claudio4j
Copy link
Contributor

claudio4j commented May 14, 2024

It is only when this field is explicitly set to True that Knative interferes through validation

I'm not familiar with knative, but this behavior seems to be a corner case of knative. As this is documenteded on knative, I'm ok with the addition of this field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants