Skip to content

CR-18274-fix-ap-restart #34

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

Merged
merged 5 commits into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/gitops-runtime/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.1.27
description: A Helm chart for Codefresh gitops runtime
name: gitops-runtime
version: 0.2.1-alpha.8
version: 0.2.1-alpha.9
home: https://github.com/codefresh-io/gitops-runtime-helm
keywords:
- codefresh
Expand Down
12 changes: 4 additions & 8 deletions charts/gitops-runtime/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gitops-runtime

![Version: 0.2.1-alpha.8](https://img.shields.io/badge/Version-0.2.1--alpha.8-informational?style=flat-square) ![AppVersion: 0.1.27](https://img.shields.io/badge/AppVersion-0.1.27-informational?style=flat-square)
![Version: 0.2.1-alpha.9](https://img.shields.io/badge/Version-0.2.1--alpha.9-informational?style=flat-square) ![AppVersion: 0.1.27](https://img.shields.io/badge/AppVersion-0.1.27-informational?style=flat-square)

A Helm chart for Codefresh gitops runtime

Expand Down Expand Up @@ -52,13 +52,13 @@ A Helm chart for Codefresh gitops runtime
| app-proxy.image-enrichment.serviceAccount.name | string | `"codefresh-image-enrichment-sa"` | Name of the service account to create or the name of the existing one to use |
| app-proxy.image.pullPolicy | string | `"IfNotPresent"` | |
| app-proxy.image.repository | string | `"quay.io/codefresh/cap-app-proxy"` | |
| app-proxy.image.tag | string | `"1.2193.0"` | |
| app-proxy.image.tag | string | `"1.2207.0"` | |
| app-proxy.imagePullSecrets | list | `[]` | |
| app-proxy.initContainer.command[0] | string | `"./init.sh"` | |
| app-proxy.initContainer.env | object | `{}` | |
| app-proxy.initContainer.image.pullPolicy | string | `"IfNotPresent"` | |
| app-proxy.initContainer.image.repository | string | `"quay.io/codefresh/cap-app-proxy-init"` | |
| app-proxy.initContainer.image.tag | string | `"1.2193.0"` | |
| app-proxy.initContainer.image.tag | string | `"1.2207.0"` | |
| app-proxy.initContainer.resources.limits.cpu | string | `"1"` | |
| app-proxy.initContainer.resources.limits.memory | string | `"512Mi"` | |
| app-proxy.initContainer.resources.requests.cpu | string | `"0.2"` | |
Expand Down Expand Up @@ -123,13 +123,9 @@ A Helm chart for Codefresh gitops runtime
| event-reporters.workflow.sensor.replicas | int | `1` | |
| event-reporters.workflow.sensor.resources | object | `{}` | |
| event-reporters.workflow.serviceAccount.create | bool | `true` | |
| global.codefresh | object | `{"accountId":"","apiEventsPath":"/2.0/api/events","gitIntegration":{"provider":{"apiUrl":"https://api.github.com","name":"GITHUB"}},"url":"https://g.codefresh.io","userToken":{"secretKeyRef":{},"token":""}}` | Codefresh platform and account-related settings |
| global.codefresh | object | `{"accountId":"","apiEventsPath":"/2.0/api/events","url":"https://g.codefresh.io","userToken":{"secretKeyRef":{},"token":""}}` | Codefresh platform and account-related settings |
| global.codefresh.accountId | string | `""` | Codefresh Account ID. |
| global.codefresh.apiEventsPath | string | `"/2.0/api/events"` | Events API endpoint URL suffix. |
| global.codefresh.gitIntegration | object | `{"provider":{"apiUrl":"https://api.github.com","name":"GITHUB"}}` | Git integration for this runtime. Requires the Git provider name and the provider's API URL. |
| global.codefresh.gitIntegration.provider | object | `{"apiUrl":"https://api.github.com","name":"GITHUB"}` | The Git provider to use. We currently support GitHub, GitLab, Bitbucket Server, and Bitbucket Cloud. |
| global.codefresh.gitIntegration.provider.apiUrl | string | `"https://api.github.com"` | Provider API URL. Example for GitHub, https://api.github.com. |
| global.codefresh.gitIntegration.provider.name | string | `"GITHUB"` | Name of the Git provider: BITBUCKET, BITBUCKET_SERVER, GITHUB, GITLAB |
| global.codefresh.url | string | `"https://g.codefresh.io"` | URL of Codefresh platform. |
| global.codefresh.userToken | object | `{"secretKeyRef":{},"token":""}` | User token. Used for runtime registration against the patform. One of token (for plain text value) or secretKeyRef must be provided. |
| global.codefresh.userToken.secretKeyRef | object | `{}` | User token that references an existing secret containing the token. |
Expand Down
4 changes: 0 additions & 4 deletions charts/gitops-runtime/ci/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ global:
name: mysecret
key: myvalue
optional: true
gitIntegration:
provider:
name: 'GITHUB'
apiUrl: 'https://api.github.com'

runtime:
name: default
Expand Down
4 changes: 0 additions & 4 deletions charts/gitops-runtime/ci/ingressless-values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
global:
codefresh:
accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account
gitIntegration:
provider:
name: 'GITHUB'
apiUrl: 'https://api.github.com'
userToken:
secretKeyRef:
name: mysecret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CORS:
name: cap-app-proxy-cm
key: cors
optional: true
DEPLOYMENT_NAME: {{ include "cap-app-proxy.fullname" . }}
ENV:
valueFrom:
configMapKeyRef:
Expand All @@ -62,6 +63,7 @@ NAMESPACE:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
PART_OF_VALUE: app-proxy
PORT:
valueFrom:
configMapKeyRef:
Expand Down
24 changes: 0 additions & 24 deletions charts/gitops-runtime/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,30 +223,6 @@ Output comma separated list of installed runtime components
{{- $comptList | toYaml }}
{{- end }}

# ------------------------------------------------------------------------------------------------------------
# Git integration
------------------------------------------------------------------------------------------------------------
{{- define "codefresh-gitops-runtime.git-integration.provider"}}
{{- if .Values.global.codefresh.gitIntegration.provider.name }}
{{- $supportedProviders := list "GITHUB" "GITLAB" "BITBUCKET" "BITBUCKET_SERVER" }}
{{- if has .Values.global.codefresh.gitIntegration.provider.name $supportedProviders }}
{{- print .Values.global.codefresh.gitIntegration.provider.name }}
{{- else }}
{{ fail (printf "ERROR: Unsupported git provider %s. Currently supported: GITHUB,GITLAB,BITBUCKET,BITBUCKET_SERVER" .Values.global.codefresh.gitIntegration.provider.name)}}
{{- end }}
{{- else }}
{{ fail "Values.global.codefresh.gitIntegration.provider.name is required"}}
{{- end }}
{{- end }}

{{- define "codefresh-gitops-runtime.git-integration.apiUrl"}}
{{- if .Values.global.codefresh.gitIntegration.provider.apiUrl }}
{{- print .Values.global.codefresh.gitIntegration.provider.apiUrl }}
{{- else }}
{{ fail "Values.global.codefresh.gitIntegration.provider.apiUrl is required"}}
{{- end }}
{{- end }}

# ------------------------------------------------------------------------------------------------------------
# runtime git credentials
# ------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ app-proxy components are generated.
HELM_RELEASE_NAME: {{ .Release.Name }}
USER_TOKEN:
{{- include "codefresh-gitops-runtime.installation-token-env-var-value" . | nindent 2 }}
GIT_INTEGRATION_PROVIDER: {{ include "codefresh-gitops-runtime.git-integration.provider" .}}
{{- if .Values.global.codefresh.gitIntegration.provider.apiUrl }}
GIT_INTEGRATION_APIURL: {{ include "codefresh-gitops-runtime.git-integration.apiUrl" . }}
{{- end }}
{{- if or .Values.global.runtime.gitCredentials.password.value .Values.global.runtime.gitCredentials.password.secretKeyRef }}
GIT_USERNAME: {{ .Values.global.runtime.gitCredentials.username }}
GIT_PASSWORD:
Expand All @@ -21,5 +17,4 @@ GIT_PASSWORD:
{{- define "codefresh-gitops-runtime.app-proxy.init-container.calculated-env-vars"}}
USER_TOKEN:
{{- include "codefresh-gitops-runtime.installation-token-env-var-value" . | nindent 2 }}
GIT_INTEGRATION_PROVIDER: {{ include "codefresh-gitops-runtime.git-integration.provider" .}}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
global:
codefresh:
gitIntegration:
provider:
name: 'GITHUB'
apiUrl: 'https://api.github.com'
accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account
userToken:
token: 'dummy'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
global:
codefresh:
gitIntegration:
provider:
name: 'GITHUB'
apiUrl: 'https://api.github.com'
accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account

runtime:
Expand Down
6 changes: 1 addition & 5 deletions charts/gitops-runtime/tests/values/mandatory-values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
global:
codefresh:
accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account
gitIntegration:
provider:
name: 'GITHUB'
apiUrl: 'https://api.github.com'
userToken:
token: 'dummy'

Expand All @@ -15,4 +11,4 @@ global:
enabled: false

argo-rollouts:
enabled: true
enabled: true
12 changes: 2 additions & 10 deletions charts/gitops-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ global:
apiEventsPath: "/2.0/api/events"
# -- Codefresh Account ID.
accountId: ""
# -- Git integration for this runtime. Requires the Git provider name and the provider's API URL.
gitIntegration:
# -- The Git provider to use. We currently support GitHub, GitLab, Bitbucket Server, and Bitbucket Cloud.
provider:
# -- Name of the Git provider: BITBUCKET, BITBUCKET_SERVER, GITHUB, GITLAB
name: GITHUB
# -- Provider API URL. Example for GitHub, https://api.github.com.
apiUrl: https://api.github.com
# -- User token. Used for runtime registration against the patform. One of token (for plain text value) or secretKeyRef must be provided.
userToken:
# -- User token in plain text. The chart creates and manages the secret for this token.
Expand Down Expand Up @@ -280,14 +272,14 @@ app-proxy:
image:
repository: quay.io/codefresh/cap-app-proxy
# Overrides the image tag whose default is the chart appVersion.
tag: 1.2193.0
tag: 1.2207.0
pullPolicy: IfNotPresent

initContainer:
image:
repository: quay.io/codefresh/cap-app-proxy-init
# Overrides the image tag whose default is the chart appVersion.
tag: 1.2193.0
tag: 1.2207.0
pullPolicy: IfNotPresent
command:
- ./init.sh
Expand Down