Public Information

This commit is contained in:
2025-01-24 16:18:47 +01:00
commit 0bd2038c86
449 changed files with 108655 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
apiVersion: v2
name: nplus-instance-argo
description: nplus Instance ArgoCD Edition, supporting the deployment of npus Instances through ArgoCD
icon: data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNTEuMDI0IDUxLjAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNTEuMDI0IDUxLjAyNCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBvbHlnb24gZmlsbD0iI0E0QkZFNCIgcG9pbnRzPSIzMi4zMjIsMTkuNzQ0IDIwLjY0OSwxOS43NDQgMTguNTkxLDMxLjQxNyAzMC4yNjQsMzEuNDE3IAkiLz4KCTxwb2x5Z29uIGZpbGw9IiNBNEJGRTQiIHBvaW50cz0iNDcuMTg1LDE5Ljc0NCAzNS41MTIsMTkuNzQ0IDMzLjQ1NCwzMS40MTcgNDUuMTI2LDMxLjQxNyAJIi8+Cgk8cG9seWdvbiBmaWxsPSIjQTRCRkU0IiBwb2ludHM9IjI5Ljc2NiwzNC41NTEgMTguMDk0LDM0LjU1MSAxNi4wMzUsNDYuMjI0IDI3LjcwOCw0Ni4yMjQgCSIvPgoJPHBvbHlnb24gZmlsbD0iI0E0QkZFNCIgcG9pbnRzPSIxNy41NywxOS43NDQgNS44OTcsMTkuNzQ0IDMuODM5LDMxLjQxNyAxNS41MTIsMzEuNDE3IAkiLz4KCTxwb2x5Z29uIGZpbGw9IiNBNEJGRTQiIHBvaW50cz0iMzUuMTUsNC43OTkgMjMuNDc3LDQuNzk5IDIxLjQxOSwxNi40NzIgMzMuMDkyLDE2LjQ3MiAJIi8+Cjwvc3ZnPgo=
type: application
home: "https://git.nplus.cloud"
maintainers:
- email: a.ahmann@4i.org
name: Andreas Ahmann
url: "https://www.nplus.cloud"
dependencies:
- name: nplus-globals
alias: globals
version: "*-0"
repository: "file://../globals"
version: 1.0.0

View File

@@ -0,0 +1,93 @@
# nplus-instance-argo
nplus Instance ArgoCD Edition, supporting the deployment of npus Instances through ArgoCD
## nplus-instance-argo Chart Configuration
You can customize / configure nplus-instance-argo by setting configuration values on the command line or in values files,
that you can pass to helm. Please see the samples directory for details.
In case there is no value set, the key will not be used in the manifest, resulting in values taken from the config files of the component.
### Template Functions
You can use template functions in the values files. If you do so, make sure you quote correctly (single quotes, if you have double quotes in the template,
or escaped quotes).
### Global Values
All values can be set per component, per instance or globally per environment.
Example: `global.ingress.domain` sets the domain on instance level. You can still set a different domain on a component, such as administrator.
In that case, simply set `ingress.domain` for the administrator chart and that setting will have priority:
- Prio 1 - Component Level: `ingress.domain`
- Prio 2 - Instance Level: `global.ingress.domain`
- Prio 3 - Environment Level: `global.environment.ingress.domain`
### Using Values in Templates
As it would be a lot of typing to write `.Values.ingress.domain | default .Values.global.ingress.domain | default .Values.global.environment.ingress.domain`in your
template code, this is automatically done by nplus. You can simply type `.this.ingress.domain` and you will get a condensed and defaulted version
of your Values.
So an example in your `values.yaml` would be:
```
administrator:
waitFor:
- '-service {{ .component.prefix }}nappljobs.{{ .Release.Namespace }}.svc.cluster.local:\{{ .this.nappl.port }} -timeout 600'
```
This example shows `.this.nappl.port` which might come from a component, instance or global setting. You do not need to care.
The `.Release.Namespace` is set by helm. You have access to all Release and Chart Metadata, just like in your chart code.
The `.component.prefix` is calculated by nplus and gives you some handy shortcuts to internal variables:
- `.component.chartName`
The name of the chart as in `.Chart.Name`, but with override by `.Values.nameOverride`
- `.component.shortChartName`
A shorter Version of the name - `nappl` instead of `nplus-component-nappl`
- `.component.prefix`
The instance Prefix used to name the resources including `-`. This prefix is dropped, if the
`.Release.Name` equals `.Release.Namespace` for those of you that only
run one nplus Instance per namespace
- `.component.name`
The name of the component, including `.Values.nameOverride` and some logic
- `.component.fullName`
The fullName inlcuding `.Values.fullnameOverride` and some logic
- `.component.chart`
Mainly the `Chart.Name` and `Chart.Version`
- `.component.storagePath`
The path where the component config is stored in the conf PVC
- `.component.handler`
The handler (either helm, argoCD or manual)
- `.instance.name`
The name of the instance, but with override by `.Values.instanceOverride`
- `.instance.group`
The group, this instance belongs to. Override by `.Values.groupOverride`
- `.instance.version`
The *nscale* version (mostly taken from Application Layer), this instance is deploying.
- `.environment.name`
The name of the environment, but with override by `.Values.environmentNameOverride`
### Keys
You can set any of the following values for this component:
| Key | Description | Default |
|-----|-------------|---------|
**argocd**​.chart | The name of the chart to use for the instance | `"nplus-instance"` |
**argocd**​.destinationNamespace | ArgoCD can deploy to any Namespace on the destination Server. You have to specify it. Default is the release namespace | `"{{ .Release.Namespace }}"` |
**argocd**​.destinationServer | ArgoCD can also remote deploy Applications to alien clusters. The server specifies the API Endpoint of the Cluster, where the Application should be deployed | `"https://kubernetes.default.svc"` |
**argocd**​.namespace | The ArgoCD Namespace within the cluster. The ArgoCD Application will be deployed to this namespace You will need write privileges for this namespace | `"argocd"` |
**argocd**​.project | ArgoCD organizes Applications in Projects. This is the name of the project, the application should be deployed to | `"default"` |
**argocd**​.prune | Toggle pruning for this Application | `true` |
**argocd**​.repo | Specifiy the helm repo, from which ArgoCD should load the chart. Please make sure ArgoCD gets access rights to this repo | `"https://git.nplus.cloud"` |
**argocd**​.selfHeal | Toggle self healing feature for this Application | `true` |
**global**&#8203;.meta&#8203;.isArgo | specifies that this is an Argo Installation. Used to determine the correct handler in the chart <br>Do not change | **info only**, do not change<br> `true` |

View File

@@ -0,0 +1,41 @@
{{- include "nplus.initOnly" $ -}}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ .Release.Name }}
namespace: {{ (.this.argocd).namespace }}
labels:
# Common Kubernetes Lables are not allowed here for ArgoCD Application Manifests,
# as ArgoCD then tries to immediately delete the synced Application
# so we just use minimal Labels, which are the selectorLabels
{{- include "nplus.selectorLabels" . | nindent 4 }}
finalizers:
# The default behaviour is foreground cascading deletion
# - resources-finalizer.argocd.argoproj.io
# Alternatively, you can use background cascading deletion
- resources-finalizer.argocd.argoproj.io/background
spec:
{{- if or (.this.argocd).selfHeal (.this.argocd).prune }}
syncPolicy:
automated:
{{- if (.this.argocd).selfHeal }}
selfHeal: {{ (.this.argocd).selfHeal }}
{{- end }}
{{- if (.this.argocd).prune }}
prune: {{ (.this.argocd).prune }}
{{- end }}
{{- end }}
{{- if (.this.argocd).project }}
project: {{ (.this.argocd).project }}
{{- end }}
source:
chart: {{ required "you must set the name of the chart to use" (.this.argocd).chart }}
targetRevision: "{{ .Chart.Version }}"
repoURL: {{ required "you must set the repo url to your charts repo" (.this.argocd).repo | quote }}
helm:
releaseName: {{ .Release.Name }}
values: |
{{- toYaml (omit .Values "globals" "argocd") | nindent 8 }}
destination:
server: {{ tpl (required "you must set the name of the destination server" ((.this.argocd).destinationServer | default (.this.argocd).server)) . | quote }}
namespace: {{ tpl (required "you must set the name of the destination namespace" (.this.argocd).destinationNamespace) . | quote }}

View File

@@ -0,0 +1,85 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"argocd": {
"additionalProperties": false,
"properties": {
"chart": {
"default": "nplus-instance",
"description": "The name of the chart to use for the instance",
"title": "chart"
},
"destinationNamespace": {
"default": "{{ .Release.Namespace }}",
"description": "ArgoCD can deploy to any Namespace on the destination Server. You have to specify it. Default is the release namespace",
"title": "destinationNamespace"
},
"destinationServer": {
"default": "https://kubernetes.default.svc",
"description": "ArgoCD can also remote deploy Applications to alien clusters. The server specifies the API Endpoint of the Cluster, where the Application should be deployed",
"title": "destinationServer"
},
"namespace": {
"default": "argocd",
"description": "The ArgoCD Namespace within the cluster. The ArgoCD Application will be deployed to this namespace You will need write privileges for this namespace",
"title": "namespace"
},
"project": {
"default": "default",
"description": "ArgoCD organizes Applications in Projects. This is the name of the project, the application should be deployed to",
"title": "project"
},
"prune": {
"default": "true",
"description": "Toggle pruning for this Application",
"title": "prune"
},
"repo": {
"default": "https://git.nplus.cloud",
"description": "Specifiy the helm repo, from which ArgoCD should load the chart. Please make sure ArgoCD gets access rights to this repo",
"title": "repo"
},
"selfHeal": {
"default": "true",
"description": "Toggle self healing feature for this Application",
"title": "selfHeal"
}
},
"title": "argocd",
"type": "object"
},
"global": {
"additionalProperties": false,
"properties": {
"meta": {
"additionalProperties": false,
"properties": {
"isArgo": {
"default": "true",
"description": "specifies that this is an Argo Installation. Used to determine the correct handler in the chart @internal -- Do not change",
"title": "isArgo"
}
},
"title": "meta",
"type": "object"
}
},
"title": "global",
"type": "object"
},
"globals": {
"description": "nplus Global Functions Library Chart",
"properties": {
"global": {
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
"title": "global",
"type": "object"
}
},
"title": "nplus-globals",
"type": "object"
}
},
"type": "object"
}

View File

@@ -0,0 +1,26 @@
# yaml-language-server: $schema=values.schema.json
argocd:
# -- The name of the chart to use for the instance
chart: nplus-instance
# -- The ArgoCD Namespace within the cluster. The ArgoCD Application will be deployed to this namespace
# You will need write privileges for this namespace
namespace: argocd
# -- ArgoCD organizes Applications in Projects. This is the name of the project, the application should be deployed to
project: default
# -- ArgoCD can also remote deploy Applications to alien clusters. The server specifies the API Endpoint of the Cluster, where
# the Application should be deployed
destinationServer: "https://kubernetes.default.svc"
# -- ArgoCD can deploy to any Namespace on the destination Server. You have to specify it.
# Default is the release namespace
destinationNamespace: "{{ .Release.Namespace }}"
# -- Toggle self healing feature for this Application
selfHeal: true
# -- Toggle pruning for this Application
prune: true
# -- Specifiy the helm repo, from which ArgoCD should load the chart. Please make sure ArgoCD gets access rights to this repo
repo: "https://git.nplus.cloud"
global:
meta:
# -- specifies that this is an Argo Installation. Used to determine the correct handler in the chart
# @internal -- Do not change
isArgo: true