Skip to content

Commit 8cac863

Browse files
committed
microshift: Use config.d directory for drop-in config directory
As per doc https://github.com/openshift/microshift/blob/main/docs/user/howto_config.md#drop-in-configuration-directory it is better to use the drop in configuration directory then changing the default one.
1 parent 609bd40 commit 8cac863

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

00-microshift-dns.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dns:
2+
# baseDomain is the base domain of the cluster. All managed DNS records will
3+
# be sub-domains of this base.
4+
5+
6+
# For example, given the base domain `example.com`, router exposed
7+
# domains will be formed as `*.apps.example.com` by default,
8+
# and API service will have a DNS entry for `api.example.com`,
9+
# as well as "api-int.example.com" for internal k8s API access.
10+
11+
12+
# Once set, this field cannot be changed.
13+
# example:
14+
# microshift.example.com
15+
baseDomain: example.com

createdisk.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ EOF
7272
# also in case of microshift the ports like 2222, 443, 80 ..etc need to be manually added
7373
# and OCP/OKD/podman bundles have it disabled by default.
7474
${SSH} core@${VM_IP} -- sudo systemctl disable firewalld
75-
${SSH} core@${VM_IP} -- cat /etc/microshift/config.yaml.default > config.yaml
76-
${YQ} eval --inplace ".dns.baseDomain = \"${SNC_PRODUCT_NAME}.${BASE_DOMAIN}\"" config.yaml
77-
${SCP} config.yaml core@${VM_IP}:/home/core
78-
${SSH} core@${VM_IP} -- 'sudo mv /home/core/config.yaml /etc/microshift/config.yaml'
75+
${YQ} eval --inplace ".dns.baseDomain = \"${SNC_PRODUCT_NAME}.${BASE_DOMAIN}\"" 00-microshift-dns.yaml
76+
${SCP} 00-microshift-dns.yaml core@${VM_IP}:/home/core
77+
${SSH} core@${VM_IP} -- 'sudo mv /home/core/00-microshift-dns.yaml /etc/microshift/config.d/00-microshift-dns.yaml'
7978
# Make sure `baseDomain` is set to crc.testing
80-
${SSH} core@${VM_IP} -- "grep '^\s\+baseDomain: ${SNC_PRODUCT_NAME}.${BASE_DOMAIN}' /etc/microshift/config.yaml"
79+
${SSH} core@${VM_IP} -- "grep '^\s\+baseDomain: ${SNC_PRODUCT_NAME}.${BASE_DOMAIN}' /etc/microshift/config.d/00-microshift-dns.yaml"
8180
# Remove the lvm system.device file since it have diskID and deviceName which changes
8281
# for different hypervisor and as per `man lvmdevices` if the file does not exist, or if lvm.conf
8382
# includes use_devicesfile=0, then lvm will not use a devices file.

0 commit comments

Comments
 (0)