Skip to content

Commit

Permalink
Release 0.3.4 (#104)
Browse files Browse the repository at this point in the history
* initialize release

* Update argocd templates from upstream (#100)

* added applicationconfigurations crd (#99)

* fixed crd define (#102)

* Remove syncwave from eventbus (#101)

* remove default annotation and move to values - eventbus

* add missing separator (#103)

* CR-21441 -- event reporter chart (#108)

---------

Co-authored-by: Noam Gal <noam.gal@codefresh.io>
Co-authored-by: Yaroslav Drachenko <yaroslav@codefresh.io>
  • Loading branch information
3 people authored Nov 29, 2023
1 parent 578ccfc commit 54437da
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 9 deletions.
14 changes: 11 additions & 3 deletions 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.36
description: A Helm chart for Codefresh gitops runtime
name: gitops-runtime
version: 0.3.3
version: 0.3.4
home: https://github.com/codefresh-io/gitops-runtime-helm
icon: https://avatars1.githubusercontent.com/u/11412079?v=3
keywords:
Expand All @@ -15,11 +15,19 @@ annotations:
artifacthub.io/alternativeName: "codefresh-gitops-runtime"
artifacthub.io/changes: |
- kind: changed
description: Update nginx to 1.25
description: Remove sync wave from EventBus - fix cold start from ArgoCD and allow EventBus annotations from values
- kind: changed
description: Added applicationconfigurations CRD
- kind: changed
description: Update ArgoCD templates from upstream 5.50.1 - also switching Redis repository from quay.io/codefresh to the upstream public ecr
- kind: changed
description: Update ArgoCD chart to version 5.50.1-1-cap-CR-21429
- kind: added
description: Added new event-reporter component and ability to switch between old and new
dependencies:
- name: argo-cd
repository: https://codefresh-io.github.io/argo-helm
version: 5.46.2-4-cap-CR-20837
version: 5.50.1-1-cap-CR-21429
- name: argo-events
repository: https://codefresh-io.github.io/argo-helm
version: 2.0.9-1-cap-CR-19893
Expand Down
9 changes: 6 additions & 3 deletions charts/gitops-runtime/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Codefresh gitops runtime
![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square) ![AppVersion: 0.1.36](https://img.shields.io/badge/AppVersion-0.1.36-informational?style=flat-square)
![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square) ![AppVersion: 0.1.36](https://img.shields.io/badge/AppVersion-0.1.36-informational?style=flat-square)

## Prerequisites

Expand Down Expand Up @@ -27,7 +27,7 @@ We have created a helper utility to resolve this issue:
The utility is packaged in a container image. Below are instructions on executing the utility using Docker:

```
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.3.3 <local_registry>
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.3.4 <local_registry>
```
`output_dir` - is a local directory where the utility will output files. <br>
`local_registry` - is your local registry where you want to mirror the images to
Expand Down Expand Up @@ -147,6 +147,8 @@ sealed-secrets:
| argo-cd.configs.params."application.namespaces" | string | `"cf-*"` | |
| argo-cd.configs.params."server.insecure" | bool | `true` | |
| argo-cd.crds.install | bool | `true` | |
| argo-cd.eventReporter.enabled | bool | `false` | Installs new event reporter component to cluster |
| argo-cd.eventReporter.version | string | `"v1"` | Switches between old and new reporter version. Possible values: v1, v2. For v2 `argo-cd.eventReporter.enabled=true` is required |
| argo-cd.fullnameOverride | string | `"argo-cd"` | |
| argo-cd.notifications.bots.slack | string | `nil` | |
| argo-events.crds.install | bool | `false` | |
Expand Down Expand Up @@ -275,8 +277,9 @@ sealed-secrets:
| 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. |
| global.codefresh.userToken.token | string | `""` | User token in plain text. The chart creates and manages the secret for this token. |
| global.runtime | object | `{"cluster":"https://kubernetes.default.svc","eventBus":{"name":"codefresh-eventbus","nats":{"native":{"auth":"token","containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","replicas":3}},"pdb":{"enabled":true,"minAvailable":2}},"gitCredentials":{"password":{"secretKeyRef":{},"value":null},"username":"username"},"ingress":{"annotations":{},"className":"nginx","enabled":false,"hosts":[],"protocol":"https","tls":[]},"ingressUrl":"","name":null}` | Runtime level settings |
| global.runtime | object | `{"cluster":"https://kubernetes.default.svc","eventBus":{"annotations":{},"name":"codefresh-eventbus","nats":{"native":{"auth":"token","containerTemplate":{"resources":{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"4Gi"},"requests":{"cpu":"200m","ephemeral-storage":"2Gi","memory":"1Gi"}}},"maxPayload":"4MB","replicas":3}},"pdb":{"enabled":true,"minAvailable":2}},"gitCredentials":{"password":{"secretKeyRef":{},"value":null},"username":"username"},"ingress":{"annotations":{},"className":"nginx","enabled":false,"hosts":[],"protocol":"https","tls":[]},"ingressUrl":"","name":null}` | Runtime level settings |
| global.runtime.cluster | string | `"https://kubernetes.default.svc"` | Runtime cluster. Should not be changed. |
| global.runtime.eventBus.annotations | object | `{}` | Annotations on EventBus resource |
| global.runtime.eventBus.name | string | `"codefresh-eventbus"` | Eventbus name |
| global.runtime.eventBus.pdb | object | `{"enabled":true,"minAvailable":2}` | Pod disruption budget for the eventbus |
| global.runtime.eventBus.pdb.minAvailable | int | `2` | Minimum number of available eventbus pods. For eventbus to stay functional the majority of its replicas should always be available. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{{ include "gitops-operator.resources.restricted_git_source_rbac" . }}
---
{{ include "gitops-operator.resources.sa" .}}
---
{{- include "gitops-operator.crds.application-configuration" . }}
---
{{- include "gitops-operator.crds.restricted-gitsource" . }} #
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{{- define "gitops-operator.crds.application-configuration" }}
{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: applicationconfigurations.csdp.codefresh.io
annotations:
{{- if .Values.crds.keep }}
"helm.sh/resource-policy": keep
{{- end }}
{{- with .Values.crds.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: applicationconfigurations.csdp.codefresh.io
app.kubernetes.io/part-of: gitops-operator
{{- with .Values.crds.additionalLabels }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
group: csdp.codefresh.io
names:
kind: ApplicationConfiguration
listKind: ApplicationConfigurationList
plural: applicationconfigurations
singular: applicationconfiguration
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: ApplicationConfiguration is the Schema for the applicationconfiguration
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ApplicationConfigurationSpec defines the desired state of
ApplicationConfiguration
properties:
applicationSourceSelector:
description: ApplicationSourceSelector is a selector to select the
application source
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
priority:
type: integer
promotion:
additionalProperties:
properties:
jsonPaths:
description: JsonPaths is an array of json paths inside the
file,
items:
type: string
type: array
required:
- jsonPaths
type: object
description: Promotion is the definition on how to promote this application
type: object
versionSource:
description: VersionSource is the source of the application version
properties:
file:
description: File is the file name of the source
type: string
jsonPath:
description: JsonPath is the json path inside the file, to the
version information
type: string
required:
- file
- jsonPath
type: object
required:
- applicationSourceSelector
- priority
type: object
type: object
served: true
storage: true
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
{{- if hasKey $eventBusSpec "pdb" }}
{{- $eventBusSpec = unset $eventBusSpec "pdb" }}
{{- end }}
{{- if hasKey $eventBusSpec "annotations" }}
{{- $eventBusSpec = unset $eventBusSpec "annotations" }}
{{- end }}
apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
name: {{ $eventBusName }}
annotations:
argocd.argoproj.io/sync-wave: "2"
{{- .Values.global.runtime.eventBus.annotations | toYaml | nindent 4}}
labels:
app.kubernetes.io/part-of: argo-events
codefresh.io/internal: "true"
Expand Down
4 changes: 3 additions & 1 deletion charts/gitops-runtime/templates/gitops-operator/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
{{- $_ := set $gitopsOperatorContext "Values" (get .Values "gitops-operator") }}
{{- $_ := set $gitopsOperatorContext.Values "global" (get .Values "global") }}

{{- include "gitops-operator.crds.restricted-gitsource" $gitopsOperatorContext }}
{{- include "gitops-operator.crds.application-configuration" $gitopsOperatorContext }}
---
{{- include "gitops-operator.crds.restricted-gitsource" $gitopsOperatorContext }}
9 changes: 9 additions & 0 deletions charts/gitops-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ global:
eventBus:
# -- Eventbus name
name: 'codefresh-eventbus'
# -- Annotations on EventBus resource
annotations: {}
# -- Pod disruption budget for the eventbus
pdb:
enabled: true
Expand Down Expand Up @@ -143,6 +145,13 @@ argo-cd:
params:
server.insecure: true
application.namespaces: 'cf-*'
eventReporter:
# -- Installs new event reporter component to cluster
enabled: false
# -- Switches between old and new reporter version.
# Possible values: v1, v2.
# For v2 `argo-cd.eventReporter.enabled=true` is required
version: v1
notifications:
bots:
slack:
Expand Down

0 comments on commit 54437da

Please sign in to comment.