Skip to content

Commit

Permalink
feat: add initContainer support for network node StatefulSets (#870)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon authored Jun 5, 2024
1 parent 74b4e94 commit f621ae9
Show file tree
Hide file tree
Showing 57 changed files with 65 additions and 62 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@

# These are Windows script files and should use crlf
*.bat text eol=crlf

6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ body:
description: Which version of the BOM or CLI are you using?
placeholder: |
ex. 0.18.2 or git commit ID
The bill of materials version can be found in your Gradle or Maven
The bill of materials version can be found in your Gradle or Maven
build configuration. The CLI version can be found by using the `--version` switch.
- type: dropdown
id: execution-environment
Expand Down Expand Up @@ -82,5 +82,5 @@ body:
label: Additional Context
description: |
Add any other context about the problem here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body:
render: markdown
placeholder: |
_A clear and concise description of any alternative solutions or other features you've considered._
Note: Please provide a clear and concise description of the business need for this enhancement. This will help us prioritize the feature request.
validations:
required: true
Expand All @@ -43,5 +43,5 @@ body:
label: Additional Context
description: |
Add any other context or screenshots about the feature request here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
render: markdown
placeholder: |
_A clear and concise description of any alternative solutions or features you've considered._
Note: Please provide a clear and concise description of the business need for this feature. This will help us prioritize the feature request.
validations:
required: true
Expand All @@ -33,5 +33,5 @@ body:
label: Additional Context
description: |
Add any other context or screenshots about the feature request here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
2 changes: 1 addition & 1 deletion .github/workflows/zxc-helm-chart-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
matrix:
# direct-install.sh uses ubi8-init-java17 image
# nmt-install.sh uses ubi8-init-dind image
scriptName: [ direct-install.sh, nmt-install.sh ]
scriptName: [ direct-install.sh, nmt-install.sh ]
steps:
- name: Setup Make
run: |
Expand Down
13 changes: 11 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ repos:
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
# - id: detect-private-key
- id: forbid-new-submodules
- repo: https://github.com/jguttman94/pre-commit-gradle
rev: v0.3.0
Expand All @@ -20,3 +19,13 @@ repos:
hooks:
- id: conventional-pre-commit
stages: [ commit-msg ]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [-c=./.yamllint]
exclude: charts
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.23 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
hooks:
- id: helmlint
15 changes: 15 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends: default

rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 1
comments:
min-spaces-from-content: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
# don't bother me with this rule
document-start: disable
line-length: disable
indentation: disable
2 changes: 1 addition & 1 deletion build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

includeBuild("project-plugins")

includeBuild("settings-plugins")
includeBuild("settings-plugins")
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ home: https://github.com/hashgraph/hedera-mirror-node-explorer
name: hedera-explorer
sources:
- https://github.com/hashgraph/hedera-mirror-node-explorer
version: 0.2

version: 0.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ data:
}
}
}
networks-config.json: {{ .Values.config | toJson }}
networks-config.json: {{ .Values.config | toJson }}
2 changes: 1 addition & 1 deletion charts/fullstack-deployment/config-files/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ static_resources:
address:
socket_address:
address: 127.0.0.1
port_value: 9901
port_value: 9901
2 changes: 1 addition & 1 deletion charts/fullstack-deployment/config-files/ofacBlock.acl
Original file line number Diff line number Diff line change
Expand Up @@ -4966,4 +4966,4 @@
95.47.206.0/23
95.47.255.0/24
95.47.98.0/24
95.69.152.0/22
95.69.152.0/22
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ metadata:
helm.sh/hook-weight: "2"
spec:
selfSigned: {}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
name: {{ .Values.global.ingressClassName }}
spec:
controller: haproxy-ingress.github.io/controller
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{{ range $index, $node := $.Values.hedera.nodes }}
{{- $hapiAppSecrets := lookup "v1" "Secret" $.Release.Namespace "network-node-hapi-app-secrets" }}
{{- $networkNodeKeySecrets := lookup "v1" "Secret" $.Release.Namespace "network-node-keys-secrets" }}
Expand All @@ -13,6 +12,7 @@
{{- $minioserver := (index $.Values "minio-server") }}
{{- $nodeStorage := $.Values.defaults.volumeClaims.node }}
{{- $pvcEnabled := $.Values.defaults.volumeClaims.enabled }}
{{- $initContainersLength := len $.Values.hedera.initContainers}}
---
apiVersion: apps/v1
kind: StatefulSet
Expand Down Expand Up @@ -475,4 +475,8 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- if gt $initContainersLength 0 }}
initContainers:
{{- toYaml $.Values.hedera.initContainers | nindent 8 }}
{{- end }}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,3 @@ spec:
{{- end }}
{{- end }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ data:
HEDERA_MIRROR_IMPORTER_DOWNLOADER_SOURCES_0_URI: {{ $minio_url |b64enc }}
HEDERA_MIRROR_IMPORTER_DOWNLOADER_SOURCES_0_CREDENTIALS_ACCESSKEY: {{ coalesce ((($previous).data).S3_ACCESS_KEY) ($minio_accessKey | b64enc) }}
HEDERA_MIRROR_IMPORTER_DOWNLOADER_SOURCES_0_CREDENTIALS_SECRETKEY: {{ coalesce ((($previous).data).S3_SECRET_KEY) ($minio_secretKey | b64enc) }}
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ spec:
targetPort: 9090 # envoy-proxy's prometheus-listener port
{{- end }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ spec:
targetPort: 9090 # stats port
{{- end }}
{{- end }}

2 changes: 1 addition & 1 deletion charts/fullstack-deployment/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ you have the network deployed already.
- Any new template variables should be added in `helpers.sh` with prefix `TMPL_` (e.g TMPL_TOTAL_NODES)
- Any new required env variable should be added in `env.sh`
- Any new helper function should be added in `helpers.sh`
- If a new script file is added, load it in `load.sh`
- If a new script file is added, load it in `load.sh`
2 changes: 1 addition & 1 deletion charts/fullstack-deployment/tests/helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,4 @@ function is_route_accepted() {

[[ "${route_status}" = "TRUE" ]] && return "${EX_OK}"
return "${EX_ERR}"
}
}
2 changes: 1 addition & 1 deletion charts/fullstack-deployment/tests/logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ function log_fail() {

function log_line_sep() {
log_debug "---"
}
}
2 changes: 1 addition & 1 deletion charts/fullstack-deployment/tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ if [[ "${OUTPUT_LOG}" = "true" ]]; then
cat_log
fi

exit "${bats_exec_status}"
exit "${bats_exec_status}"
2 changes: 2 additions & 0 deletions charts/fullstack-deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ deployment:

# hedera node configuration
hedera:
initContainers: []

configMaps:
apiPermissionsProperties: ""
applicationEnv: ""
Expand Down
2 changes: 1 addition & 1 deletion dev/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ tester:
repository: "kubectl-bats"
tag: "local"
pullPolicy: "Never"
resources: {}
resources: {}
2 changes: 1 addition & 1 deletion dev/dev-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ name: fst # this is overridden if CLUSTER_NAME env var is set. Check .env file
nodes:
- role: control-plane
labels:
fullstack-scheduling.io/role: network
fullstack-scheduling.io/role: network
2 changes: 1 addition & 1 deletion dev/local-node/data/keys2/merge_pfx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ keytool -exportcert -alias "e-${n}" -keystore "${dir}/public-${n}.pfx" -storetyp
echo "-----------------------------"
echo "public.pfx"
echo "-----------------------------"
keytool -list -keystore "${dir}/public.pfx" -storetype "pkcs12" -storepass "password"
keytool -list -keystore "${dir}/public.pfx" -storetype "pkcs12" -storepass "password"
2 changes: 1 addition & 1 deletion dev/local-node/log4j2-jrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,4 @@
<AppenderRef ref="RollingFile"/>
</Logger>
</Loggers>
</Configuration>
</Configuration>
2 changes: 1 addition & 1 deletion dev/scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ function build_kubectl_bats() {
kind load docker-image "${KUBECTL_BATS_IMAGE}" -n "${CLUSTER_NAME}"

log_time "build_kubectl_bats"
}
}
2 changes: 1 addition & 1 deletion dev/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ readonly DOCKERFILE_DIR="${SCRIPT_DIR}/../../docker"
readonly LOCAL_DOCKER_REGISTRY="docker.fst.local" # same as in dev/ci/ci-values.yaml
readonly LOCAL_DOCKER_IMAGE_TAG="local"

show_env_vars
show_env_vars
2 changes: 1 addition & 1 deletion dev/scripts/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,4 @@ function run_helm_chart_tests() {
fi

log_time "run_helm_chart_tests"
}
}
1 change: 0 additions & 1 deletion dev/scripts/nmt-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ function stop_node_all() {

return "${EX_OK}"
}

1 change: 0 additions & 1 deletion dev/telemetry/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ destroy-all:
-${MAKE} destroy-telemetry-stack
-${MAKE} destroy-prometheus-example-app
-${MAKE} destroy-tracing-example-app

2 changes: 1 addition & 1 deletion dev/telemetry/grafana/dashboards/NMT.json
Original file line number Diff line number Diff line change
Expand Up @@ -739,4 +739,4 @@
"uid": "ClaqZQb4z",
"version": 1,
"weekStart": ""
}
}
2 changes: 1 addition & 1 deletion dev/telemetry/grafana/example-tracing-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ spec:
value: tempo:4317
image: ghcr.io/grafana/xk6-client-tracing:v0.0.2
imagePullPolicy: IfNotPresent
name: xk6-tracing
name: xk6-tracing
2 changes: 0 additions & 2 deletions dev/telemetry/prometheus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,3 @@ deploy-prometheus-example-app:
.PHONY: destroy-prometheus-example-app
destroy-prometheus-example-app:
source "${SCRIPTS_DIR}/${TELEMETRY_SCRIPT}" && destroy-prometheus-example-app


2 changes: 1 addition & 1 deletion dev/temp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.txt
*.xml
*.yaml
*.yaml
1 change: 0 additions & 1 deletion fullstack-core/fullstack-alerting-api/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
@@ -1 +1 @@
This is some text for testing purposes.
This is some text for testing purposes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

1 change: 0 additions & 1 deletion fullstack-core/fullstack-datasource-api/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

1 change: 0 additions & 1 deletion fullstack-core/fullstack-datasource-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

1 change: 0 additions & 1 deletion fullstack-core/fullstack-monitoring-api/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

1 change: 0 additions & 1 deletion fullstack-core/fullstack-monitoring-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

1 change: 0 additions & 1 deletion fullstack-core/fullstack-reporting-api/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
#

mavenPublishingEnabled = false

1 change: 0 additions & 1 deletion fullstack-core/fullstack-reporting-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#

mavenPublishingEnabled = false

Loading

0 comments on commit f621ae9

Please sign in to comment.