-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: copy agent * feat: copy agent * feat: update validation * feat: update agent * feat: change source url * fix: appVersion --------- Co-authored-by: David Ragot <[email protected]>
- Loading branch information
Showing
14 changed files
with
514 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
values.staging.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,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/ |
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 @@ | ||
apiVersion: v2 | ||
name: agent | ||
description: Formance Membership Agent Helm Chart | ||
home: "https://formance.com" | ||
sources: | ||
- "https://github.com/formancehq/agent" | ||
maintainers: | ||
- name: "Formance Team" | ||
email: "[email protected]" | ||
icon: "https://avatars.githubusercontent.com/u/84325077?s=200&v=4" | ||
|
||
type: application | ||
version: v2.1.0 | ||
|
||
# Not tied anymore | ||
appVersion: "v2.0.18" |
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,37 @@ | ||
VERSION --wildcard-builds --wildcard-copy 0.8 | ||
|
||
IMPORT ../ AS charts | ||
IMPORT ../core AS core | ||
|
||
schema: | ||
FROM charts+schema-base | ||
WORKDIR /src | ||
DO --pass-args charts+SCHEMA | ||
|
||
readme: | ||
FROM charts+readme-base | ||
WORKDIR /src/agent | ||
COPY --dir (+dependencies/*) . | ||
DO --pass-args charts+README_GENERATOR | ||
|
||
sources: | ||
DO --pass-args charts+BASE | ||
WORKDIR /src/agent | ||
COPY (+schema/*) . | ||
DO --pass-args charts+SOURCES | ||
|
||
dependencies: | ||
FROM +sources | ||
WORKDIR /src/agent | ||
DO --pass-args charts+DEPENDENCIES | ||
|
||
validate: | ||
FROM +dependencies | ||
WORKDIR /src/agent | ||
COPY (+readme/*) . | ||
DO --pass-args charts+VALIDATE | ||
|
||
package: | ||
FROM +validate | ||
WORKDIR /src/agent | ||
DO --pass-args charts+PACKAGE |
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,54 @@ | ||
# agent | ||
|
||
![Version: v2.1.0](https://img.shields.io/badge/Version-v2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.0.18](https://img.shields.io/badge/AppVersion-v2.0.18-informational?style=flat-square) | ||
|
||
Formance Membership Agent Helm Chart | ||
|
||
**Homepage:** <https://formance.com> | ||
|
||
## Maintainers | ||
|
||
| Name | Email | Url | | ||
| ---- | ------ | --- | | ||
| Formance Team | <[email protected]> | | | ||
|
||
## Source Code | ||
|
||
* <https://github.com/formancehq/agent> | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| affinity | object | `{}` | | | ||
| agent.authentication.clientID | string | `""` | | | ||
| agent.authentication.clientSecret | string | `""` | | | ||
| agent.authentication.issuer | string | `"https://app.formance.cloud/api"` | | | ||
| agent.authentication.mode | string | `"bearer"` | | | ||
| agent.baseUrl | string | `""` | | | ||
| agent.id | string | `"b7549a16-f74a-4815-ab1e-bb8ef1c3833b"` | | | ||
| agent.production | bool | `false` | | | ||
| config.monitoring.serviceName | string | `"agent"` | | | ||
| debug | bool | `false` | | | ||
| fullnameOverride | string | `""` | | | ||
| global.monitoring.logs.format | string | `"json"` | | | ||
| global.serviceName | string | `"agent"` | | | ||
| image.pullPolicy | string | `"IfNotPresent"` | | | ||
| image.repository | string | `"ghcr.io/formancehq/agent"` | | | ||
| image.tag | string | `""` | | | ||
| imagePullSecrets | list | `[]` | | | ||
| nameOverride | string | `""` | | | ||
| nodeSelector | object | `{}` | | | ||
| podAnnotations | object | `{}` | | | ||
| podSecurityContext | object | `{}` | | | ||
| resources.limits.cpu | string | `"100m"` | | | ||
| resources.limits.memory | string | `"128Mi"` | | | ||
| resources.requests.cpu | string | `"100m"` | | | ||
| resources.requests.memory | string | `"128Mi"` | | | ||
| securityContext | object | `{}` | | | ||
| server.address | string | `"app.formance.cloud:443"` | | | ||
| server.tls.enabled | bool | `true` | | | ||
| server.tls.insecureSkipVerify | bool | `true` | | | ||
| serviceAccount.annotations | object | `{}` | | | ||
| tolerations | list | `[]` | | | ||
|
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 @@ | ||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "agent.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{- define "agent.monitoring.logs" -}} | ||
{{- if eq .Values.global.monitoring.logs.format "json" }} | ||
- name: JSON_FORMATTING_LOGGER | ||
value: "true" | ||
{{- end }} | ||
{{- end }} |
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,18 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Chart.Name }}-{{ .Release.Name }} | ||
rules: | ||
- apiGroups: | ||
- formance.com | ||
resources: | ||
- "*" | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- "apiextensions.k8s.io" | ||
resources: | ||
- customresourcedefinitions | ||
verbs: | ||
- "get" | ||
- "list" |
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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ .Chart.Name }}-{{ .Release.Name }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Chart.Name }} | ||
namespace: {{.Release.Namespace}} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ .Chart.Name }}-{{ .Release.Name }} | ||
apiGroup: rbac.authorization.k8s.io |
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,82 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "agent.selectorLabels" . | nindent 6 }} | ||
strategy: | ||
# Stop before recreate as each agent has an id and the server will not allow the connection if an agent is already connected | ||
type: Recreate | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "agent.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: DEBUG | ||
value: "{{.Values.debug}}" | ||
- name: SERVER_ADDRESS | ||
value: "{{.Values.server.address}}" | ||
- name: TLS_ENABLED | ||
value: "{{.Values.server.tls.enabled}}" | ||
- name: TLS_INSECURE_SKIP_VERIFY | ||
value: "{{.Values.server.tls.insecureSkipVerify}}" | ||
- name: TLS_CA_CERT | ||
value: "{{.Values.server.tls.ca}}" | ||
- name: ID | ||
value: "{{.Values.agent.id}}" | ||
- name: TAG | ||
value: "{{range $key, $value := .Values.agent.tags}}{{$key}}={{$value}} {{end}}" | ||
- name: AUTHENTICATION_MODE | ||
value: "{{ .Values.agent.authentication.mode }}" | ||
{{- if eq .Values.agent.authentication.mode "token" }} | ||
- name: AUTHENTICATION_TOKEN | ||
value: "{{ .Values.agent.authentication.token }}" | ||
{{- end }} | ||
{{- if eq .Values.agent.authentication.mode "bearer" }} | ||
- name: AUTHENTICATION_ISSUER | ||
value: "{{ .Values.agent.authentication.issuer }}" | ||
- name: AUTHENTICATION_CLIENT_ID | ||
value: "{{ .Values.agent.authentication.clientID }}" | ||
- name: AUTHENTICATION_CLIENT_SECRET | ||
value: "{{ .Values.agent.authentication.clientSecret }}" | ||
{{- end }} | ||
- name: BASE_URL | ||
value: "{{ .Values.agent.baseUrl }}" | ||
- name: PRODUCTION | ||
value: "{{ .Values.agent.production }}" | ||
{{- include "agent.monitoring.logs" . | nindent 12 }} | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
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,8 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} |
Oops, something went wrong.