Skip to content

Commit

Permalink
Increase parameters management
Browse files Browse the repository at this point in the history
  • Loading branch information
fjammes committed Jul 17, 2024
1 parent e0938de commit 381a340
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 43 deletions.
21 changes: 0 additions & 21 deletions chart/values-ci-noscience.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions chart/values-ci.yaml

This file was deleted.

13 changes: 12 additions & 1 deletion e2e/argocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

set -euxo pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

CIUXCONFIG=${CIUXCONFIG:-"$HOME/.ciuxconfig"}
echo "CIUXCONFIG=${CIUXCONFIG}"
. $CIUXCONFIG
Expand Down Expand Up @@ -34,11 +36,21 @@ NS=argocd
argocd login --core
kubectl config set-context --current --namespace="$NS"

IMAGE="$CIUX_IMAGE_URL"
echo "Use CIUX_IMAGE_URL to set fink-broker image: $CIUX_IMAGE_URL"
if [[ "$IMAGE" =~ "-noscience" ]];
then
FINKCONFIG="$DIR/finkconfig_noscience"
else
FINKCONFIG="$DIR/finkconfig"
fi

# Create fink app
argocd app create fink --dest-server https://kubernetes.default.svc \
--dest-namespace "$NS" \
--repo https://github.com/astrolabsoftware/fink-cd.git \
--path apps --revision "$FINK_CD_WORKBRANCH"
--values $FINKCONFIG/values-fink-broker.yaml

# Sync fink app-of-apps
argocd app sync fink
Expand All @@ -61,7 +73,6 @@ retry kubectl wait --for condition=established --timeout=60s crd/kafkas.kafka.st
argocd app set fink-broker -p image.repository="$CIUX_IMAGE_REGISTRY" \
-p image.name="$CIUX_IMAGE_NAME" \
-p image.tag="$CIUX_IMAGE_TAG" \
-p night="20200101"
argocd app sync -l app.kubernetes.io/instance=fink

# TODO Wait for kafkatopic to exist
Expand Down
2 changes: 0 additions & 2 deletions e2e/fink-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ IMAGE="$CIUX_IMAGE_URL"
echo "Use CIUX_IMAGE_URL to set fink-broker image: $CIUX_IMAGE_URL"
if [[ "$IMAGE" =~ "-noscience" ]];
then
VALUE_FILE="$DIR/../chart/values-ci-noscience.yaml"
FINKCONFIG="$DIR/finkconfig_noscience"
else
VALUE_FILE="$DIR/../chart/values-ci.yaml"
FINKCONFIG="$DIR/finkconfig"
fi

Expand Down
53 changes: 53 additions & 0 deletions e2e/finkconfig/values-fink-broker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Can be overriden in stream2raw, raw2science and distribution sections
cores: 1
coreRequest: 0
instances: 1
memory: 1g
# instances: 1

fink_trigger_update: "2"

# Can be overriden using --image option

# Default to s3a://<s3.bucket>
# online_data_prefix: s3a://fink-broker-online
producer: sims

log_level: INFO

#
# Parameters used to run the stream2raw task
#
stream2raw:
cores: "{{.Values.cores}}"
coreRequest: "{{.Values.coreRequest}}"
memory: "{{.Values.memory}}"
instances: "{{.Values.instances}}"
fink_alert_schema: /home/fink/fink-alert-schemas/ztf/ztf_public_20190903.schema.avro
kafka:
in_sockets: kafka-cluster-kafka-bootstrap.kafka:9092
starting_offset: earliest
topic: ztf-stream-sim

#
# Parameters used to run the raw2science task
#
raw2science:
cores: 2
coreRequest: 0
memory: 3000m
instances: 2

#
# Parameters used to run the distribution task
#
distribution:
cores: "{{.Values.cores}}"
coreRequest: "{{.Values.coreRequest}}"
memory: "{{.Values.memory}}"
instances: "{{.Values.instances}}"
kafka:
out_sockets: "kafka-cluster-kafka-external-bootstrap.kafka:9094"
schema: "/home/fink/fink-alert-schemas/ztf/distribution_schema_0p2.avsc"
substream_prefix: "fink_"

0 comments on commit 381a340

Please sign in to comment.