Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Havoc labels crib #11830

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ spec:
selector:
matchLabels:
app: {{ $.Release.Name }}-db
# Used for testing.
# havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool
havoc-component-group: db
havoc-network-group: db
instance: {{ $cfg.name }}-db
release: {{ $.Release.Name }}
template:
metadata:
labels:
app: {{ $.Release.Name }}-db
# Used for testing.
# havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool
havoc-component-group: db
havoc-network-group: db
instance: {{ $cfg.name }}-db
release: {{ $.Release.Name }}
{{- range $key, $value := $.Values.labels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $.Release.Name }}-{{ $cfg.name }}
name: {{ if eq $index 0 }}{{ $.Release.Name }}-{{ $cfg.name }}-bootstrap{{ else }}{{ $.Release.Name }}-{{ $cfg.name }}{{ end }}
spec:
strategy:
# Need to recreate the pod to deal with lease lock held by old pod.
type: Recreate
selector:
matchLabels:
app: {{ $.Release.Name }}
# Used for testing.
# havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool
{{ if eq $index 0 }}{{ else }}
havoc-component-group: node
{{ end }}
{{ if eq $index 0 }}{{ else }}
havoc-network-group: {{ if gt $index 2 }}"1"{{ else }}"2"{{ end }}
{{ end }}
instance: {{ $cfg.name }}
release: {{ $.Release.Name }}
template:
metadata:
labels:
app: {{ $.Release.Name }}
# Used for testing.
# havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool
{{ if eq $index 0 }}{{ else }}
havoc-component-group: node
{{ end }}
{{ if eq $index 0 }}{{ else }}
havoc-network-group: {{ if gt $index 2 }}"1"{{ else }}"2"{{ end }}
{{ end }}

instance: {{ $cfg.name }}
release: {{ $.Release.Name }}
# Used for testing. Role value should either be: bootstrap or node.
# There should only be one "bootstrap" node, the rest should be "node".
# Here we set the first node to be bootstrap, the rest to be node.
role: {{ if eq $index 0 }}bootstrap{{ else }}node{{ end }}
{{- range $key, $value := $.Values.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
Expand All @@ -43,7 +56,7 @@ spec:
{{- toYaml $.Values.chainlink.securityContext | nindent 12 }}
image: {{ default "public.ecr.aws/chainlink/chainlink" $cfg.image }}
imagePullPolicy: Always
command: ["bash", "-c", "while ! pg_isready -U postgres --host {{ $.Release.Name }}-db-{{ $cfg.name }} --port 5432; do echo \"waiting for database to start\"; sleep 1; done && chainlink -c /etc/node-secrets-volume/default.toml -c /etc/node-secrets-volume/overrides.toml -secrets /etc/node-secrets-volume/secrets.toml node start -d -p /etc/node-secrets-volume/node-password -a /etc/node-secrets-volume/apicredentials --vrfpassword=/etc/node-secrets-volume/apicredentials"]
command: [ "bash", "-c", "while ! pg_isready -U postgres --host {{ $.Release.Name }}-db-{{ $cfg.name }} --port 5432; do echo \"waiting for database to start\"; sleep 1; done && chainlink -c /etc/node-secrets-volume/default.toml -c /etc/node-secrets-volume/overrides.toml -secrets /etc/node-secrets-volume/secrets.toml node start -d -p /etc/node-secrets-volume/node-password -a /etc/node-secrets-volume/apicredentials --vrfpassword=/etc/node-secrets-volume/apicredentials" ]
ports:
- name: access
containerPort: {{ $.Values.chainlink.web_port }}
Expand Down
8 changes: 8 additions & 0 deletions charts/chainlink-cluster/templates/geth-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ spec:
selector:
matchLabels:
app: geth
# Used for testing.
# havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool
havoc-component-group: "blockchain"
havoc-network-group: "blockchain"
release: {{ .Release.Name }}
template:
metadata:
labels:
app: geth
# Used for testing.
# havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool
havoc-component-group: "blockchain"
havoc-network-group: "blockchain"
release: {{ .Release.Name }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
Expand Down
Loading