add icarus nodes-mngt
This commit is contained in:
1 parent
d241e8f4e4
commit
36226b300b
9 files changed
+162
No files matched your search
@@ -3,6 +3,7 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- monitoring
|
- monitoring
|
||||||
- repos
|
- repos
|
||||||
|
- nodes-mngt
|
||||||
generatorOptions:
|
generatorOptions:
|
||||||
disableNameSuffixHash: true
|
disableNameSuffixHash: true
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: myinfra-kubernetes-shared-icarus-nodes-mngt
|
||||||
|
spec:
|
||||||
|
interval: 1m
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: myinfra-kubernetes-shared
|
||||||
|
namespace: chimera-limbosolutions-com
|
||||||
|
path: nodes-mngt/icarus-nodes-mngt
|
||||||
|
prune: true
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: icarus-nodes-mngt
|
||||||
|
resources:
|
||||||
|
- fluxcd-kustomization.yaml
|
||||||
|
- secrets
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
**
|
||||||
|
!.gitignore
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
secretGenerator:
|
||||||
|
|
||||||
|
- name: icarus-ssh
|
||||||
|
files:
|
||||||
|
- known_hosts=.env.d/icarus-known_hosts
|
||||||
|
- id_rsa=.env.d/icarus-ssh-ansible-id_rsa
|
||||||
|
- id_rsa.pub=.env.d/icarus-ssh-ansible-id_rsa.pub
|
||||||
|
- name: ansible-icarus-host-vars
|
||||||
|
files:
|
||||||
|
- main.yaml=.env.d/ansible-icarus-host-vars.yaml
|
||||||
|
- name: ansible-all-group-vars
|
||||||
|
files:
|
||||||
|
- main.yaml=.env.d/ansible-all-group-vars.yaml
|
||||||
|
|
||||||
|
- name: ansible-inventory
|
||||||
|
files:
|
||||||
|
- inventory=.env.d/ansible-inventory
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- icarus-nodes-mngt
|
||||||
|
|
||||||
|
|
||||||
@@ -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