diff --git a/busybox-statefulset/kustomization.yaml b/busybox-statefulset/kustomization.yaml new file mode 100644 index 0000000..bcabfa7 --- /dev/null +++ b/busybox-statefulset/kustomization.yaml @@ -0,0 +1,5 @@ +--- +resources: +- statefulset.yaml +commonLabels: + appname: busybox diff --git a/busybox-statefulset/statefulset.yaml b/busybox-statefulset/statefulset.yaml new file mode 100644 index 0000000..52bb1dc --- /dev/null +++ b/busybox-statefulset/statefulset.yaml @@ -0,0 +1,48 @@ +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: busybox +spec: + selector: + matchLabels: + appname: busybox + replicas: 2 + template: + metadata: + labels: + appname: busybox + spec: + containers: + - name: logger + image: quay.io/nirsof/busybox:stable + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + emit() { + echo "$(date) $1" | tee -a /var/log/ramen.log + sync + } + trap "emit STOP; exit" TERM + emit START + while true; do + sleep 10 & wait + emit UPDATE + done + volumeMounts: + - name: varlog + mountPath: /var/log + volumeClaimTemplates: + - metadata: + name: varlog + labels: + appname: busybox + spec: + accessModes: + - ReadWriteOnce + storageClassName: rook-ceph-block + resources: + requests: + storage: 1Gi diff --git a/dr-statefulset/kustomization.yaml b/dr-statefulset/kustomization.yaml new file mode 100644 index 0000000..fe3cdc0 --- /dev/null +++ b/dr-statefulset/kustomization.yaml @@ -0,0 +1,6 @@ +--- +resources: + - ../dr +namespace: busybox-sample-statefulset +commonLabels: + app: busybox-sample-statefulset diff --git a/subscription-statefulset/kustomization.yaml b/subscription-statefulset/kustomization.yaml new file mode 100644 index 0000000..b81f793 --- /dev/null +++ b/subscription-statefulset/kustomization.yaml @@ -0,0 +1,14 @@ +--- +resources: + - ../subscription +namespace: busybox-sample-statefulset +commonLabels: + app: busybox-sample-statefulset +patches: + - target: + kind: Subscription + name: busybox-sub + patch: |- + - op: replace + path: /metadata/annotations/apps.open-cluster-management.io~1github-path + value: busybox-statefulset