add ability to specify local_path_provisioner data dir for PersistentVolumes
This commit is contained in:
@@ -83,6 +83,8 @@ modules:
|
|||||||
enabled: true
|
enabled: true
|
||||||
account_email: g.stykalin@rockitsoft.ru
|
account_email: g.stykalin@rockitsoft.ru
|
||||||
storage:
|
storage:
|
||||||
|
local_path_provisioner:
|
||||||
|
data_dir: "/app/local-path-provisioner"
|
||||||
longhorn:
|
longhorn:
|
||||||
enabled: false
|
enabled: false
|
||||||
secrets_store_csi_driver:
|
secrets_store_csi_driver:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
https://github.com/argoproj/argocd-example-apps/tree/master/guestbook
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
apiVersion: cert-manager.io/v1
|
|
||||||
kind: ClusterIssuer
|
|
||||||
metadata:
|
|
||||||
name: demo-app-issuer
|
|
||||||
spec:
|
|
||||||
acme:
|
|
||||||
server: https://acme-v02.api.letsencrypt.org/directory
|
|
||||||
email: reversstorm@gmail.com
|
|
||||||
privateKeySecretRef:
|
|
||||||
name: demo-app-acme-secret
|
|
||||||
solvers:
|
|
||||||
- http01:
|
|
||||||
ingress:
|
|
||||||
ingressTemplate:
|
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
kubernetes.io/ingress.class: nginx
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: demo-app-ingress
|
|
||||||
labels:
|
|
||||||
name: demo-app-ingress
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: "demo-app-issuer"
|
|
||||||
nginx.ingress.kubernetes.io/cors-allow-headers: Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
|
|
||||||
nginx.ingress.kubernetes.io/enable-cors: "true"
|
|
||||||
nginx.ingress.kubernetes.io/proxy-buffer-size: 128k
|
|
||||||
nginx.ingress.kubernetes.io/proxy-buffers: 4 256k
|
|
||||||
nginx.ingress.kubernetes.io/proxy-busy-buffers-size: 256k
|
|
||||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
||||||
spec:
|
|
||||||
ingressClassName: nginx
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- demo.disk.lt.t1.cloud
|
|
||||||
secretName: kvazaric-frontend-tls
|
|
||||||
rules:
|
|
||||||
- host: demo.disk.lt.t1.cloud
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: kvazaric-frontend
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: kvazaric-frontend
|
|
||||||
labels:
|
|
||||||
app: kvazaric-frontend
|
|
||||||
app.kubernetes.io/component: "kvazaric-frontend"
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: kvazaric-frontend
|
|
||||||
app.kubernetes.io/component: "kvazaric-frontend"
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: kvazaric-frontend
|
|
||||||
app.kubernetes.io/component: "kvazaric-frontend"
|
|
||||||
annotations:
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-inject-secret-env: demo-app/kvazaric-frontend
|
|
||||||
vault.hashicorp.com/agent-inject-template-env: |
|
|
||||||
{{- with secret "demo-app/kvazaric-frontend" -}}
|
|
||||||
{{- range $key, $value := .Data.data }}
|
|
||||||
export {{ $key }}={{ $value }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes-local
|
|
||||||
vault.hashicorp.com/role: demo-app
|
|
||||||
spec:
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: docker
|
|
||||||
serviceAccountName: demo-app
|
|
||||||
containers:
|
|
||||||
- name: kvazaric-frontend
|
|
||||||
image: harbor.disk.lt.t1.cloud/demo-app/frontend:dev-8d74ed10
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- containerPort: 3000
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 50Mi
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: demo-app
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kvazaric-frontend
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: kvazaric-frontend
|
|
||||||
app.kubernetes.io/component: "kvazaric-frontend"
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 3000
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: canary-demo-preview
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: http
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: canary-demo
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: canary-demo
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: http
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: canary-demo
|
|
||||||
---
|
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Rollout
|
|
||||||
metadata:
|
|
||||||
name: canary-demo
|
|
||||||
spec:
|
|
||||||
replicas: 5
|
|
||||||
revisionHistoryLimit: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: canary-demo
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: canary-demo
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: canary-demo
|
|
||||||
image: argoproj/rollouts-demo:green
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 32Mi
|
|
||||||
cpu: 5m
|
|
||||||
strategy:
|
|
||||||
canary:
|
|
||||||
canaryService: canary-demo-preview
|
|
||||||
steps:
|
|
||||||
- setWeight: 20
|
|
||||||
- pause: {}
|
|
||||||
- setWeight: 40
|
|
||||||
- pause: { duration: 10 }
|
|
||||||
- setWeight: 60
|
|
||||||
- pause: { duration: 10 }
|
|
||||||
- setWeight: 80
|
|
||||||
- pause: { duration: 10 }
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: vault-inject-example
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: vault-inject-example-deployment
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: vault-inject-example
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: vault-inject-example
|
|
||||||
annotations:
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/role: "vault-example"
|
|
||||||
vault.hashicorp.com/agent-inject-secret-env: "vault-example/creds"
|
|
||||||
vault.hashicorp.com/auth-path: "auth/kubernetes-local"
|
|
||||||
vault.hashicorp.com/agent-inject-template-env: |
|
|
||||||
{{- with secret "vault-example/creds" -}}
|
|
||||||
{{- range $key, $value := .Data.data }}
|
|
||||||
export {{ $key }}={{ $value }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: app
|
|
||||||
image: "postgres:latest"
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
value: admin
|
|
||||||
serviceAccountName: vault-inject-example
|
|
||||||
@@ -52,6 +52,7 @@ type Additional struct {
|
|||||||
LocalPathProvisioner struct {
|
LocalPathProvisioner struct {
|
||||||
StorageClassName string `yaml:"storage_class_name" env-default:"local-path"`
|
StorageClassName string `yaml:"storage_class_name" env-default:"local-path"`
|
||||||
ReclaimPolicy string `yaml:"reclaim_policy" env-default:"Delete"`
|
ReclaimPolicy string `yaml:"reclaim_policy" env-default:"Delete"`
|
||||||
|
DataDir string `yaml:"data_dir" env-default:"/opt/local-path-provisioner/"`
|
||||||
} `yaml:"local_path_provisioner"`
|
} `yaml:"local_path_provisioner"`
|
||||||
Longhorn struct {
|
Longhorn struct {
|
||||||
ChartRef string `yaml:"chart_ref" env-default:"kube-forge/longhorn"`
|
ChartRef string `yaml:"chart_ref" env-default:"kube-forge/longhorn"`
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ local_path_provisioner_enabled: true
|
|||||||
# local_path_provisioner_namespace: "local-path-storage"
|
# local_path_provisioner_namespace: "local-path-storage"
|
||||||
local_path_provisioner_storage_class: {{ .Modules.Additional.Storage.LocalPathProvisioner.StorageClassName }}
|
local_path_provisioner_storage_class: {{ .Modules.Additional.Storage.LocalPathProvisioner.StorageClassName }}
|
||||||
local_path_provisioner_reclaim_policy: {{ .Modules.Additional.Storage.LocalPathProvisioner.ReclaimPolicy }}
|
local_path_provisioner_reclaim_policy: {{ .Modules.Additional.Storage.LocalPathProvisioner.ReclaimPolicy }}
|
||||||
# local_path_provisioner_claim_root: /opt/local-path-provisioner/
|
local_path_provisioner_claim_root: {{ .Modules.Additional.Storage.LocalPathProvisioner.DataDir }}
|
||||||
# local_path_provisioner_debug: false
|
# local_path_provisioner_debug: false
|
||||||
# local_path_provisioner_image_repo: "rancher/local-path-provisioner"
|
# local_path_provisioner_image_repo: "rancher/local-path-provisioner"
|
||||||
# local_path_provisioner_image_tag: "v0.0.23"
|
# local_path_provisioner_image_tag: "v0.0.23"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ local_path_provisioner_enabled: true
|
|||||||
# local_path_provisioner_namespace: "local-path-storage"
|
# local_path_provisioner_namespace: "local-path-storage"
|
||||||
local_path_provisioner_storage_class: local-path
|
local_path_provisioner_storage_class: local-path
|
||||||
local_path_provisioner_reclaim_policy: Delete
|
local_path_provisioner_reclaim_policy: Delete
|
||||||
# local_path_provisioner_claim_root: /opt/local-path-provisioner/
|
local_path_provisioner_claim_root: /opt/local-path-provisioner/
|
||||||
# local_path_provisioner_debug: false
|
# local_path_provisioner_debug: false
|
||||||
# local_path_provisioner_image_repo: "rancher/local-path-provisioner"
|
# local_path_provisioner_image_repo: "rancher/local-path-provisioner"
|
||||||
# local_path_provisioner_image_tag: "v0.0.23"
|
# local_path_provisioner_image_tag: "v0.0.23"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ kube_token_dir: "{{ kube_config_dir }}/tokens"
|
|||||||
kube_api_anonymous_auth: true
|
kube_api_anonymous_auth: true
|
||||||
|
|
||||||
## Change this to use another Kubernetes version, e.g. a current beta release
|
## Change this to use another Kubernetes version, e.g. a current beta release
|
||||||
kube_version: v1.30.3
|
kube_version: v1.29.0
|
||||||
|
|
||||||
# Where the binaries will be downloaded.
|
# Where the binaries will be downloaded.
|
||||||
# Note: ensure that you've enough disk space (about 1G)
|
# Note: ensure that you've enough disk space (about 1G)
|
||||||
@@ -404,7 +404,4 @@ auto_renew_certificates: true
|
|||||||
kubeadm_patches:
|
kubeadm_patches:
|
||||||
enabled: false
|
enabled: false
|
||||||
source_dir: "{{ inventory_dir }}/patches"
|
source_dir: "{{ inventory_dir }}/patches"
|
||||||
dest_dir: "{{ kube_config_dir }}/patches"
|
dest_dir: "{{ kube_config_dir }}/patches"
|
||||||
## Kubelet additional settings
|
|
||||||
kubelet_custom_flags:
|
|
||||||
- "--root-dir=/app/k8s/kubelet"
|
|
||||||
@@ -1,17 +1,33 @@
|
|||||||
|
|
||||||
t1-disk-lt-k8s-test-master-01 ansible_host=10.100.20.47 ip=10.100.20.47
|
t1-disk-lt-k8s-master-01 ansible_host=10.100.20.43 ip=10.100.20.43
|
||||||
t1-disk-lt-k8s-test-slave-01 ansible_host=10.100.20.48 ip=10.100.20.48
|
t1-disk-lt-k8s-master-02 ansible_host=10.100.20.38 ip=10.100.20.38
|
||||||
t1-disk-lt-k8s-test-slave-02 ansible_host=10.100.20.49 ip=10.100.20.49
|
t1-disk-lt-k8s-master-03 ansible_host=10.100.20.42 ip=10.100.20.42
|
||||||
|
t1-disk-lt-k8s-slave-01 ansible_host=10.100.20.40 ip=10.100.20.40
|
||||||
|
t1-disk-lt-k8s-slave-02 ansible_host=10.100.20.41 ip=10.100.20.41
|
||||||
|
t1-disk-lt-k8s-slave-03 ansible_host=10.100.20.39 ip=10.100.20.39
|
||||||
|
t1-disk-lt-k8s-slave-04 ansible_host=10.100.20.45 ip=10.100.20.45
|
||||||
|
t1-disk-lt-k8s-slave-05 ansible_host=10.100.20.44 ip=10.100.20.44
|
||||||
|
t1-disk-lt-k8s-slave-06 ansible_host=10.100.20.50 ip=10.100.20.50
|
||||||
|
t1-disk-lt-k8s-slave-07 ansible_host=10.100.20.51 ip=10.100.20.51
|
||||||
|
|
||||||
[kube_control_plane]
|
[kube_control_plane]
|
||||||
t1-disk-lt-k8s-test-master-01
|
t1-disk-lt-k8s-master-01
|
||||||
|
t1-disk-lt-k8s-master-02
|
||||||
|
t1-disk-lt-k8s-master-03
|
||||||
|
|
||||||
[etcd]
|
[etcd]
|
||||||
t1-disk-lt-k8s-test-master-01
|
t1-disk-lt-k8s-master-01
|
||||||
|
t1-disk-lt-k8s-master-02
|
||||||
|
t1-disk-lt-k8s-master-03
|
||||||
|
|
||||||
[kube_node]
|
[kube_node]
|
||||||
t1-disk-lt-k8s-test-slave-01
|
t1-disk-lt-k8s-slave-01
|
||||||
t1-disk-lt-k8s-test-slave-02
|
t1-disk-lt-k8s-slave-02
|
||||||
|
t1-disk-lt-k8s-slave-03
|
||||||
|
t1-disk-lt-k8s-slave-04
|
||||||
|
t1-disk-lt-k8s-slave-05
|
||||||
|
t1-disk-lt-k8s-slave-06
|
||||||
|
t1-disk-lt-k8s-slave-07
|
||||||
|
|
||||||
[k8s_cluster:children]
|
[k8s_cluster:children]
|
||||||
kube_control_plane
|
kube_control_plane
|
||||||
|
|||||||
Reference in New Issue
Block a user