add icarus nodes-mngt
This commit is contained in:
1 parent
d241e8f4e4
commit
36226b300b
9 files changed
+162
No files matched your search
@@ -0,0 +1,87 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: cri-prune
|
||||
spec:
|
||||
schedule: "0 16 * * 0" #every sunday at 4pm
|
||||
jobTemplate:
|
||||
spec:
|
||||
backoffLimit: 1
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
|
||||
initContainers:
|
||||
- name: fix-ssh
|
||||
image: alpine
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /home/ansible/.ssh
|
||||
cp /tmp/ssh/* /home/ansible/.ssh/
|
||||
chown 1000:1000 /home/ansible/.ssh/*
|
||||
chmod 600 /home/ansible/.ssh/id_rsa
|
||||
chmod 644 /home/ansible/.ssh/id_rsa.pub
|
||||
chmod 644 /home/ansible/.ssh/known_hosts
|
||||
|
||||
volumeMounts:
|
||||
- name: icarus-ssh
|
||||
mountPath: /tmp/ssh
|
||||
- name: home
|
||||
mountPath: /home/ansible
|
||||
|
||||
containers:
|
||||
- name: cri-prune
|
||||
image: oci.limbosolutions.com/public/mylimbo.ansible.collections.global:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "250m"
|
||||
|
||||
|
||||
# command: ["tail", "-f", "/dev/null"]
|
||||
|
||||
args:
|
||||
|
||||
- ansible-playbook mylimbo.globals.k3s.crictl_prune
|
||||
|
||||
volumeMounts:
|
||||
|
||||
- name: home
|
||||
mountPath: /home/ansible
|
||||
|
||||
- name: ansible-inventory
|
||||
mountPath: /workspace/inventory
|
||||
subPath: inventory
|
||||
|
||||
- name: ansible-all-group-vars
|
||||
mountPath: /workspace/group_vars/all
|
||||
|
||||
- name: ansible-icarus-host-vars
|
||||
mountPath: /workspace/host_vars/icarus
|
||||
|
||||
volumes:
|
||||
- name: home
|
||||
emptyDir: {}
|
||||
|
||||
- name: icarus-ssh
|
||||
secret:
|
||||
secretName: icarus-ssh
|
||||
defaultMode: 0400
|
||||
|
||||
- name: ansible-inventory
|
||||
secret:
|
||||
secretName: ansible-inventory
|
||||
|
||||
- name: ansible-all-group-vars
|
||||
secret:
|
||||
secretName: ansible-group-vars
|
||||
|
||||
- name: ansible-icarus-host-vars
|
||||
secret:
|
||||
secretName: ansible-icarus-host-vars
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: monitoring
|
||||
resources:
|
||||
- cri-prune.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
@@ -0,0 +1,13 @@
|
||||
###
|
||||
# Hosted on chimera
|
||||
# check directory /cluster/chimera/nodes-mngt/icarus-nodes-mngt
|
||||
# for requirements and deploy
|
||||
##
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: icarus-nodes-mngt
|
||||
resources:
|
||||
- cronjobs
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
Reference in new issue
Block a user