-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from codefresh-io/release-0.3.0-new
Release 0.3.0(0.1.36)
- Loading branch information
Showing
18 changed files
with
1,385 additions
and
8 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
16 changes: 16 additions & 0 deletions
16
charts/gitops-runtime/templates/_components/gitops-operator/_all_resources.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,16 @@ | ||
{{- define "gitops-operator.resources" }} | ||
--- | ||
{{ include "gitops-operator.resources.deployment" . }} # | ||
--- | ||
{{ include "gitops-operator.resources.rbac" . }} | ||
--- | ||
{{ include "gitops-operator.resources.auth_proxy_rbac" . }} | ||
--- | ||
{{ include "gitops-operator.resources.leader_election_rbac" . }} | ||
--- | ||
{{ include "gitops-operator.resources.restricted_git_source_rbac" . }} | ||
--- | ||
{{ include "gitops-operator.resources.sa" .}} | ||
--- | ||
{{- include "gitops-operator.crds.restricted-gitsource" . }} # | ||
{{- end }} |
106 changes: 106 additions & 0 deletions
106
charts/gitops-runtime/templates/_components/gitops-operator/_deployment.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,106 @@ | ||
{{- define "gitops-operator.resources.deployment" }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "gitops-operator.fullname" . }} | ||
labels: | ||
{{- include "gitops-operator.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "gitops-operator.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "gitops-operator.selectorLabels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "gitops-operator.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: kube-rbac-proxy | ||
securityContext: | ||
{{- toYaml (index .Values "kube-rbac-proxy" "securityContext") | nindent 12 }} | ||
image: '{{ index .Values "kube-rbac-proxy" "image" "repository" }}:{{ index .Values "kube-rbac-proxy" "image" "tag" }}' | ||
imagePullPolicy: {{ index .Values "kube-rbac-proxy" "image" "pullPolicy" }} | ||
ports: | ||
- name: https | ||
containerPort: 8443 | ||
protocol: TCP | ||
resources: | ||
{{- toYaml (index .Values "kube-rbac-proxy" "resources") | nindent 12 }} | ||
args: | ||
- "--secure-listen-address=0.0.0.0:8443" | ||
- "--upstream=http://127.0.0.1:8080/" | ||
- "--logtostderr=true" | ||
- "--v=0" | ||
- name: manager | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
{{- include "codefresh-gitops-runtime.components.common_helpers.container-templates.env-vars" .Values.env | nindent 8 }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: | ||
- /manager | ||
args: | ||
- "--health-probe-bind-address=:8081" | ||
- "--metrics-bind-address=127.0.0.1:8080" | ||
- "--leader-elect" | ||
ports: | ||
- name: http | ||
containerPort: 8081 | ||
- name: http-metrics | ||
containerPort: 8080 | ||
readinessProbe: | ||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }} | ||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} | ||
successThreshold: {{ .Values.readinessProbe.successThreshold }} | ||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }} | ||
httpGet: | ||
port: http | ||
path: /readyz | ||
livenessProbe: | ||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }} | ||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} | ||
successThreshold: {{ .Values.livenessProbe.successThreshold }} | ||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }} | ||
httpGet: | ||
port: http | ||
path: /healthz | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
volumeMounts: | ||
{{- with .Values.extraVolumeMounts }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
volumes: | ||
{{- with .Values.extraVolumes }} | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
{{- end }} |
47 changes: 47 additions & 0 deletions
47
charts/gitops-runtime/templates/_components/gitops-operator/_helpers.tpl
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,47 @@ | ||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "gitops-operator.fullname" -}} | ||
{{- print "gitops-operator" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "gitops-operator.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "gitops-operator.labels" -}} | ||
helm.sh/chart: {{ include "gitops-operator.chart" . }} | ||
{{ include "gitops-operator.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/part-of: gitops-operator | ||
codefresh.io/internal: "true" | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "gitops-operator.selectorLabels" -}} | ||
app: gitops-operator | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "gitops-operator.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "gitops-operator.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
63 changes: 63 additions & 0 deletions
63
charts/gitops-runtime/templates/_components/gitops-operator/_rbac.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,63 @@ | ||
|
||
{{- define "gitops-operator.resources.rbac" }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
{{- include "gitops-operator.selectorLabels" . | nindent 4 }} | ||
name: codefresh-gitops-operator | ||
rules: | ||
- apiGroups: | ||
- argoproj.io | ||
resources: | ||
- applications | ||
- appprojects | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- update | ||
- watch | ||
- apiGroups: | ||
- csdp.codefresh.io | ||
resources: | ||
- restrictedgitsources | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- csdp.codefresh.io | ||
resources: | ||
- restrictedgitsources/finalizers | ||
verbs: | ||
- update | ||
- apiGroups: | ||
- csdp.codefresh.io | ||
resources: | ||
- restrictedgitsources/status | ||
verbs: | ||
- get | ||
- patch | ||
- update | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
{{- include "gitops-operator.selectorLabels" . | nindent 4 }} | ||
name: codefresh-gitops-operator | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: codefresh-gitops-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "gitops-operator.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
14 changes: 14 additions & 0 deletions
14
charts/gitops-runtime/templates/_components/gitops-operator/_serviceaccount.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,14 @@ | ||
{{- define "gitops-operator.resources.sa" }} | ||
{{- if .Values.serviceAccount.create }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "gitops-operator.serviceAccountName" . }} | ||
labels: | ||
{{- include "gitops-operator.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.