Skip to content

Commit 9512908

Browse files
authored
Merge pull request #2 from thedmeyer/main
2 parents 05f7bf8 + 6522da4 commit 9512908

File tree

5 files changed

+190
-7
lines changed

5 files changed

+190
-7
lines changed

charts/structurizr/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ keywords:
1111
sources:
1212
- https://structurizr.com/help/on-premises
1313

14-
version: 0.1.0
15-
appVersion: "3047"
14+
version: 0.2.0
15+
appVersion: "3142"

charts/structurizr/README.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# structurizr
22

3-
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 3047](https://img.shields.io/badge/AppVersion-3047-informational?style=flat-square)
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 3142](https://img.shields.io/badge/AppVersion-3142-informational?style=flat-square)
44

55
The Structurizr Helm chart deploys Structurizr On premise flavor. Structurizr is a web-based rendering tool designed to help software development teams create software architecture diagrams and documentation.
66

77
## Values
88

99
| Key | Type | Default | Description |
1010
|-----|------|---------|-------------|
11-
| affinity | object | `{}` | |
11+
| affinity | object | `{}` | Affinity settings for pod assignment. |
1212
| autoscaling.enabled | bool | `false` | |
1313
| autoscaling.maxReplicas | int | `100` | |
1414
| autoscaling.minReplicas | int | `1` | |
@@ -37,14 +37,57 @@ The Structurizr Helm chart deploys Structurizr On premise flavor. Structurizr is
3737
| serviceAccount.annotations | object | `{}` | |
3838
| serviceAccount.create | bool | `true` | |
3939
| serviceAccount.name | string | `""` | |
40-
| tolerations | list | `[]` | |
40+
| tolerations | list | `[]` | Tolerations for pod assignment. Useful for nodes with taints. |
41+
| volumes | list | `[]` | List of additional volumes to be added to the pods. |
42+
| volumeMounts | list | `[]` | Specifies where to mount the volumes in the pod. |
43+
| properties | string | (multi-line string) | Custom properties configuration for Structurizr. |
44+
| users | string | (multi-line string) | Specifies user credentials for Structurizr. |
45+
| roles | string | (multi-line string) | Specifies user roles for Structurizr. |
46+
| saml | string | (multi-line string) | SAML identity provider metadata configuration for Structurizr authentication. |
47+
| log4j2 | string | (multi-line string) | Configuration settings for the logging system using Log4j2. |
48+
| env | list | `[]` | List of environment variables to be set for the Structurizr pod. |
49+
50+
## Additional Configuration Details:
51+
52+
### `volumes` and `volumeMounts`:
53+
You can define additional volumes to attach to the pod and specify where they are mounted. For example:
54+
55+
```yaml
56+
volumes:
57+
- name: my-storage
58+
persistentVolumeClaim:
59+
claimName: my-pvc
60+
volumeMounts:
61+
- name: my-storage
62+
mountPath: /path/in/container
63+
```
64+
65+
### `properties`, `users`, `roles`, and `saml-idp-metadata`:
66+
These fields allow you to define multi-line strings for configurations. For instance, `properties` can be used to set Structurizr-specific configurations:
67+
68+
```yaml
69+
properties: |
70+
structurizr.redis.password=${REDIS_PASSWORD}
71+
structurizr.authentication=saml
72+
```
73+
Similar patterns can be used for `users`, `roles`, and `saml-idp-metadata` fields.
74+
75+
### `env`:
76+
You can specify additional environment variables for the Structurizr application. For instance:
77+
78+
```yaml
79+
env:
80+
- name: STRUCTURIZR_DATA_DIRECTORY
81+
value: "/usr/local/structurizr"
82+
```
83+
This can be useful to configure aspects of Structurizr using environment variables.
4184

4285
## TODO
4386

4487
- [ ] Encryption
4588
- [ ] Authentication
4689
- [ ] File
4790
- [ ] LDAP
48-
- [ ] SAML
91+
- [x] SAML
4992
- [ ] Redis sessions
50-
- [ ] Bucket data
93+
- [ ] Bucket data
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "structurizr.fullname" . }}-properties
6+
labels:
7+
{{- include "structurizr.labels" . | nindent 4 }}
8+
data:
9+
structurizr.properties: |
10+
{{ .Values.properties | indent 4 }}
11+
---
12+
apiVersion: v1
13+
kind: ConfigMap
14+
metadata:
15+
name: {{ include "structurizr.fullname" . }}-users
16+
labels:
17+
{{- include "structurizr.labels" . | nindent 4 }}
18+
data:
19+
structurizr.users: |
20+
{{ .Values.users | indent 4 }}
21+
---
22+
apiVersion: v1
23+
kind: ConfigMap
24+
metadata:
25+
name: {{ include "structurizr.fullname" . }}-roles
26+
labels:
27+
{{- include "structurizr.labels" . | nindent 4 }}
28+
data:
29+
structurizr.roles: |
30+
{{ .Values.roles | indent 4 }}
31+
---
32+
apiVersion: v1
33+
kind: ConfigMap
34+
metadata:
35+
name: {{ include "structurizr.fullname" . }}-saml-idp-metadata
36+
labels:
37+
{{- include "structurizr.labels" . | nindent 4 }}
38+
data:
39+
saml-idp-metadata.xml: |
40+
{{ .Values.saml | indent 4 }}
41+
---
42+
apiVersion: v1
43+
kind: ConfigMap
44+
metadata:
45+
name: {{ include "structurizr.fullname" . }}-log4j2
46+
labels:
47+
{{- include "structurizr.labels" . | nindent 4 }}
48+
data:
49+
log4j2.properties: |
50+
{{ .Values.log4j2 | indent 4 }}

charts/structurizr/templates/deployment.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ spec:
2929
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3030
containers:
3131
- name: {{ .Chart.Name }}
32+
{{- with .Values.env }}
33+
env:
34+
{{- toYaml . | nindent 12 }}
35+
{{- end }}
3236
securityContext:
3337
{{- toYaml .Values.securityContext | nindent 12 }}
3438
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -47,8 +51,46 @@ spec:
4751
path: /
4852
port: http
4953
initialDelaySeconds: 10
54+
volumeMounts:
55+
{{- with .Values.volumeMounts }}
56+
{{- toYaml . | nindent 12 }}
57+
{{- end }}
58+
- name: properties-volume
59+
mountPath: /usr/local/structurizr/structurizr.properties
60+
subPath: structurizr.properties
61+
- name: users-volume
62+
mountPath: /usr/local/structurizr/structurizr.users
63+
subPath: structurizr.users
64+
- name: roles-volume
65+
mountPath: /usr/local/structurizr/structurizr.roles
66+
subPath: structurizr.roles
67+
- name: saml-idp-metadata-volume
68+
mountPath: /usr/local/structurizr/saml-idp-metadata.xml
69+
subPath: saml-idp-metadata.xml
70+
- name: log4j2-volume
71+
mountPath: /usr/local/structurizr/log4j2.properties
72+
subPath: log4j2.properties
5073
resources:
5174
{{- toYaml .Values.resources | nindent 12 }}
75+
volumes:
76+
{{- with .Values.volumes }}
77+
{{- toYaml . | nindent 8 }}
78+
{{- end }}
79+
- name: properties-volume
80+
configMap:
81+
name: {{ include "structurizr.fullname" . }}-properties
82+
- name: users-volume
83+
configMap:
84+
name: {{ include "structurizr.fullname" . }}-users
85+
- name: roles-volume
86+
configMap:
87+
name: {{ include "structurizr.fullname" . }}-roles
88+
- name: saml-idp-metadata-volume
89+
configMap:
90+
name: {{ include "structurizr.fullname" . }}-saml-idp-metadata
91+
- name: log4j2-volume
92+
configMap:
93+
name: {{ include "structurizr.fullname" . }}-log4j2
5294
{{- with .Values.nodeSelector }}
5395
nodeSelector:
5496
{{- toYaml . | nindent 8 }}

charts/structurizr/values.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ serviceAccount:
1616
create: true
1717
# Annotations to add to the service account
1818
annotations: {}
19+
# iam.gke.io/gcp-service-account: structurizr@*.iam.gserviceaccount.com
1920
# The name of the service account to use.
2021
# If not set and create is true, a name is generated using the fullname template
2122
name: ""
2223

2324
podAnnotations: {}
25+
# gke-gcsfuse/volumes: "true"
2426

2527
podSecurityContext: {}
2628
# fsGroup: 2000
@@ -77,3 +79,49 @@ nodeSelector: {}
7779
tolerations: []
7880

7981
affinity: {}
82+
83+
volumes: []
84+
# - name: my-storage
85+
# persistentVolumeClaim:
86+
# claimName: my-pvc
87+
# - name: structurizr-bucket
88+
# csi:
89+
# driver: gcsfuse.csi.storage.gke.io
90+
# volumeAttributes:
91+
# bucketName: "structurizr-google-storage-bucket-name"
92+
# mountOptions: "implicit-dirs"
93+
94+
volumeMounts: []
95+
# - name: my-storage
96+
# mountPath: /path/in/container
97+
# - name: structurizr-bucket
98+
# mountPath: /usr/local/structurizr
99+
100+
properties: |
101+
# # Your properties content goes here...
102+
# structurizr.redis.password=${REDIS_PASSWORD}
103+
# structurizr.authentication=saml
104+
# structurizr.feature.ui.dslEditor=true
105+
# structurizr.safeMode=false
106+
# # and so on...
107+
108+
users: |
109+
# # Your users content goes here...
110+
# {username}={hashed password}
111+
# # and so on...
112+
113+
roles: |
114+
# # Your roles content goes here...
115+
# {username}={role1},{role2},{role3}
116+
# # and so on...
117+
118+
saml: |
119+
# # Your saml-idp-metadata.xml configuration goes here...
120+
121+
log4j2: |
122+
# # Your log4j2 configuration goes here...
123+
# # See: https://github.com/structurizr/onpremises/blob/main/structurizr-onpremises/src/main/resources/log4j2.properties
124+
125+
env: []
126+
# - name: STRUCTURIZR_DATA_DIRECTORY
127+
# value: "/usr/local/structurizr"

0 commit comments

Comments
 (0)