archsight 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +33 -0
- data/chart/archsight/Chart.yaml +6 -0
- data/chart/archsight/README.md +160 -0
- data/chart/archsight/templates/NOTES.txt +22 -0
- data/chart/archsight/templates/_helpers.tpl +62 -0
- data/chart/archsight/templates/deployment.yaml +114 -0
- data/chart/archsight/templates/ingress.yaml +56 -0
- data/chart/archsight/templates/resources-configmap.yaml +10 -0
- data/chart/archsight/templates/resources-pvc.yaml +23 -0
- data/chart/archsight/templates/service.yaml +15 -0
- data/chart/archsight/templates/serviceaccount.yaml +12 -0
- data/chart/archsight/values.yaml +162 -0
- data/lib/archsight/analysis/executor.rb +0 -10
- data/lib/archsight/annotations/annotation.rb +85 -36
- data/lib/archsight/annotations/architecture_annotations.rb +1 -34
- data/lib/archsight/annotations/computed.rb +1 -1
- data/lib/archsight/annotations/generated_annotations.rb +6 -3
- data/lib/archsight/annotations/git_annotations.rb +8 -4
- data/lib/archsight/annotations/interface_annotations.rb +35 -0
- data/lib/archsight/cli.rb +3 -1
- data/lib/archsight/editor/content_hasher.rb +37 -0
- data/lib/archsight/editor/file_writer.rb +79 -0
- data/lib/archsight/editor.rb +237 -0
- data/lib/archsight/import/handlers/github.rb +14 -6
- data/lib/archsight/import/handlers/gitlab.rb +14 -6
- data/lib/archsight/import/handlers/repository.rb +3 -1
- data/lib/archsight/import/team_matcher.rb +111 -61
- data/lib/archsight/mcp/execute_analysis_tool.rb +100 -0
- data/lib/archsight/mcp.rb +1 -0
- data/lib/archsight/resources/analysis.rb +1 -17
- data/lib/archsight/resources/application_interface.rb +1 -5
- data/lib/archsight/resources/base.rb +14 -14
- data/lib/archsight/resources/business_actor.rb +1 -1
- data/lib/archsight/resources/technology_interface.rb +1 -1
- data/lib/archsight/resources/technology_service.rb +5 -0
- data/lib/archsight/version.rb +1 -1
- data/lib/archsight/web/application.rb +8 -0
- data/lib/archsight/web/doc/import.md +10 -2
- data/lib/archsight/web/editor/form_builder.rb +100 -0
- data/lib/archsight/web/editor/routes.rb +293 -0
- data/lib/archsight/web/public/css/editor.css +863 -0
- data/lib/archsight/web/public/css/instance.css +6 -0
- data/lib/archsight/web/public/js/editor.js +421 -0
- data/lib/archsight/web/public/js/lexical-editor.js +308 -0
- data/lib/archsight/web/views/partials/editor/_field.haml +80 -0
- data/lib/archsight/web/views/partials/editor/_form.haml +131 -0
- data/lib/archsight/web/views/partials/editor/_relations.haml +39 -0
- data/lib/archsight/web/views/partials/editor/_yaml_output.haml +33 -0
- data/lib/archsight/web/views/partials/instance/_analysis_detail.haml +4 -11
- data/lib/archsight/web/views/partials/instance/_detail.haml +4 -0
- data/lib/archsight/web/views/partials/layout/_content.haml +8 -2
- data/lib/archsight/web/views/partials/layout/_head.haml +2 -0
- metadata +26 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37f0d691fd1bdc0ce5b3a250c6bf0dc269b2586682ab1c46c25546cfa8d9c251
|
|
4
|
+
data.tar.gz: 56069d4dbdc04607c00c51af729433f63792ffbca81e79d785d5a0d1cfe75b25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e1bc599625fc4ed0d7b16a9a9fd61d420faa4e58186e4ff6ebd6a15ca2ff05e44c1fa88164d45f45acfcd01d09d676d09bd90b57b31fcba30961d823212089e
|
|
7
|
+
data.tar.gz: 820b19c2650828976882d746fffa9674ebd7da9c418dcb663096c3cfdaf366aeecd4cb11fcd241b14c400f5d80adf21243774b45de6c6a6137736e832591dda0
|
data/README.md
CHANGED
|
@@ -21,6 +21,12 @@ Or install directly:
|
|
|
21
21
|
gem install archsight
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
### Option 2: Helm (Kubernetes)
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
helm install archsight oci://ghcr.io/ionos-cloud/archsight/charts/archsight
|
|
28
|
+
```
|
|
29
|
+
|
|
24
30
|
## Quick Start
|
|
25
31
|
|
|
26
32
|
### Option 1: CLI
|
|
@@ -129,6 +135,33 @@ claude mcp add --transport sse ionos-architecture http://localhost:4567/mcp/sse
|
|
|
129
135
|
- Dark mode support
|
|
130
136
|
- Layer-based color scheme (Business, Application, Technology, Data)
|
|
131
137
|
|
|
138
|
+
### Resource Editor
|
|
139
|
+
|
|
140
|
+
Create and edit resources through the web interface:
|
|
141
|
+
|
|
142
|
+
**Edit existing resource:**
|
|
143
|
+
|
|
144
|
+
- Navigate to any resource detail page
|
|
145
|
+
- Click the "Edit" button (only available for non-generated resources)
|
|
146
|
+
- Modify annotations and relations
|
|
147
|
+
- Generate YAML and copy to clipboard
|
|
148
|
+
|
|
149
|
+
**Create new resource:**
|
|
150
|
+
|
|
151
|
+
- Go to any kind listing (e.g., /kinds/ApplicationComponent)
|
|
152
|
+
- Click "New" button
|
|
153
|
+
- Fill in required fields
|
|
154
|
+
- Add relations using cascading dropdowns
|
|
155
|
+
- Generate YAML and copy to clipboard
|
|
156
|
+
|
|
157
|
+
The editor supports:
|
|
158
|
+
|
|
159
|
+
- Type-aware form fields (dropdowns for enums, number inputs, URL validation)
|
|
160
|
+
- Markdown textarea for descriptions
|
|
161
|
+
- Relation management with cascading dropdowns
|
|
162
|
+
- Validation before YAML generation
|
|
163
|
+
- One-click copy to clipboard
|
|
164
|
+
|
|
132
165
|
### Validation
|
|
133
166
|
|
|
134
167
|
Validate YAML syntax and verify all relationship references:
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Archsight Helm Chart
|
|
2
|
+
|
|
3
|
+
A Helm chart for deploying [Archsight](https://github.com/ionos-cloud/archsight) on Kubernetes.
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
This chart bootstraps an Archsight deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. It is designed to be flexible in how you provide the architecture "resources" (YAML files) to the application.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- Kubernetes 1.19+
|
|
12
|
+
- Helm 3.2.0+
|
|
13
|
+
|
|
14
|
+
## Installing the Chart
|
|
15
|
+
|
|
16
|
+
### From OCI Registry (Recommended)
|
|
17
|
+
|
|
18
|
+
To install the chart from the GitHub Container Registry:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
helm install my-archsight oci://ghcr.io/ionos-cloud/archsight/charts/archsight
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### From Local Source
|
|
25
|
+
|
|
26
|
+
To install the chart with the release name `my-archsight` from local source:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
helm install my-archsight ./chart/archsight
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
The following table lists the configurable parameters of the Archsight chart and their default values.
|
|
35
|
+
|
|
36
|
+
| Parameter | Description | Default |
|
|
37
|
+
|-----------|-------------|---------|
|
|
38
|
+
| `image.repository` | Docker image repository | `archsight` |
|
|
39
|
+
| `image.tag` | Docker image tag | `""` (uses appVersion) |
|
|
40
|
+
| `service.type` | Kubernetes Service type | `ClusterIP` |
|
|
41
|
+
| `service.port` | Service port | `80` |
|
|
42
|
+
| `ingress.enabled` | Enable Ingress resource | `false` |
|
|
43
|
+
| `app.resourcesDir` | Directory where app looks for resources | `/resources` |
|
|
44
|
+
|
|
45
|
+
### Resource Management Strategies
|
|
46
|
+
|
|
47
|
+
The most important configuration is how you provide your architecture YAML files to the application. This is controlled by the `content.type` parameter.
|
|
48
|
+
|
|
49
|
+
#### 1. ConfigMap (Simple / Static)
|
|
50
|
+
Best for small deployments where the architecture definitions rarely change or are small enough to fit in a ConfigMap (1MB limit).
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
content:
|
|
54
|
+
type: configMap
|
|
55
|
+
configMap:
|
|
56
|
+
create: true
|
|
57
|
+
data:
|
|
58
|
+
analysis.yaml: |
|
|
59
|
+
apiVersion: architecture/v1alpha1
|
|
60
|
+
kind: Analysis
|
|
61
|
+
metadata:
|
|
62
|
+
name: MyAnalysis
|
|
63
|
+
# ... content ...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### 2. Persistence (Manual Management)
|
|
67
|
+
Mounts a Persistent Volume. You are responsible for putting files into this volume (e.g., manually copying them or having another process write to it).
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
content:
|
|
71
|
+
type: persistence
|
|
72
|
+
persistence:
|
|
73
|
+
enabled: true
|
|
74
|
+
size: 1Gi
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### 3. EmptyDir + Git Sync (GitOps / Recommended)
|
|
78
|
+
Uses an `emptyDir` volume that is shared between the main container and init containers. This allows you to fetch your architecture definitions from a Git repository at startup.
|
|
79
|
+
|
|
80
|
+
**Example values.yaml configuration (Public Repo):**
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
content:
|
|
84
|
+
type: emptyDir
|
|
85
|
+
|
|
86
|
+
initContainers:
|
|
87
|
+
- name: git-sync
|
|
88
|
+
image: alpine/git
|
|
89
|
+
# Clone your architecture repo into /resources
|
|
90
|
+
args: ["clone", "--depth", "1", "https://github.com/my-org/my-architecture.git", "/resources"]
|
|
91
|
+
volumeMounts:
|
|
92
|
+
- name: resources
|
|
93
|
+
mountPath: /resources
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Example values.yaml configuration (Private Repo):**
|
|
97
|
+
|
|
98
|
+
To use a private repository, create a Kubernetes Secret containing your git token (e.g., `git-credentials` with key `token`) and reference it:
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
content:
|
|
102
|
+
type: emptyDir
|
|
103
|
+
|
|
104
|
+
initContainers:
|
|
105
|
+
- name: git-sync
|
|
106
|
+
image: alpine/git
|
|
107
|
+
env:
|
|
108
|
+
- name: GIT_TOKEN
|
|
109
|
+
valueFrom:
|
|
110
|
+
secretKeyRef:
|
|
111
|
+
name: git-credentials
|
|
112
|
+
key: token
|
|
113
|
+
command: ["/bin/sh", "-c"]
|
|
114
|
+
# Use the env var in the URL so the token is not exposed in the pod spec
|
|
115
|
+
args:
|
|
116
|
+
- "git clone https://oauth2:$GIT_TOKEN@github.com/my-org/my-private-repo.git /resources"
|
|
117
|
+
volumeMounts:
|
|
118
|
+
- name: resources
|
|
119
|
+
mountPath: /resources
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Sidecars (Auto-Refresh)
|
|
124
|
+
|
|
125
|
+
If you want your application to update dynamically when the git repository changes (without restarting the pod), you can add a sidecar container that periodically pulls changes.
|
|
126
|
+
|
|
127
|
+
**Example (Private Repo with 60s Refresh Loop):**
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
sidecars:
|
|
131
|
+
- name: git-refresher
|
|
132
|
+
image: alpine/git
|
|
133
|
+
env:
|
|
134
|
+
- name: GIT_TOKEN
|
|
135
|
+
valueFrom:
|
|
136
|
+
secretKeyRef:
|
|
137
|
+
name: git-credentials
|
|
138
|
+
key: token
|
|
139
|
+
command: ["/bin/sh", "-c"]
|
|
140
|
+
args:
|
|
141
|
+
- |
|
|
142
|
+
cd /resources
|
|
143
|
+
# Set the remote URL with the token to ensure authentication
|
|
144
|
+
git remote set-url origin "https://oauth2:${GIT_TOKEN}@github.com/my-org/my-private-repo.git"
|
|
145
|
+
while true; do
|
|
146
|
+
git pull
|
|
147
|
+
sleep 60
|
|
148
|
+
done
|
|
149
|
+
volumeMounts:
|
|
150
|
+
- name: resources
|
|
151
|
+
mountPath: /resources
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Uninstalling the Chart
|
|
155
|
+
|
|
156
|
+
To uninstall/delete the `my-archsight` deployment:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
helm delete my-archsight
|
|
160
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
1. Get the application URL by running these commands:
|
|
2
|
+
{{- if .Values.ingress.enabled }}
|
|
3
|
+
{{- range $host := .Values.ingress.hosts }}
|
|
4
|
+
{{- range .paths }}
|
|
5
|
+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
|
6
|
+
{{- end }}
|
|
7
|
+
{{- end }}
|
|
8
|
+
{{- else if contains "NodePort" .Values.service.type }}
|
|
9
|
+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "archsight.fullname" . }})
|
|
10
|
+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
|
11
|
+
echo http://$NODE_IP:$NODE_PORT
|
|
12
|
+
{{- else if contains "LoadBalancer" .Values.service.type }}
|
|
13
|
+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
|
14
|
+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "archsight.fullname" . }}'
|
|
15
|
+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "archsight.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
|
16
|
+
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
|
17
|
+
{{- else if contains "ClusterIP" .Values.service.type }}
|
|
18
|
+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "archsight.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
|
19
|
+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
|
20
|
+
echo "Visit http://127.0.0.1:8080 to use your application"
|
|
21
|
+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
|
22
|
+
{{- end }}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Expand the name of the chart.
|
|
3
|
+
*/}}
|
|
4
|
+
{{- define "archsight.name" -}}
|
|
5
|
+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
6
|
+
{{- end }}
|
|
7
|
+
|
|
8
|
+
{{/*
|
|
9
|
+
Create a default fully qualified app name.
|
|
10
|
+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
11
|
+
If release name contains chart name it will be used as a full name.
|
|
12
|
+
*/}}
|
|
13
|
+
{{- define "archsight.fullname" -}}
|
|
14
|
+
{{- if .Values.fullnameOverride }}
|
|
15
|
+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
16
|
+
{{- else }}
|
|
17
|
+
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
18
|
+
{{- if contains $name .Release.Name }}
|
|
19
|
+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
|
20
|
+
{{- else }}
|
|
21
|
+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
22
|
+
{{- end }}
|
|
23
|
+
{{- end }}
|
|
24
|
+
{{- end }}
|
|
25
|
+
|
|
26
|
+
{{/*
|
|
27
|
+
Create chart name and version as used by the chart label.
|
|
28
|
+
*/}}
|
|
29
|
+
{{- define "archsight.chart" -}}
|
|
30
|
+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
31
|
+
{{- end }}
|
|
32
|
+
|
|
33
|
+
{{/*
|
|
34
|
+
Common labels
|
|
35
|
+
*/}}
|
|
36
|
+
{{- define "archsight.labels" -}}
|
|
37
|
+
helm.sh/chart: {{ include "archsight.chart" . }}
|
|
38
|
+
{{ include "archsight.selectorLabels" . }}
|
|
39
|
+
{{- if .Chart.AppVersion }}
|
|
40
|
+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
41
|
+
{{- end }}
|
|
42
|
+
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
43
|
+
{{- end }}
|
|
44
|
+
|
|
45
|
+
{{/*
|
|
46
|
+
Selector labels
|
|
47
|
+
*/}}
|
|
48
|
+
{{- define "archsight.selectorLabels" -}}
|
|
49
|
+
app.kubernetes.io/name: {{ include "archsight.name" . }}
|
|
50
|
+
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
51
|
+
{{- end }}
|
|
52
|
+
|
|
53
|
+
{{/*
|
|
54
|
+
Create the name of the service account to use
|
|
55
|
+
*/}}
|
|
56
|
+
{{- define "archsight.serviceAccountName" -}}
|
|
57
|
+
{{- if .Values.serviceAccount.create }}
|
|
58
|
+
{{- default (include "archsight.fullname" .) .Values.serviceAccount.name }}
|
|
59
|
+
{{- else }}
|
|
60
|
+
{{- default "default" .Values.serviceAccount.name }}
|
|
61
|
+
{{- end }}
|
|
62
|
+
{{- end }}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "archsight.fullname" . }}
|
|
5
|
+
labels:
|
|
6
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
7
|
+
spec:
|
|
8
|
+
{{- if not .Values.autoscaling.enabled }}
|
|
9
|
+
replicas: {{ .Values.replicaCount }}
|
|
10
|
+
{{- end }}
|
|
11
|
+
selector:
|
|
12
|
+
matchLabels:
|
|
13
|
+
{{- include "archsight.selectorLabels" . | nindent 6 }}
|
|
14
|
+
template:
|
|
15
|
+
metadata:
|
|
16
|
+
{{- with .Values.podAnnotations }}
|
|
17
|
+
annotations:
|
|
18
|
+
{{- toYaml . | nindent 8 }}
|
|
19
|
+
{{- end }}
|
|
20
|
+
labels:
|
|
21
|
+
{{- include "archsight.selectorLabels" . | nindent 8 }}
|
|
22
|
+
spec:
|
|
23
|
+
{{- with .Values.imagePullSecrets }}
|
|
24
|
+
imagePullSecrets:
|
|
25
|
+
{{- toYaml . | nindent 8 }}
|
|
26
|
+
{{- end }}
|
|
27
|
+
serviceAccountName: {{ include "archsight.serviceAccountName" . }}
|
|
28
|
+
securityContext:
|
|
29
|
+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
30
|
+
|
|
31
|
+
{{- with .Values.initContainers }}
|
|
32
|
+
initContainers:
|
|
33
|
+
{{- toYaml . | nindent 8 }}
|
|
34
|
+
{{- end }}
|
|
35
|
+
|
|
36
|
+
containers:
|
|
37
|
+
- name: {{ .Chart.Name }}
|
|
38
|
+
securityContext:
|
|
39
|
+
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
40
|
+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
41
|
+
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
42
|
+
env:
|
|
43
|
+
- name: ARCHSIGHT_RESOURCES_DIR
|
|
44
|
+
value: {{ .Values.app.resourcesDir | quote }}
|
|
45
|
+
- name: APP_ENV
|
|
46
|
+
value: {{ .Values.app.env | quote }}
|
|
47
|
+
{{- if .Values.args }}
|
|
48
|
+
args:
|
|
49
|
+
{{- toYaml .Values.args | nindent 12 }}
|
|
50
|
+
{{- end }}
|
|
51
|
+
ports:
|
|
52
|
+
- name: http
|
|
53
|
+
containerPort: 4567
|
|
54
|
+
protocol: TCP
|
|
55
|
+
livenessProbe:
|
|
56
|
+
httpGet:
|
|
57
|
+
path: /
|
|
58
|
+
port: http
|
|
59
|
+
initialDelaySeconds: 5
|
|
60
|
+
periodSeconds: 30
|
|
61
|
+
timeoutSeconds: 3
|
|
62
|
+
failureThreshold: 3
|
|
63
|
+
readinessProbe:
|
|
64
|
+
httpGet:
|
|
65
|
+
path: /
|
|
66
|
+
port: http
|
|
67
|
+
initialDelaySeconds: 5
|
|
68
|
+
periodSeconds: 30
|
|
69
|
+
timeoutSeconds: 3
|
|
70
|
+
failureThreshold: 3
|
|
71
|
+
resources:
|
|
72
|
+
{{- toYaml .Values.resources | nindent 12 }}
|
|
73
|
+
volumeMounts:
|
|
74
|
+
{{- if ne .Values.content.type "custom" }}
|
|
75
|
+
- name: resources
|
|
76
|
+
mountPath: {{ .Values.app.resourcesDir }}
|
|
77
|
+
{{- end }}
|
|
78
|
+
{{- with .Values.extraVolumeMounts }}
|
|
79
|
+
{{- toYaml . | nindent 12 }}
|
|
80
|
+
{{- end }}
|
|
81
|
+
|
|
82
|
+
{{- with .Values.sidecars }}
|
|
83
|
+
{{- toYaml . | nindent 8 }}
|
|
84
|
+
{{- end }}
|
|
85
|
+
|
|
86
|
+
volumes:
|
|
87
|
+
{{- if eq .Values.content.type "emptyDir" }}
|
|
88
|
+
- name: resources
|
|
89
|
+
emptyDir: {}
|
|
90
|
+
{{- else if eq .Values.content.type "configMap" }}
|
|
91
|
+
- name: resources
|
|
92
|
+
configMap:
|
|
93
|
+
name: {{ default (printf "%s-resources" (include "archsight.fullname" .)) .Values.content.configMap.name }}
|
|
94
|
+
{{- else if eq .Values.content.type "persistence" }}
|
|
95
|
+
- name: resources
|
|
96
|
+
persistentVolumeClaim:
|
|
97
|
+
claimName: {{ default (printf "%s-resources" (include "archsight.fullname" .)) .Values.content.persistence.existingClaim }}
|
|
98
|
+
{{- end }}
|
|
99
|
+
{{- with .Values.extraVolumes }}
|
|
100
|
+
{{- toYaml . | nindent 8 }}
|
|
101
|
+
{{- end }}
|
|
102
|
+
|
|
103
|
+
{{- with .Values.nodeSelector }}
|
|
104
|
+
nodeSelector:
|
|
105
|
+
{{- toYaml . | nindent 8 }}
|
|
106
|
+
{{- end }}
|
|
107
|
+
{{- with .Values.affinity }}
|
|
108
|
+
affinity:
|
|
109
|
+
{{- toYaml . | nindent 8 }}
|
|
110
|
+
{{- end }}
|
|
111
|
+
{{- with .Values.tolerations }}
|
|
112
|
+
tolerations:
|
|
113
|
+
{{- toYaml . | nindent 8 }}
|
|
114
|
+
{{- end }}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{{- if .Values.ingress.enabled -}}
|
|
2
|
+
{{- $fullName := include "archsight.fullname" . -}}
|
|
3
|
+
{{- $svcPort := .Values.service.port -}}
|
|
4
|
+
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
5
|
+
apiVersion: networking.k8s.io/v1
|
|
6
|
+
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
7
|
+
apiVersion: networking.k8s.io/v1beta1
|
|
8
|
+
{{- else -}}
|
|
9
|
+
apiVersion: extensions/v1beta1
|
|
10
|
+
{{- end }}
|
|
11
|
+
kind: Ingress
|
|
12
|
+
metadata:
|
|
13
|
+
name: {{ $fullName }}
|
|
14
|
+
labels:
|
|
15
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
16
|
+
{{- with .Values.ingress.annotations }}
|
|
17
|
+
annotations:
|
|
18
|
+
{{- toYaml . | nindent 4 }}
|
|
19
|
+
{{- end }}
|
|
20
|
+
spec:
|
|
21
|
+
{{- if .Values.ingress.className }}
|
|
22
|
+
ingressClassName: {{ .Values.ingress.className }}
|
|
23
|
+
{{- end }}
|
|
24
|
+
{{- if .Values.ingress.tls }}
|
|
25
|
+
tls:
|
|
26
|
+
{{- range .Values.ingress.tls }}
|
|
27
|
+
- hosts:
|
|
28
|
+
{{- range .hosts }}
|
|
29
|
+
- {{ . | quote }}
|
|
30
|
+
{{- end }}
|
|
31
|
+
secretName: {{ .secretName }}
|
|
32
|
+
{{- end }}
|
|
33
|
+
{{- end }}
|
|
34
|
+
rules:
|
|
35
|
+
{{- range .Values.ingress.hosts }}
|
|
36
|
+
- host: {{ .host | quote }}
|
|
37
|
+
http:
|
|
38
|
+
paths:
|
|
39
|
+
{{- range .paths }}
|
|
40
|
+
- path: {{ .path }}
|
|
41
|
+
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
|
42
|
+
pathType: {{ .pathType }}
|
|
43
|
+
{{- end }}
|
|
44
|
+
backend:
|
|
45
|
+
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
|
46
|
+
service:
|
|
47
|
+
name: {{ $fullName }}
|
|
48
|
+
port:
|
|
49
|
+
number: {{ $svcPort }}
|
|
50
|
+
{{- else }}
|
|
51
|
+
serviceName: {{ $fullName }}
|
|
52
|
+
servicePort: {{ $svcPort }}
|
|
53
|
+
{{- end }}
|
|
54
|
+
{{- end }}
|
|
55
|
+
{{- end }}
|
|
56
|
+
{{- end }}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{{- if and (eq .Values.content.type "configMap") .Values.content.configMap.create }}
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: ConfigMap
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{ default (printf "%s-resources" (include "archsight.fullname" .)) .Values.content.configMap.name }}
|
|
6
|
+
labels:
|
|
7
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
8
|
+
data:
|
|
9
|
+
{{- toYaml .Values.content.configMap.data | nindent 2 }}
|
|
10
|
+
{{- end }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{{- if and (eq .Values.content.type "persistence") .Values.content.persistence.enabled (not .Values.content.persistence.existingClaim) }}
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: PersistentVolumeClaim
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{ printf "%s-resources" (include "archsight.fullname" .) }}
|
|
6
|
+
labels:
|
|
7
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
8
|
+
{{- with .Values.content.persistence.annotations }}
|
|
9
|
+
annotations:
|
|
10
|
+
{{- toYaml . | nindent 4 }}
|
|
11
|
+
{{- end }}
|
|
12
|
+
spec:
|
|
13
|
+
accessModes:
|
|
14
|
+
{{- range .Values.content.persistence.accessModes }}
|
|
15
|
+
- {{ . | quote }}
|
|
16
|
+
{{- end }}
|
|
17
|
+
resources:
|
|
18
|
+
requests:
|
|
19
|
+
storage: {{ .Values.content.persistence.size | quote }}
|
|
20
|
+
{{- if .Values.content.persistence.storageClass }}
|
|
21
|
+
storageClassName: {{ .Values.content.persistence.storageClass | quote }}
|
|
22
|
+
{{- end }}
|
|
23
|
+
{{- end }}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
apiVersion: v1
|
|
2
|
+
kind: Service
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ include "archsight.fullname" . }}
|
|
5
|
+
labels:
|
|
6
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
7
|
+
spec:
|
|
8
|
+
type: {{ .Values.service.type }}
|
|
9
|
+
ports:
|
|
10
|
+
- port: {{ .Values.service.port }}
|
|
11
|
+
targetPort: {{ .Values.service.targetPort }}
|
|
12
|
+
protocol: TCP
|
|
13
|
+
name: http
|
|
14
|
+
selector:
|
|
15
|
+
{{- include "archsight.selectorLabels" . | nindent 4 }}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{{- if .Values.serviceAccount.create -}}
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: ServiceAccount
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{ include "archsight.serviceAccountName" . }}
|
|
6
|
+
labels:
|
|
7
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
8
|
+
{{- with .Values.serviceAccount.annotations }}
|
|
9
|
+
annotations:
|
|
10
|
+
{{- toYaml . | nindent 4 }}
|
|
11
|
+
{{- end }}
|
|
12
|
+
{{- end }}
|