-
Notifications
You must be signed in to change notification settings - Fork 812
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
Generate deployment manifests from helm chart #475
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
46235c5
Generate manifests from helm chart
krmichel 5a7c75d
Up chart version
krmichel 9983b9d
Add dependency for generate-kustomize on bin/helm
krmichel f567ca4
Don't use ecr images
krmichel bcd5b6c
Put bin/aws-ebs-csi-driver back as default target in Makefile
krmichel d644239
Add back changes by ialidzhikov that were lost in rebase
krmichel 95626c1
Drop unneeded quotes
krmichel 25aba2f
Add kube manifest evaluation
krmichel d1ddb35
Merge remote-tracking branch 'upstream/master'
krmichel e25ec11
There is no structure in the kubeval tar
krmichel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-external-attacher-role | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["csi.storage.k8s.io"] | ||
resources: ["csinodeinfos"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["volumeattachments"] | ||
verbs: ["get", "list", "watch", "update"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-external-provisioner-role | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["get", "list"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["csinodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["get", "watch", "list", "delete", "update", "create"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
aws-ebs-csi-driver/templates/clusterrole-snapshot-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{- if .Values.enableVolumeSnapshot }} | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-snapshot-controller-role | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["list", "watch", "create", "update", "patch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshotcontents"] | ||
verbs: ["create", "get", "list", "watch", "update", "delete"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["snapshot.storage.k8s.io"] | ||
resources: ["volumesnapshots/status"] | ||
verbs: ["update"] | ||
|
||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
aws-ebs-csi-driver/templates/clusterrolebinding-attacher.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-csi-attacher-binding | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: ebs-csi-controller-sa | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: ebs-external-attacher-role | ||
apiGroup: rbac.authorization.k8s.io |
15 changes: 15 additions & 0 deletions
15
aws-ebs-csi-driver/templates/clusterrolebinding-provisioner.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-csi-provisioner-binding | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: ebs-csi-controller-sa | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: ebs-external-provisioner-role | ||
apiGroup: rbac.authorization.k8s.io |
18 changes: 18 additions & 0 deletions
18
aws-ebs-csi-driver/templates/clusterrolebinding-resizer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.enableVolumeResizing }} | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-csi-resizer-binding | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: ebs-csi-controller-sa | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: ebs-external-resizer-role | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
{{- end}} |
18 changes: 18 additions & 0 deletions
18
aws-ebs-csi-driver/templates/clusterrolebinding-snapshot-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.enableVolumeSnapshot }} | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-csi-snapshot-controller-binding | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: ebs-snapshot-controller | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: ebs-snapshot-controller-role | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
{{- end }} |
18 changes: 18 additions & 0 deletions
18
aws-ebs-csi-driver/templates/clusterrolebinding-snapshotter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.enableVolumeSnapshot }} | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: ebs-csi-snapshotter-binding | ||
labels: | ||
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: ebs-csi-controller-sa | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: ebs-external-snapshotter-role | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
{{- end }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit over complicated. Is it possible to simply this step? I imagine it will be hard to update this list of command, whenever there is some changes or refactoring to the helm templates. I think it is okay to restructure the layer out of kustomize file structure to make the generation earlier and more maintainable. Maybe combine some of the kustomize files into one for each layer? As they are all auto generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't like it much either. What I ran into is that when running helm template for files with more than one resource those resources weren't rendered in a consistent order. I could run the target twice in a row and get the same resources but in a different order which makes it difficult to manage in source control. I would be open if anyone has a way to produce reliably reproducible output and keep the alpha features separate in the folder structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the limitation with helm. I think I can live with it for now, and we can follow up with this as a separate issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed this. It should have been fixed in Helm 3.1.0: helm/helm#6842. Weird you were seeing this with Helm 3.1.2 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw that helm issue when I was working on this but still saw issues with resources moving around in the processed output on multiple runs without changing anything.