Skip to content

Commit

Permalink
microshift: Use config.d directory for drop-in config directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
praveenkumar committed Jan 31, 2025
1 parent a890014 commit 541baac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 15 additions & 0 deletions 00-microshift-dns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dns:
# baseDomain is the base domain of the cluster. All managed DNS records will
# be sub-domains of this base.


# For example, given the base domain `example.com`, router exposed
# domains will be formed as `*.apps.example.com` by default,
# and API service will have a DNS entry for `api.example.com`,
# as well as "api-int.example.com" for internal k8s API access.


# Once set, this field cannot be changed.
# example:
# microshift.example.com
baseDomain: example.com
9 changes: 4 additions & 5 deletions createdisk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ EOF
# also in case of microshift the ports like 2222, 443, 80 ..etc need to be manually added
# and OCP/OKD/podman bundles have it disabled by default.
${SSH} core@${VM_IP} -- sudo systemctl disable firewalld
${SSH} core@${VM_IP} -- cat /etc/microshift/config.yaml.default > config.yaml
${YQ} eval --inplace ".dns.baseDomain = \"${SNC_PRODUCT_NAME}.${BASE_DOMAIN}\"" config.yaml
${SCP} config.yaml core@${VM_IP}:/home/core
${SSH} core@${VM_IP} -- 'sudo mv /home/core/config.yaml /etc/microshift/config.yaml'
${YQ} eval --inplace ".dns.baseDomain = \"${SNC_PRODUCT_NAME}.${BASE_DOMAIN}\"" 00-microshift-dns.yaml
${SCP} 00-microshift-dns.yaml core@${VM_IP}:/home/core
${SSH} core@${VM_IP} -- 'sudo mv /home/core/00-microshift-dns.yaml /etc/microshift/config.d/00-microshift-dns.yaml'
# Make sure `baseDomain` is set to crc.testing
${SSH} core@${VM_IP} -- "grep '^\s\+baseDomain: ${SNC_PRODUCT_NAME}.${BASE_DOMAIN}' /etc/microshift/config.yaml"
${SSH} core@${VM_IP} -- "grep '^\s\+baseDomain: ${SNC_PRODUCT_NAME}.${BASE_DOMAIN}' /etc/microshift/config.d/00-microshift-dns.yaml"
# Remove the lvm system.device file since it have diskID and deviceName which changes
# for different hypervisor and as per `man lvmdevices` if the file does not exist, or if lvm.conf
# includes use_devicesfile=0, then lvm will not use a devices file.
Expand Down

0 comments on commit 541baac

Please sign in to comment.