camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

kind/feature/5395/expand pod template spec

Open hernanDatgDev opened this issue 1 year ago • 7 comments

Adding pod template support for field: AutomountServiceAccountToken

Release Note

NONE

hernanDatgDev avatar May 01 '24 20:05 hernanDatgDev

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?

hernanDatgDev avatar May 01 '24 20:05 hernanDatgDev

You can follow the k8s api podspec and set 21

claudio4j avatar May 01 '24 22:05 claudio4j

@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

hernanDatgDev avatar May 02 '24 14:05 hernanDatgDev

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 ?

claudio4j avatar May 02 '24 18:05 claudio4j

To consider if this is really ready to merge: https://camel.zulipchat.com/#narrow/stream/257299-camel-k/topic/pod.20template.20fields.20interfere.20with.20knative

squakez avatar May 03 '24 07:05 squakez

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 avatar May 08 '24 20:05 hernanDatgDev

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.

claudio4j avatar May 14 '24 10:05 claudio4j