From add4d72757946efb14d171573c9f96aada0b0055 Mon Sep 17 00:00:00 2001 From: Lucas Lopes Date: Wed, 16 Aug 2023 15:49:34 -0300 Subject: [PATCH] make port-forward fleet 102.1.1 --- assets/fleet/fleet-102.1.1+up0.7.1.tgz | Bin 0 -> 4573 bytes charts/fleet/102.1.1+up0.7.1/Chart.yaml | 22 ++++ .../102.1.1+up0.7.1/charts/gitjob/.helmignore | 23 ++++ .../102.1.1+up0.7.1/charts/gitjob/Chart.yaml | 5 + .../charts/gitjob/templates/_helpers.tpl | 7 ++ .../charts/gitjob/templates/clusterrole.yaml | 38 ++++++ .../gitjob/templates/clusterrolebinding.yaml | 12 ++ .../charts/gitjob/templates/deployment.yaml | 51 ++++++++ .../charts/gitjob/templates/leases.yaml | 23 ++++ .../charts/gitjob/templates/service.yaml | 12 ++ .../gitjob/templates/serviceaccount.yaml | 4 + .../102.1.1+up0.7.1/charts/gitjob/values.yaml | 31 +++++ .../102.1.1+up0.7.1/templates/_helpers.tpl | 22 ++++ .../102.1.1+up0.7.1/templates/configmap.yaml | 25 ++++ .../102.1.1+up0.7.1/templates/deployment.yaml | 102 ++++++++++++++++ .../job_cleanup_clusterregistrations.yaml | 29 +++++ .../fleet/102.1.1+up0.7.1/templates/rbac.yaml | 114 ++++++++++++++++++ .../templates/serviceaccount.yaml | 12 ++ charts/fleet/102.1.1+up0.7.1/values.yaml | 83 +++++++++++++ index.yaml | 26 ++++ release.yaml | 6 +- 21 files changed, 645 insertions(+), 2 deletions(-) create mode 100644 assets/fleet/fleet-102.1.1+up0.7.1.tgz create mode 100644 charts/fleet/102.1.1+up0.7.1/Chart.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/.helmignore create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/Chart.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/_helpers.tpl create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrole.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrolebinding.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/deployment.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/leases.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/service.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/serviceaccount.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/charts/gitjob/values.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/templates/_helpers.tpl create mode 100644 charts/fleet/102.1.1+up0.7.1/templates/configmap.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/templates/deployment.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/templates/job_cleanup_clusterregistrations.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/templates/rbac.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/templates/serviceaccount.yaml create mode 100644 charts/fleet/102.1.1+up0.7.1/values.yaml diff --git a/assets/fleet/fleet-102.1.1+up0.7.1.tgz b/assets/fleet/fleet-102.1.1+up0.7.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..898a30fcb6c6162234a2b8da6df5989dbf4fd3f0 GIT binary patch literal 4573 zcmV<35hCs%iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH>Oa^pC1`B$7r&;=KW{&(%5v)68a2koyxOtqv+6Zu{H#eG!= z_bVxcbD@c*f~(L2h=?Xk4E=~`&CsW!MN%!Alq*db3&FBWGm`P2#zaS>+7=N?O$QX? z5G3Kz2xTo8eo0W$F>*~<2n{V$Y}5jdXdEMd6y!GTV{?L1QNcra^TVGY@Pk9Y-E716 z5cr)V^XHq|rkspXB_zTSTxHXZQB9S`acvW!LSU4qUuxebD92Q*W)8J`M|mvnR6Vp5 z6B?sx4kt2%h^0!SRKBI505%B-OGYH9#gWZ&c>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p_qZC?1f`xG1 z?afp>kwetI4A6p>j}s;9|69-3Z>_Ag|6h0;c-8)IA63u)K|9#q|Jg`+-hJF}rLDH* zwM*Up_eaRa?puzp(#NX(f3WcTZwH@;qpSo8NQ>i?ENOjBp>&W-~ z{y$~Q{yVD}4O`})*`u29)*MlvM7L>Te~nCeZ+&%_cyIkax%J-qdTjm{k`BGM|Lg6* zPef9YD)@MEsysiD!Wj6TPh%u42QI~D&!4DB#Mt`QYr8GmvMt;4SoyyI00960;Qi!{ H0CoTXhI9jv literal 0 HcmV?d00001 diff --git a/charts/fleet/102.1.1+up0.7.1/Chart.yaml b/charts/fleet/102.1.1+up0.7.1/Chart.yaml new file mode 100644 index 000000000..7e738cc02 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/Chart.yaml @@ -0,0 +1,22 @@ +annotations: + catalog.cattle.io/auto-install: fleet-crd=match + catalog.cattle.io/certified: rancher + catalog.cattle.io/experimental: "true" + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.27.0-0' + catalog.cattle.io/namespace: cattle-fleet-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/provides-gvr: clusters.fleet.cattle.io/v1alpha1 + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/release-name: fleet +apiVersion: v2 +appVersion: 0.7.1 +dependencies: +- condition: gitops.enabled + name: gitjob + repository: file://./charts/gitjob +description: Fleet Manager - GitOps at Scale +icon: https://charts.rancher.io/assets/logos/fleet.svg +name: fleet +version: 102.1.1+up0.7.1 diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/.helmignore b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/.helmignore new file mode 100644 index 000000000..691fa13d6 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ \ No newline at end of file diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/Chart.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/Chart.yaml new file mode 100644 index 000000000..36efe5678 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +appVersion: 0.1.54 +description: Controller that run jobs based on git events +name: gitjob +version: 0.1.54 diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/_helpers.tpl b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/_helpers.tpl new file mode 100644 index 000000000..f652b5643 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/_helpers.tpl @@ -0,0 +1,7 @@ +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrole.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrole.yaml new file mode 100644 index 000000000..bcad90164 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrole.yaml @@ -0,0 +1,38 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: gitjob +rules: + - apiGroups: + - "batch" + resources: + - 'jobs' + verbs: + - '*' + - apiGroups: + - "" + resources: + - 'pods' + verbs: + - 'list' + - 'get' + - 'watch' + - apiGroups: + - "" + resources: + - 'secrets' + verbs: + - '*' + - apiGroups: + - "" + resources: + - 'configmaps' + verbs: + - '*' + - apiGroups: + - "gitjob.cattle.io" + resources: + - "gitjobs" + - "gitjobs/status" + verbs: + - "*" \ No newline at end of file diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrolebinding.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrolebinding.yaml new file mode 100644 index 000000000..0bf07c4ef --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: gitjob-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: gitjob +subjects: + - kind: ServiceAccount + name: gitjob + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/deployment.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/deployment.yaml new file mode 100644 index 000000000..e7bbe5f20 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/deployment.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gitjob +spec: + selector: + matchLabels: + app: "gitjob" + template: + metadata: + labels: + app: "gitjob" + spec: + serviceAccountName: gitjob + containers: + - image: "{{ template "system_default_registry" . }}{{ .Values.gitjob.repository }}:{{ .Values.gitjob.tag }}" + name: gitjob + args: + {{- if .Values.debug }} + - --debug + {{- end }} + - --tekton-image + - "{{ template "system_default_registry" . }}{{ .Values.tekton.repository }}:{{ .Values.tekton.tag }}" + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + {{- if .Values.proxy }} + - name: HTTP_PROXY + value: {{ .Values.proxy }} + - name: HTTPS_PROXY + value: {{ .Values.proxy }} + - name: NO_PROXY + value: {{ .Values.noProxy }} + {{- end }} + {{- if .Values.debug }} + - name: CATTLE_DEV_MODE + value: "true" + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: "{{.Values.priorityClassName}}" + {{- end }} diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/leases.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/leases.yaml new file mode 100644 index 000000000..51f933950 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/leases.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: gitjob +rules: + - apiGroups: + - "coordination.k8s.io" + resources: + - "leases" + verbs: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: gitjob +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: gitjob +subjects: + - kind: ServiceAccount + name: gitjob diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/service.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/service.yaml new file mode 100644 index 000000000..bf57c1b55 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: gitjob +spec: + ports: + - name: http-80 + port: 80 + protocol: TCP + targetPort: 8080 + selector: + app: "gitjob" \ No newline at end of file diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/serviceaccount.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/serviceaccount.yaml new file mode 100644 index 000000000..5f8aecb04 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/templates/serviceaccount.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: gitjob diff --git a/charts/fleet/102.1.1+up0.7.1/charts/gitjob/values.yaml b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/values.yaml new file mode 100644 index 000000000..3be11fd51 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/charts/gitjob/values.yaml @@ -0,0 +1,31 @@ +gitjob: + repository: rancher/gitjob + tag: v0.1.54 + +tekton: + repository: rancher/tekton-utils + tag: v0.1.22 + +global: + cattle: + systemDefaultRegistry: "" + +# http[s] proxy server +# proxy: http://@:: + +# comma separated list of domains or ip addresses that will not use the proxy +noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local + +nodeSelector: + kubernetes.io/os: linux + +tolerations: + - key: cattle.io/os + operator: "Equal" + value: "linux" + effect: NoSchedule + +# PriorityClassName assigned to deployment. +priorityClassName: "" + +debug: false diff --git a/charts/fleet/102.1.1+up0.7.1/templates/_helpers.tpl b/charts/fleet/102.1.1+up0.7.1/templates/_helpers.tpl new file mode 100644 index 000000000..6cd96c3ac --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/templates/_helpers.tpl @@ -0,0 +1,22 @@ +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} + +{{/* +Windows cluster will add default taint for linux nodes, +add below linux tolerations to workloads could be scheduled to those linux nodes +*/}} +{{- define "linux-node-tolerations" -}} +- key: "cattle.io/os" + value: "linux" + effect: "NoSchedule" + operator: "Equal" +{{- end -}} + +{{- define "linux-node-selector" -}} +kubernetes.io/os: linux +{{- end -}} \ No newline at end of file diff --git a/charts/fleet/102.1.1+up0.7.1/templates/configmap.yaml b/charts/fleet/102.1.1+up0.7.1/templates/configmap.yaml new file mode 100644 index 000000000..07f1b5924 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/templates/configmap.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: fleet-controller +data: + config: | + { + "systemDefaultRegistry": "{{ template "system_default_registry" . }}", + "agentImage": "{{ template "system_default_registry" . }}{{.Values.agentImage.repository}}:{{.Values.agentImage.tag}}", + "agentImagePullPolicy": "{{ .Values.agentImage.imagePullPolicy }}", + "apiServerURL": "{{.Values.apiServerURL}}", + "apiServerCA": "{{b64enc .Values.apiServerCA}}", + "agentCheckinInterval": "{{.Values.agentCheckinInterval}}", + "ignoreClusterRegistrationLabels": {{.Values.ignoreClusterRegistrationLabels}}, + "bootstrap": { + "paths": "{{.Values.bootstrap.paths}}", + "repo": "{{.Values.bootstrap.repo}}", + "secret": "{{.Values.bootstrap.secret}}", + "branch": "{{.Values.bootstrap.branch}}", + "namespace": "{{.Values.bootstrap.namespace}}", + "agentNamespace": "{{.Values.bootstrap.agentNamespace}}", + }, + "webhookReceiverURL": "{{.Values.webhookReceiverURL}}", + "githubURLPrefix": "{{.Values.githubURLPrefix}}" + } diff --git a/charts/fleet/102.1.1+up0.7.1/templates/deployment.yaml b/charts/fleet/102.1.1+up0.7.1/templates/deployment.yaml new file mode 100644 index 000000000..164340c44 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/templates/deployment.yaml @@ -0,0 +1,102 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fleet-controller +spec: + selector: + matchLabels: + app: fleet-controller + template: + metadata: + labels: + app: fleet-controller + spec: + containers: + - env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: FLEET_PROPAGATE_DEBUG_SETTINGS_TO_AGENTS + value: {{ quote .Values.propagateDebugSettingsToAgents }} + {{- if .Values.clusterEnqueueDelay }} + - name: FLEET_CLUSTER_ENQUEUE_DELAY + value: {{ .Values.clusterEnqueueDelay }} + {{- end }} + {{- if .Values.proxy }} + - name: HTTP_PROXY + value: {{ .Values.proxy }} + - name: HTTPS_PROXY + value: {{ .Values.proxy }} + - name: NO_PROXY + value: {{ .Values.noProxy }} + {{- end }} + {{- if .Values.cpuPprof }} + - name: FLEET_CPU_PPROF_DIR + value: /tmp/pprof/ + {{- end }} + {{- if .Values.cpuPprof }} + - name: FLEET_CPU_PPROF_PERIOD + value: {{ quote .Values.cpuPprof.period }} + {{- end }} + {{- if .Values.debug }} + - name: CATTLE_DEV_MODE + value: "true" + {{- end }} + image: '{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}' + name: fleet-controller + imagePullPolicy: "{{ .Values.image.imagePullPolicy }}" + command: + - fleetcontroller + {{- if not .Values.gitops.enabled }} + - --disable-gitops + {{- end }} + {{- if not .Values.bootstrap.enabled }} + - --disable-bootstrap + {{- end }} + {{- if .Values.debug }} + - --debug + - --debug-level + - {{ quote .Values.debugLevel }} + {{- else }} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + privileged: false + capabilities: + drop: + - ALL + {{- end }} + volumeMounts: + - mountPath: /tmp + name: tmp + {{- if .Values.cpuPprof }} + - mountPath: /tmp/pprof + name: pprof + {{- end }} + volumes: + - name: tmp + emptyDir: {} + {{- if .Values.cpuPprof }} + - name: pprof {{ toYaml .Values.cpuPprof.volumeConfiguration | nindent 10 }} + {{- end }} + + serviceAccountName: fleet-controller + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} +{{- if .Values.nodeSelector }} +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} +{{- if .Values.tolerations }} +{{ toYaml .Values.tolerations | indent 8 }} +{{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: "{{.Values.priorityClassName}}" + {{- end }} + +{{- if not .Values.debug }} + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 +{{- end }} diff --git a/charts/fleet/102.1.1+up0.7.1/templates/job_cleanup_clusterregistrations.yaml b/charts/fleet/102.1.1+up0.7.1/templates/job_cleanup_clusterregistrations.yaml new file mode 100644 index 000000000..fa59cc575 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/templates/job_cleanup_clusterregistrations.yaml @@ -0,0 +1,29 @@ +{{- if .Values.migrations.clusterRegistrationCleanup }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: fleet-cleanup-clusterregistrations + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + template: + metadata: + labels: + app: fleet-job + spec: + serviceAccountName: fleet-controller + restartPolicy: Never + containers: + - name: cleanup + image: "{{ template "system_default_registry" . }}{{.Values.agentImage.repository}}:{{.Values.agentImage.tag}}" + imagePullPolicy: {{ .Values.global.imagePullPolicy }} + command: + - fleet + args: + - cleanup + nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} + tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} + backoffLimit: 1 +{{- end }} diff --git a/charts/fleet/102.1.1+up0.7.1/templates/rbac.yaml b/charts/fleet/102.1.1+up0.7.1/templates/rbac.yaml new file mode 100644 index 000000000..361d68c08 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/templates/rbac.yaml @@ -0,0 +1,114 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: fleet-controller +rules: +- apiGroups: + - gitjob.cattle.io + resources: + - '*' + verbs: + - '*' +- apiGroups: + - fleet.cattle.io + resources: + - '*' + verbs: + - '*' +- apiGroups: + - "" + resources: + - namespaces + - serviceaccounts + verbs: + - '*' +- apiGroups: + - "" + resources: + - secrets + - configmaps + verbs: + - '*' +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + - roles + - rolebindings + verbs: + - '*' + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: fleet-controller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: fleet-controller +subjects: +- kind: ServiceAccount + name: fleet-controller + namespace: {{.Release.Namespace}} + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: fleet-controller +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - '*' +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - '*' + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: fleet-controller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: fleet-controller +subjects: +- kind: ServiceAccount + name: fleet-controller + +{{- if .Values.bootstrap.enabled }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: fleet-controller-bootstrap +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: fleet-controller-bootstrap +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: fleet-controller-bootstrap +subjects: +- kind: ServiceAccount + name: fleet-controller-bootstrap + namespace: {{.Release.Namespace}} +{{- end }} diff --git a/charts/fleet/102.1.1+up0.7.1/templates/serviceaccount.yaml b/charts/fleet/102.1.1+up0.7.1/templates/serviceaccount.yaml new file mode 100644 index 000000000..ba27c748d --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: fleet-controller + +{{- if .Values.bootstrap.enabled }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: fleet-controller-bootstrap +{{- end }} diff --git a/charts/fleet/102.1.1+up0.7.1/values.yaml b/charts/fleet/102.1.1+up0.7.1/values.yaml new file mode 100644 index 000000000..3077ebb90 --- /dev/null +++ b/charts/fleet/102.1.1+up0.7.1/values.yaml @@ -0,0 +1,83 @@ +image: + repository: rancher/fleet + tag: v0.7.1 + imagePullPolicy: IfNotPresent + +agentImage: + repository: rancher/fleet-agent + tag: v0.7.1 + imagePullPolicy: IfNotPresent + +# For cluster registration the public URL of the Kubernetes API server must be set here +# Example: https://example.com:6443 +apiServerURL: "" + +# For cluster registration the pem encoded value of the CA of the Kubernetes API server must be set here +# If left empty it is assumed this Kubernetes API TLS is signed by a well known CA. +apiServerCA: "" + +# A duration string for how often agents should report a heartbeat +agentCheckinInterval: "15m" + +# Whether you want to allow cluster upon registration to specify their labels. +ignoreClusterRegistrationLabels: false + +# Counts from gitrepo are out of sync with bundleDeployment state. +# Just retry in a number of seconds as there is no great way to trigger an event that doesn't cause a loop. +# If not set default is 15 seconds. +# clusterEnqueueDelay: 120s + +# http[s] proxy server +# proxy: http://@:: + +# comma separated list of domains or ip addresses that will not use the proxy +noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local + +bootstrap: + enabled: true + # The namespace that will be autocreated and the local cluster will be registered in + namespace: fleet-local + # The namespace where the fleet agent for the local cluster will be ran, if empty + # this will default to cattle-fleet-system + agentNamespace: "" + # A repo to add at install time that will deploy to the local cluster. This allows + # one to fully bootstrap fleet, its configuration and all its downstream clusters + # in one shot. + repo: "" + secret: "" + branch: master + paths: "" + + +global: + cattle: + systemDefaultRegistry: "" + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} +## List of node taints to tolerate (requires Kubernetes >= 1.6) +tolerations: [] + +## PriorityClassName assigned to deployment. +priorityClassName: "" + +gitops: + enabled: true + +debug: false +debugLevel: 0 +propagateDebugSettingsToAgents: true + +## Optional CPU pprof configuration. Profiles are collected continuously and saved every period +## Any valid volume configuration can be provided, the example below uses hostPath +#cpuPprof: +# period: "60s" +# volumeConfiguration: +# hostPath: +# path: /tmp/pprof +# type: DirectoryOrCreate + +migrations: + clusterRegistrationCleanup: true diff --git a/index.yaml b/index.yaml index 607075d29..ad43d1869 100755 --- a/index.yaml +++ b/index.yaml @@ -269,6 +269,32 @@ entries: - assets/epinio-crd/epinio-crd-100.0.0+up1.2.1.tgz version: 100.0.0+up1.2.1 fleet: + - annotations: + catalog.cattle.io/auto-install: fleet-crd=match + catalog.cattle.io/certified: rancher + catalog.cattle.io/experimental: "true" + catalog.cattle.io/hidden: "true" + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.27.0-0' + catalog.cattle.io/namespace: cattle-fleet-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux,windows + catalog.cattle.io/provides-gvr: clusters.fleet.cattle.io/v1alpha1 + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/release-name: fleet + apiVersion: v2 + appVersion: 0.7.1 + created: "2023-08-16T15:40:59.828657-03:00" + dependencies: + - condition: gitops.enabled + name: gitjob + repository: file://./charts/gitjob + description: Fleet Manager - GitOps at Scale + digest: f003e34ad187d0afb3fb260bcb029d6682c4e0803e8f71516addad858b7a8f3d + icon: https://charts.rancher.io/assets/logos/fleet.svg + name: fleet + urls: + - assets/fleet/fleet-102.1.1+up0.7.1.tgz + version: 102.1.1+up0.7.1 - annotations: catalog.cattle.io/auto-install: fleet-crd=match catalog.cattle.io/certified: rancher diff --git a/release.yaml b/release.yaml index b0b6e3fec..6fa6c89c4 100644 --- a/release.yaml +++ b/release.yaml @@ -1,4 +1,6 @@ rancher-monitoring: -- 103.0.0+up40.1.2 + - 103.0.0+up40.1.2 rancher-monitoring-crd: -- 103.0.0+up40.1.2 + - 103.0.0+up40.1.2 +fleet: + - 102.1.1+up0.7.1