ansible v2 (release 3.4.9)

This commit is contained in:
havelight-ee
2023-02-16 16:20:12 +09:00
parent 7f08fdd9ff
commit 59a199e50f
3525 changed files with 435537 additions and 62726 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,197 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: metrics-server
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: system:aggregated-metrics-reader
rules:
- apiGroups:
- metrics.k8s.io
resources:
- pods
- nodes
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: metrics-server
name: system:metrics-server
rules:
- apiGroups:
- ""
resources:
- nodes/metrics
verbs:
- get
- apiGroups:
- ""
resources:
- pods
- nodes
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
k8s-app: metrics-server
name: metrics-server-auth-reader
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: extension-apiserver-authentication-reader
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
k8s-app: metrics-server
name: metrics-server:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
k8s-app: metrics-server
name: system:metrics-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:metrics-server
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
spec:
ports:
- name: https
port: 443
protocol: TCP
targetPort: https
selector:
k8s-app: metrics-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: metrics-server
strategy:
rollingUpdate:
maxUnavailable: 0
template:
metadata:
labels:
k8s-app: metrics-server
spec:
containers:
- args:
- --cert-dir=/tmp
- --secure-port=4443
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --metric-resolution=15s
- --kubelet-insecure-tls
image: k8s.gcr.io/metrics-server/metrics-server:v0.6.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /livez
port: https
scheme: HTTPS
periodSeconds: 10
name: metrics-server
ports:
- containerPort: 4443
name: https
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readyz
port: https
scheme: HTTPS
initialDelaySeconds: 20
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 200Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
- mountPath: /tmp
name: tmp-dir
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
serviceAccountName: metrics-server
volumes:
- emptyDir: {}
name: tmp-dir
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
labels:
k8s-app: metrics-server
name: v1beta1.metrics.k8s.io
spec:
group: metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
name: metrics-server
namespace: kube-system
version: v1beta1
versionPriority: 100

View File

@@ -0,0 +1,5 @@
# {{ ansible_managed }}
{% from 'yaml2toml_macro.j2' import yaml2toml with context -%}
{{ yaml2toml(containerd_config) }}

View File

@@ -0,0 +1,9 @@
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
"insecure-registries": ["10.10.31.243:5000"]
}

View File

@@ -0,0 +1,6 @@
127.0.0.1 localhost
:: 1 localhost
{% for host in groups.all %}
{{ hostvars[host].ansible_default_ipv4.address }} {{ hostvars[host].ansible_fqdn }} {{ hostvars[host].ansible_hostname }}
{%endfor%}

View File

@@ -0,0 +1,3 @@
[[registry]]
location = "10.10.31.243:5000"
insecure = true

View File

@@ -0,0 +1,58 @@
{%- macro yaml2inline_toml(item, depth) -%}
{%- if item is string or item is number -%}
{#- First, process all primitive types. -#}
{{ item | to_json }}
{%- elif item is mapping -%}
{#- Second, process all mappings. -#}
{#- Note that inline mappings must not contain newlines (except inside contained lists). -#}
{{ "{" }}
{%- for key, value in item.items() | sort -%}
{{ " "
+ (key | to_json)
+ " = "
+ yaml2inline_toml(value, depth)
}}
{%- if not loop.last -%}{{ "," }}{%- endif -%}
{%- endfor -%}
{{ " }" }}
{%- else -%}
{#- Third, process all lists. -#}
{%- if item | length == 0 -%}{{ "[]" }}{%- else -%}
{{ "[" }}
{%- for entry in item -%}
{{ "\n"
+ (" " * (depth + 1))
+ yaml2inline_toml(entry, depth + 1)
}}
{%- if not loop.last -%}{{ "," }}{%- endif -%}
{%- endfor -%}
{{ "\n" + (" " * depth) + "]" }}
{%- endif -%}
{%- endif -%}
{%- endmacro -%}
{%- macro yaml2toml(item, super_keys=[]) -%}
{%- for key, value in item.items() | sort -%}
{%- if value is not mapping -%}
{#- First, process all non-mappings. -#}
{{ (" " * (super_keys | length))
+ (key | to_json)
+ " = "
+ (yaml2inline_toml(value, super_keys | length))
+ "\n"
}}
{%- endif -%}
{%- endfor -%}
{%- for key, value in item.items() | sort -%}
{%- if value is mapping -%}
{#- Second, process all mappings. -#}
{{ "\n"
+ (" " * (super_keys | length))
+ "["
+ ((super_keys+[key]) | map('to_json') | join("."))
+ "]\n"
+ yaml2toml(value, super_keys+[key])
}}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}