Skip to content

Commit

Permalink
cleaning up bundle overrides, config pt.1
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Jul 2, 2024
1 parent 7de6ef2 commit c62e763
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
5 changes: 2 additions & 3 deletions bundles/dev/local-path-core/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ packages:
- name: BUCKET_PERSISTENCE_SIZE
description: "Size of the default PVC for MinIO (e.g., 30Gi)"
path: persistence.size
default: "30Gi"

- name: uds-rke2-infrastructure
description: "Deploys the UDS RKE2 base infrastructure Zarf package"
Expand All @@ -43,8 +42,8 @@ packages:
loki:
values:
# Set DNS service name for Loki Gateway
- path: "global.dnsService"
value: "rke2-coredns-rke2-coredns"
- path: global.dnsService
value: rke2-coredns-rke2-coredns
# Ensure we don't hit query limits
- path: loki.limits_config.split_queries_by_interval
value: "30m"
Expand Down
8 changes: 3 additions & 5 deletions bundles/dev/local-path-core/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ variables:
join_token: $JOIN_TOKEN

uds-rke2-infrastructure:
interface: $INTERFACE
address_pool_lower_bound: $ADDRESS_POOL_LOWER_BOUND
address_pool_upper_bound: $ADDRESS_POOL_UPPER_BOUND
base_ip: $BASE_IP
network_interface: $NETWORK_INTERFACE

local-path-init:
# Workaround for SELinux EBS issue - https://github.com/bottlerocket-os/bottlerocket/issues/2417
Expand All @@ -24,7 +21,8 @@ variables:
registry_pvc_access_mode: ReadWriteOnce
storage_configuration_values_file: values/storage-configuration-values.yaml

bucket_persistence_size: $BUCKET_PERSISTENCE_SIZE
# MinIO bucket persistence volume size
bucket_persistence_size: 50Gi

uds-core:
loki_s3_endpoint: http://minio.minio.svc.cluster.local:9000
Expand Down
5 changes: 1 addition & 4 deletions bundles/latest/local-path-core/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ variables:
join_token: $JOIN_TOKEN

uds-rke2-infrastructure:
interface: $INTERFACE
address_pool_lower_bound: $ADDRESS_POOL_LOWER_BOUND
address_pool_upper_bound: $ADDRESS_POOL_UPPER_BOUND
base_ip: $BASE_IP
network_interface: $NETWORK_INTERFACE

local-path-init:
# Workaround for SELinux EBS issue - https://github.com/bottlerocket-os/bottlerocket/issues/2417
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ipAddressPool:
ipAddressPool:
- ###ZARF_VAR_BASE_IP###.###ZARF_VAR_ADDRESS_POOL_LOWER_BOUND###-###ZARF_VAR_BASE_IP###.###ZARF_VAR_ADDRESS_POOL_UPPER_BOUND###

interface:
- ###ZARF_VAR_INTERFACE###
interface:
- ###ZARF_VAR_NETWORK_INTERFACE###
5 changes: 2 additions & 3 deletions packages/uds-rke2/infrastructure/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ metadata:
version: "###ZARF_PKG_TMPL_VERSION###"

variables:
- name: INTERFACE
- name: NETWORK_INTERFACE
description: "The network interface name on which to perform MetalLB L2 advertisement"
default: "wlp0s20f3"
prompt: true
- name: ADDRESS_POOL_LOWER_BOUND
description: "Lower bound of the IP Address Pool range for L2 advertisement"
default: "200"
prompt: false
- name: ADDRESS_POOL_UPPER_BOUND
description: "Upper bound of the IP Address Pool range for L2 advertisement"
default: "215"
default: "202"
prompt: false
- name: BASE_IP
description: "The host node's base IP"
Expand Down
3 changes: 3 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ variables:
- name: JOIN_TOKEN
description: "Cluster join token for nodes, set by the master"
default: "my-test-token"
- name: NETWORK_INTERFACE
description: "Interface on which to perform L2 advertisement"
default: "wlp0s20f3"

tasks:
####################
Expand Down
17 changes: 15 additions & 2 deletions tasks/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ variables:
- name: JOIN_TOKEN
description: "Cluster join token for nodes, set by the master"
default: "my-test-token"
- name: NETWORK_INTERFACE
description: "Interface on which to perform L2 advertisement"
default: "wlp0s20f3"

- name: DEPLOY_OPTIONS
description: "Extra Zarf package deployment options"
Expand All @@ -37,11 +40,15 @@ tasks:
description: "Optional components to deploy"
required: false
default: ""
extraOptions:
description: "Extra deployment options specific to the Zarf Init package's configuration"
required: false
actions:
- description: "Deploy the Zarf package for amd64 architectures"
cmd: |
sudo uds zarf package deploy "${{ .inputs.path }}/zarf-package-${{ .inputs.name }}-amd64-${VERSION}.tar.zst" \
${{ .inputs.optionalComponents }} \
${{ .inputs.extraOptions }} \
${DEPLOY_OPTIONS}
- name: bundle
Expand All @@ -59,16 +66,18 @@ tasks:
version:
description: "UDS bundle version to be deployed"
required: true
default: ${VERSION}
joinToken:
description: "Cluster join token for nodes, set by the master"
required: true
default: ${JOIN_TOKEN}
networkInterface:
description: "Interface on which to perform L2 advertisement"
required: true
actions:
- description: "Deploy the UDS bundle for the amd64 architectures"
cmd: |
sudo UDS_CONFIG=${{ .inputs.udsConfig }} uds deploy "${{ .inputs.path }}/uds-bundle-${{ .inputs.name }}-amd64-${{ .inputs.version }}.tar.zst" \
--set JOIN_TOKEN=${{ .inputs.joinToken }} \
--set NETWORK_INTERFACE=${{ .inputs.networkInterface }} \
${DEPLOY_BUNDLE_OPTIONS}
#########
Expand All @@ -85,6 +94,7 @@ tasks:
udsConfig: "bundles/latest/local-path-core/uds-config.yaml"
version: ${VERSION}
joinToken: ${JOIN_TOKEN}
networkInterface: ${NETWORK_INTERFACE}

- name: local-path-core-bundle-dev
description: "Deploy the Local Path Provisioner UDS RKE2 bootstrapping bundle"
Expand All @@ -96,6 +106,7 @@ tasks:
udsConfig: "bundles/dev/local-path-core/uds-config.yaml"
version: dev
joinToken: ${JOIN_TOKEN}
networkInterface: ${NETWORK_INTERFACE}

###################
# STANDARD PACKAGES
Expand Down Expand Up @@ -154,6 +165,8 @@ tasks:
with:
path: build/packages
name: infrastructure
# Interface on which to perform L2 advertisement
extraOptions: "--set NETWORK_INTERFACE=${NETWORK_INTERFACE}"

- name: uds-rke2-exemptions-local-path
description: "Deploy the UDS RKE2 service Pepr policy exemptions package"
Expand Down

0 comments on commit c62e763

Please sign in to comment.