-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is mostly like busybox deployment using a daemonset instead of deployment. Signed-off-by: Nir Soffer <[email protected]>
- Loading branch information
Showing
5 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: busybox | ||
spec: | ||
selector: | ||
matchLabels: | ||
appname: busybox | ||
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 | ||
volumes: | ||
- name: varlog | ||
persistentVolumeClaim: | ||
claimName: busybox-pvc | ||
tolerations: | ||
# Run also on control-plane and master nodes. | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: Exists | ||
effect: NoSchedule | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
resources: | ||
- pvc.yaml | ||
- daemonset.yaml | ||
commonLabels: | ||
appname: busybox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: busybox-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: rook-ceph-block | ||
resources: | ||
requests: | ||
storage: 1Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
resources: | ||
- ../dr | ||
namespace: busybox-sample-daemonset | ||
commonLabels: | ||
app: busybox-sample-daemonset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
resources: | ||
- ../subscription | ||
namespace: busybox-sample-daemonset | ||
commonLabels: | ||
app: busybox-sample-daemonset | ||
patches: | ||
- target: | ||
kind: Subscription | ||
name: busybox-sub | ||
patch: |- | ||
- op: replace | ||
path: /metadata/annotations/apps.open-cluster-management.io~1github-path | ||
value: busybox-daemonset |