-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
RFE: Cluster builds with kaniko: allow to set securityContext / serviceAccountName #3267
Comments
Thank you for opening @Andrei-Stepanov! We have a lot of issues from @prary as well, that are around the inflexibilities of configuring kaniko from Skaffold. I am actively thinking about these issues - so that we don't have to one-by-one add a new supported field. |
Hi @Andrei-Stepanov @balopat , |
Kaniko is now compatible with AWS IAM Role for Service Accounts, so being able to set the service account used by the Kaniko pod is a must. |
since we don't have a better solution right now, I think adding this field to the Kaniko configuration in the skaffold.yaml would be fine. is anyone interested in submitting a PR? |
@nkubala I will raise the pr for allowing user to configure service account for kaniko in skaffold.yaml |
@prary Do you have an example of how the PSP should be configured ? |
Hi. I am still seeing this error when trying to deploy on a cluster with restricted PSP set with no root privileges - I am using this PSP with no changes - https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/policy/restricted-psp.yaml and I get this error: And this is my skaffold sample: apiVersion: skaffold/v2beta8
kind: Config
profiles:
- name: dev-svc
build:
artifacts:
- image: asia.gcr.io/<project>/<app>
kaniko:
cache: {}
dockerfile: Dockerfile
cluster:
pullSecretName: kaniko-secret
namespace: default
timeout: 20m
runAsUser: 1000
concurrency: 0 Using |
Unfortunately, kaniko needs to run as root. There isn't a way to run it with restricted PSP |
Hello.
It would be good to allow user specify securityContext / serviceAccountName for Kaniko builds.
Expected behavior
For example have a Dockerfile with:
RUN yum install --assumeyes openssl-devel
Actual behavior
Information
The text was updated successfully, but these errors were encountered: