Add images registry change

This commit is contained in:
ByeonJungHun
2023-09-05 15:11:46 +09:00
parent fbe9fdbf2e
commit be3cf49129
9 changed files with 72 additions and 62 deletions

View File

@@ -18,13 +18,13 @@
release_state: present
values_files:
- "{{ role_path }}/files/01-storage/{{item}}/values.yaml"
#values:
# image:
# repository: "{{ REGISTRY }}/cmoa3/minio"
# imagePullSecrets:
# - name: "{{ PullSecret }}"
# mcImage:
# repository: "{{ REGISTRY }}/cmoa3/mc"
values:
image:
repository: "{{ REGISTRY }}/cmoa3/minio"
imagePullSecrets:
- name: "{{ PullSecret }}"
mcImage:
repository: "{{ REGISTRY }}/cmoa3/mc"
with_items:
- minio

View File

@@ -17,7 +17,14 @@
with_items:
- 01-coredns.yaml
- name: 3. helmchart install (base)
- name: 3. Change Registry Address
command: "sed -i 's/0.0.0.0/{{ REGISTRY }}/g' {{ role_path }}/files/02-base/base/charts/{{ item }}/values.yaml"
with_items:
- cortex
- rabbitmq
- redis
- name: 4. helmchart install (base)
kubernetes.core.helm:
name: "{{item}}"
release_name: "{{item}}"
@@ -27,19 +34,13 @@
release_state: present
values_files:
- "{{ role_path }}/files/02-base/{{item}}/values.yaml"
#values:
# global:
# IMXC_IN_REGISTRY: "{{ REGISTRY }}/cmoa3"
# rabbitmq:
# image:
# registry: "{{ REGISTRY }}/cmoa3"
with_items:
- base
- name: 4. Check Kubernetes Pods (base)
- name: 5. Check Kubernetes Pods (base)
command: "{{ role_path }}/files/k8s_status {{ cmoa_namespace }} alertmanage"
- name: 5. Change a Elasticsearch Service (NodePort=elasticsearch_nodePort)
- name: 6. Change a Elasticsearch Service (NodePort=elasticsearch_nodePort)
kubernetes.core.k8s:
state: present
definition:
@@ -56,7 +57,7 @@
nodePort: "{{ elasticsearch_nodePort }}"
apply: yes
- name: 6. Change a Postgres Service (NodePort=postgres_nodePort)
- name: 7. Change a Postgres Service (NodePort=postgres_nodePort)
kubernetes.core.k8s:
state: present
definition:
@@ -72,3 +73,10 @@
port: "{{ postgres_service_port }}"
nodePort: "{{ postgres_nodePort }}"
apply: yes
- name: 8. Change Registry Address - origin
command: "sed -i 's/{{ REGISTRY }}/0.0.0.0/g' {{ role_path }}/files/02-base/base/charts/{{ item }}/values.yaml"
with_items:
- cortex
- rabbitmq
- redis

View File

@@ -9,28 +9,30 @@
release_state: present
values_files:
- "{{ role_path }}/files/04-keycloak/values.yaml"
#values:
# image:
# repository: "{{ REGISTRY }}/cmoa3/keycloak"
# imagePullSecrets:
# - name: "{{ PullSecret }}"
# extraInitContainers: |
# - name: theme-provider
# image: "{{ REGISTRY }}/cmoa3/theme-provider:latest"
# imagePullPolicy: IfNotPresent
# command:
# - sh
# args:
# - -c
# - |
# echo "Copying theme ..."
# cp -R /mytheme/* /theme
# pgchecker:
# image:
# repository: "{{ REGISTRY }}/cmoa3/busybox"
#volumeMounts:
# - name: theme
# mountPath: /theme
values:
image:
repository: "{{ REGISTRY }}/cmoa3/keycloak"
imagePullSecrets:
- name: "{{ PullSecret }}"
extraInitContainers: |
- name: theme-provider
image: "{{ REGISTRY }}/cmoa3/theme-provider:latest"
imagePullPolicy: IfNotPresent
command:
- sh
args:
- -c
- |
echo "Copying theme ..."
cp -R /mytheme/* /theme
volumeMounts:
- name: theme
mountPath: /theme
pgchecker:
image:
repository: "{{ REGISTRY }}/cmoa3/busybox"
tag: 1.32
pullPolicy: Always
with_items:
- keycloak

View File

@@ -9,11 +9,11 @@
release_state: present
values_files:
- "{{ role_path }}/files/05-imxc/values.yaml"
#values:
# image:
# repository: "{{ REGISTRY }}/cmoa3/nginx"
# global:
# IMXC_IN_REGISTRY: "{{ REGISTRY }}/cmoa3"
values:
image:
repository: "{{ REGISTRY }}/cmoa3/nginx"
global:
IMXC_IN_REGISTRY: "{{ REGISTRY }}/cmoa3"
with_items:
- imxc

View File

@@ -9,11 +9,11 @@
release_state: present
values_files:
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
#values:
# image:
# repository: "{{ REGISTRY }}/cmoa3/nginx"
# global:
# IMXC_IN_REGISTRY: "{{ REGISTRY }}/cmoa3"
values:
image:
repository: "{{ REGISTRY }}/cmoa3/nginx"
global:
IMXC_IN_REGISTRY: "{{ REGISTRY }}/cmoa3"
with_items:
- imxc-ui
ignore_errors: true