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 d9ee96b commit 2b1e198
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/scripts/end2end/generate-kustomization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,48 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ${DIR}/_build/root/deploy/${base_yaml}
patchesStrategicMerge:
EOF

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

0 comments on commit 2b1e198

Please sign in to comment.