archsight 0.2.2 → 0.2.3
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/chart/archsight/Chart.yaml +2 -2
- data/chart/archsight/templates/deployment.yaml +11 -0
- data/chart/archsight/templates/restart-secret.yaml +11 -0
- data/chart/archsight/values.yaml +14 -0
- data/docs/kubernetes.md +13 -10
- data/lib/archsight/cli.rb +5 -2
- data/lib/archsight/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e034f34ed93ea73f50f64d3711b71b7ee9a76d82394b6f5994b9a09f1cc4283
|
|
4
|
+
data.tar.gz: bccbff115bd3dfd32e20a636774d718e56ce055d9e49d8b7f2b5beb52231cb47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2653347eb3682c1ce0b92ce09e6fe7cf9897a3b801d037c590545e2f7834a936316f64cdd79acdf7e96437f9c9221b10854b030f929c5727517a6031b2b9108a
|
|
7
|
+
data.tar.gz: fabb6af091e2df63674c4933054270280cea3a7b192675c0cf0dea83d695d042e3e53436373541135253533e806150437febc162a2a2e3f8e3320f409fc6d316
|
data/chart/archsight/Chart.yaml
CHANGED
|
@@ -44,6 +44,17 @@ spec:
|
|
|
44
44
|
value: {{ .Values.app.resourcesDir | quote }}
|
|
45
45
|
- name: APP_ENV
|
|
46
46
|
value: {{ .Values.app.env | quote }}
|
|
47
|
+
{{- if .Values.restart.enabled }}
|
|
48
|
+
- name: ARCHSIGHT_RESTART_ENABLED
|
|
49
|
+
value: "true"
|
|
50
|
+
{{- if or .Values.restart.token .Values.restart.existingSecret }}
|
|
51
|
+
- name: ARCHSIGHT_RESTART_TOKEN
|
|
52
|
+
valueFrom:
|
|
53
|
+
secretKeyRef:
|
|
54
|
+
name: {{ .Values.restart.existingSecret | default (printf "%s-restart-token" (include "archsight.fullname" .)) }}
|
|
55
|
+
key: {{ .Values.restart.secretKey | default "restart-token" }}
|
|
56
|
+
{{- end }}
|
|
57
|
+
{{- end }}
|
|
47
58
|
{{- if .Values.args }}
|
|
48
59
|
args:
|
|
49
60
|
{{- toYaml .Values.args | nindent 12 }}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{{- if and .Values.restart.enabled .Values.restart.token (not .Values.restart.existingSecret) }}
|
|
2
|
+
apiVersion: v1
|
|
3
|
+
kind: Secret
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{ include "archsight.fullname" . }}-restart-token
|
|
6
|
+
labels:
|
|
7
|
+
{{- include "archsight.labels" . | nindent 4 }}
|
|
8
|
+
type: Opaque
|
|
9
|
+
data:
|
|
10
|
+
{{ default "restart-token" .Values.restart.secretKey }}: {{ .Values.restart.token | b64enc | quote }}
|
|
11
|
+
{{- end }}
|
data/chart/archsight/values.yaml
CHANGED
|
@@ -79,6 +79,20 @@ app:
|
|
|
79
79
|
resourcesDir: /resources
|
|
80
80
|
env: production
|
|
81
81
|
|
|
82
|
+
# Restart endpoint configuration
|
|
83
|
+
# Enables POST /maintenance/restart to trigger a rolling restart (useful with imagePullPolicy: Always)
|
|
84
|
+
restart:
|
|
85
|
+
enabled: false
|
|
86
|
+
# Plain-text token value. A Kubernetes Secret will be created automatically.
|
|
87
|
+
# If set, the app requires this value in the X-Restart-Token header.
|
|
88
|
+
# If neither token nor existingSecret is set, the restart endpoint is enabled without token protection.
|
|
89
|
+
token: ""
|
|
90
|
+
# Use an existing Secret instead of creating one. The Secret must contain the token.
|
|
91
|
+
# If set, the app requires the referenced Secret value in the X-Restart-Token header.
|
|
92
|
+
existingSecret: ""
|
|
93
|
+
# Key inside the Secret that holds the token (default: "restart-token")
|
|
94
|
+
secretKey: "restart-token"
|
|
95
|
+
|
|
82
96
|
# Strategy for populating the /resources directory
|
|
83
97
|
# Options are "emptyDir", "configMap", "persistence" (PVC), or usage of "extraVolumes"
|
|
84
98
|
content:
|
data/docs/kubernetes.md
CHANGED
|
@@ -157,16 +157,19 @@ For simple deployments where you want to trigger a pod restart (and image re-pul
|
|
|
157
157
|
image:
|
|
158
158
|
pullPolicy: Always # Pull a fresh image on every pod restart
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
restart:
|
|
161
|
+
enabled: true
|
|
162
|
+
token: "your-secret-token" # Stored as a Kubernetes Secret automatically
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The chart creates a `Secret` containing the token and injects it as `ARCHSIGHT_RESTART_TOKEN`
|
|
166
|
+
into the container. To use a pre-existing Secret instead:
|
|
167
|
+
|
|
168
|
+
```yaml
|
|
169
|
+
restart:
|
|
170
|
+
enabled: true
|
|
171
|
+
existingSecret: "my-restart-secret"
|
|
172
|
+
secretKey: "restart-token" # key inside the Secret (default)
|
|
170
173
|
```
|
|
171
174
|
|
|
172
175
|
**Trigger a restart:**
|
data/lib/archsight/cli.rb
CHANGED
|
@@ -32,8 +32,11 @@ module Archsight
|
|
|
32
32
|
Archsight::Web::Application.configure_environment!(env, logging: options[:enable_logging])
|
|
33
33
|
Archsight::Web::Application.set :reload_enabled, !options[:disable_reload]
|
|
34
34
|
Archsight::Web::Application.set :inline_edit_enabled, options[:inline_edit]
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
|
|
36
|
+
restart_enabled = options[:enable_restart] || ENV["ARCHSIGHT_RESTART_ENABLED"] == "true"
|
|
37
|
+
restart_token = options[:restart_token] || ENV.fetch("ARCHSIGHT_RESTART_TOKEN", nil)
|
|
38
|
+
Archsight::Web::Application.set :restart_enabled, restart_enabled
|
|
39
|
+
Archsight::Web::Application.set :restart_token, restart_token
|
|
37
40
|
Archsight::Web::Application.setup_mcp!
|
|
38
41
|
Archsight::Web::Application.run!(port: options[:port], bind: options[:host])
|
|
39
42
|
rescue Archsight::ResourceError => e
|
data/lib/archsight/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: archsight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vincent Landgraf
|
|
@@ -215,6 +215,7 @@ files:
|
|
|
215
215
|
- chart/archsight/templates/ingress.yaml
|
|
216
216
|
- chart/archsight/templates/resources-configmap.yaml
|
|
217
217
|
- chart/archsight/templates/resources-pvc.yaml
|
|
218
|
+
- chart/archsight/templates/restart-secret.yaml
|
|
218
219
|
- chart/archsight/templates/service.yaml
|
|
219
220
|
- chart/archsight/templates/serviceaccount.yaml
|
|
220
221
|
- chart/archsight/values.yaml
|