Skip to content

Commit 021aa7a

Browse files
committed
crabserver helm - added values for prod and preprod
1 parent da638e6 commit 021aa7a

File tree

6 files changed

+46
-12
lines changed

6 files changed

+46
-12
lines changed

helm/crabserver/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Deploy CRAB
2+
3+
At the moment CRAB team is transitioning to using helm. However, we do noy like
4+
to use helm for deployment. See this
5+
[comment](https://github.com/dmwm/CRABServer/issues/7843#issuecomment-2025085120)
6+
for some context.
7+
8+
We like to use helm for templating, using the helm charts to generate the
9+
manifest file, then applying it with `kubectl apply`.
10+
11+
We therefore ask cmsweb operators to deploy crab with the following procedure:
12+
13+
Generate the manifest with
14+
15+
```bash
16+
# testbed
17+
helm template crabserver . -f values.yaml -f values-testbed.yaml > ../../kubernetes/cmsweb/services/crabserver.yaml
18+
19+
# prod
20+
helm template crabserver . -f values.yaml -f values-prod.yaml > ../../kubernetes/cmsweb/services/crabserver.yaml
21+
```
22+
23+
Then to deploy it with the usual `deploy-srv.sh` script
24+
25+
```bash
26+
# testbed
27+
./scripts/deploy-srv.sh crabserver v3.231006 preprod
28+
29+
# prod
30+
./scripts/deploy-srv.sh crabserver v3.231006 prod
31+
```
32+
33+
Changes to `../../kubernetes/cmsweb/services/crabserver.yaml` should not be committed.

helm/crabserver/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ metadata:
88
namespace: crab
99
spec:
1010
{{- if not .Values.autoscaling.enabled }}
11-
{{- if or (eq (toString $environment) "prod") (eq (toString $environment) "preprod") }}
11+
{{- if (eq (toString $environment) "prod") }}
1212
replicas: {{ .Values.replicaCount.prod }}
13+
{{- else if (eq (toString $environment) "preprod")}}
14+
replicas: {{ .Values.replicaCount.preprod }}
1315
{{- else }}
1416
replicas: {{ .Values.replicaCount.test }}
1517
{{- end }}

helm/crabserver/values-prod.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
environment: "prod"
2+
3+
image:
4+
tag: "v3.240426"

helm/crabserver/values-test2.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,3 @@ environment: "test"
22

33
image:
44
tag: "v3.240325"
5-
6-
livenessProbeTest:
7-
failureThreshold: 3
8-
initialDelaySeconds: 120
9-
periodSeconds: 600
10-
timeoutSeconds: 60
11-
12-
readinessProbeTest:
13-
periodSeconds: 600
14-
timeoutSeconds: 60
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
environment: "preprod"
2+
3+
image:
4+
tag: "v3.240426"

helm/crabserver/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Declare variables to be passed into your templates.
44

55
replicaCount:
6-
prod: 8
6+
prod: 15
7+
preprod: 1
78
test: 1
89

910
image:

0 commit comments

Comments
 (0)