Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first stage of the crd fix, move crds to files to be merged in later * addititional changes to how crds are created * fixed issues with process, separeted observable crd items from federated ones * chart version bump
- Loading branch information
1 parent
775637a
commit 1ed0d1b
Showing
12 changed files
with
399 additions
and
167 deletions.
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
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,128 @@ | ||
{{- if .Values.kubefed.enabled }} | ||
{{- if not (.Capabilities.APIVersions.Has "types.kubefed.io/v1beta1") }} | ||
{{- if .Values.federate.addons }} | ||
{{.Files.Get "files/federated-addons.yaml" }} | ||
{{- end }} | ||
{{- if .Values.federate.clusterrolebindings }} | ||
{{.Files.Get "files/federated-cluster-rolebindings.yaml" }} | ||
{{- end }} | ||
{{- if .Values.federate.clusteraddons }} | ||
{{.Files.Get "files/federated-clusteraddons.yaml" }} | ||
{{- end }} | ||
{{- if .Values.federate.customresourcedefinitions }} | ||
{{.Files.Get "files/federated-customresourcedefinition.yaml" }} | ||
{{- end }} | ||
{{- if .Values.federate.rolebindings }} | ||
{{.Files.Get "files/federated-rolebindings.yaml" }} | ||
{{- end }} | ||
{{- if .Values.federate.roles }} | ||
{{.Files.Get "files/federated-roles.yaml" }} | ||
{{- end }} | ||
{{- end }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: federated-crds | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install, pre-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
labels: | ||
{{ include "kommander.labels" . | indent 4 }} | ||
data: | ||
{{- if .Values.federate.addons }} | ||
federated-addons.yaml: | | ||
{{.Files.Get "files/federated-addons.yaml" | indent 6}} | ||
{{- end }} | ||
{{- if .Values.federate.clusterrolebindings }} | ||
federated-cluster-rolebindings.yaml: | | ||
{{.Files.Get "files/federated-cluster-rolebindings.yaml" | indent 6}} | ||
{{- end }} | ||
{{- if .Values.federate.clusteraddons }} | ||
federated-clusteraddons.yaml: | | ||
{{.Files.Get "files/federated-clusteraddons.yaml" | indent 6}} | ||
{{- end }} | ||
{{- if .Values.federate.customresourcedefinitions }} | ||
federated-customresourcedefinition.yaml: | | ||
{{.Files.Get "files/federated-customresourcedefinition.yaml" | indent 6}} | ||
{{- end }} | ||
{{- if .Values.federate.rolebindings }} | ||
federated-rolebindings.yaml: | | ||
{{.Files.Get "files/federated-rolebindings.yaml" | indent 6}} | ||
{{- end }} | ||
{{- if .Values.federate.roles }} | ||
federated-roles.yaml: | | ||
{{.Files.Get "files/federated-roles.yaml" | indent 6}} | ||
{{- end }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kommander-crds | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install, pre-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
rules: | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
verbs: ["create", "get", "list", "watch", "patch"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: kommander-crds | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install, pre-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kommander-crds | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kommander-crds | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kommander-crds | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-install, pre-upgrade | ||
"helm.sh/hook-weight": "-5" | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: federated-crds | ||
annotations: | ||
"helm.sh/hook": pre-install, pre-upgrade | ||
"helm.sh/hook-weight": "-4" | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: kommander-crds | ||
containers: | ||
- name: federated-crds | ||
image: "bitnami/kubectl:1.16.2" | ||
volumeMounts: | ||
- name: federated-crds | ||
mountPath: /etc/federated-crds | ||
readOnly: true | ||
command: ["kubectl", "apply", "-f", "/etc/federated-crds"] | ||
volumes: | ||
- name: federated-crds | ||
configMap: | ||
name: federated-crds | ||
restartPolicy: OnFailure | ||
{{- end }} |
Oops, something went wrong.