Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
williamlardier committed Jan 2, 2025
1 parent e782053 commit bd44c04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 47 deletions.
45 changes: 1 addition & 44 deletions .github/scripts/end2end/generate-kustomization.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,13 @@ generate_kustomization() {
exit 1
}

# Generate base kustomization file
# Generate base kustomization file with the right base resource
cat > "$kustomization_file" << EOF
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ${DIR}/_build/root/deploy/${base_yaml}
patches:
EOF

# Add configsvr patch with correct path to add volumeClaimTemplates
cat >> "$kustomization_file" << EOF
- patch: |
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: data-db-mongodb-sharded-configsvr
spec:
volumeClaimTemplates:
- metadata:
name: datadir
annotations: {}
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "8Gi"
storageClassName: standard
EOF

# Add shard patches for N shards with correct path to add volumeClaimTemplates
for ((i=0; i<shard_count; i++)); do
cat >> "$kustomization_file" << EOF
- patch: |
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: data-db-mongodb-sharded-shard${i}-data
spec:
volumeClaimTemplates:
- metadata:
name: datadir
annotations: {}
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "8Gi"
storageClassName: standard
EOF
done
}
3 changes: 0 additions & 3 deletions .github/scripts/end2end/install-kind-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ mongodb_sharded() {
$SOLUTION_REGISTRY/os-shell=$(get_image_from_deps mongodb-shell) \
$SOLUTION_REGISTRY/mongodb-exporter=$(get_image_from_deps mongodb-sharded-exporter)

# cat the current kustomize file
cat "${DIR}/kustomization.yaml"

kubectl apply -k "${DIR}"

kubectl rollout status statefulset data-db-mongodb-sharded-mongos
Expand Down

0 comments on commit bd44c04

Please sign in to comment.