Skip to content

Commit

Permalink
feat: added one additional ip range to metallb (#134)
Browse files Browse the repository at this point in the history
* feat: added one additional ip range to metallb

* feat: introduced input parameters ip-range-start ip-range-end to add load balancer range

* fix: added default values to inputs ip-range-start and ip-range-end
  • Loading branch information
bencekov authored Dec 8, 2023
1 parent 0e503f9 commit ec142ce
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/_charm-quality-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ on:
type: string
description: "The provider to choose for either machine or k8s tests ('lxd' or 'microk8s')"
required: true
ip-range-start:
type: string
description: "The first IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
ip-range-end:
type: string
description: "The last IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
secrets:
CHARMHUB_TOKEN:
required: false
Expand Down Expand Up @@ -79,6 +89,8 @@ jobs:
with:
charm-path: "${{ inputs.charm-path }}"
provider: "${{ inputs.provider }}"
ip-range-start: ${{ inputs.ip-range-start }}
ip-range-end: ${{ inputs.ip-range-end }}
codeql:
name: CodeQL analysis
needs:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/_charm-tests-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ on:
type: string
description: "The provider to choose for either machine or k8s tests ('lxd' or 'microk8s')"
required: true
ip-range-start:
type: string
description: "The first IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
ip-range-end:
type: string
description: "The last IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"

# Default to bash
defaults:
Expand All @@ -35,14 +45,15 @@ jobs:
juju-channel: 3.1/edge
provider: lxd
- name: Setup operator environment (k8s)
if: inputs.provider == 'microk8s'
if: |
inputs.provider == 'microk8s'
uses: charmed-kubernetes/actions-operator@main
with:
juju-channel: 3.1/edge
provider: microk8s
channel: 1.26-strict/stable
microk8s-group: snap_microk8s
microk8s-addons: "hostpath-storage dns metallb:${{ env.IPADDR }}-${{ env.IPADDR }}"
microk8s-addons: "hostpath-storage dns metallb:${{ inputs.ip-range-start }}-${{ inputs.ip-range-end }}"
- name: Run integration tests
run: cd ${{ inputs.charm-path }} && tox -vve integration
- name: Dump debug log
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/charm-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ on:
default: 'microk8s'
required: false
type: string
ip-range-start:
type: string
description: "The first IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
ip-range-end:
type: string
description: "The last IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
secrets:
CHARMHUB_TOKEN:
required: false
Expand Down Expand Up @@ -60,3 +70,5 @@ jobs:
with:
charm-path: ${{ inputs.charm-path }}
provider: ${{ inputs.provider }}
ip-range-start: ${{ inputs.ip-range-start }}
ip-range-end: ${{ inputs.ip-range-end }}
12 changes: 12 additions & 0 deletions .github/workflows/charm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ on:
default: 'microk8s'
required: false
type: string
ip-range-start:
type: string
description: "The first IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
ip-range-end:
type: string
description: "The last IP address in the address pool for the load balancer to use"
required: false
default: "{{ env.IPADDR }}"
secrets:
CHARMHUB_TOKEN:
required: true
Expand All @@ -36,6 +46,8 @@ jobs:
with:
charm-path: "${{ inputs.charm-path }}"
provider: "${{ inputs.provider }}"
ip-range-start: ${{ inputs.ip-range-start }}
ip-range-end: ${{ inputs.ip-range-end }}
release-charm:
name: Release Charm and Libraries
needs:
Expand Down

0 comments on commit ec142ce

Please sign in to comment.