Skip to content

Commit

Permalink
test: fix permissions for microk8s install
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlanigan committed Oct 7, 2024
1 parent 25643a4 commit 44b5a11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ jobs:
if: ${{ matrix.action-operator.cloud == 'lxd' }}
run: |
sudo snap install microk8s --channel=1.28-strict/stable
sudo usermod -a -G microk8s ubuntu
sudo usermod -a -G snap_microk8s $USER
sudo chown -R $USER ~/.kube
sudo microk8s.enable dns storage
sudo microk8s.enable dns local-storage
sudo -g microk8s -E microk8s status --wait-ready --timeout=600
sudo -g snap_microk8s -E microk8s status --wait-ready --timeout=600
- name: Create additional networks when testing with LXD
if: ${{ matrix.action-operator.cloud == 'lxd' }}
run: |
Expand All @@ -99,9 +100,9 @@ jobs:
- name: "Set additional environment for LXD"
if: ${{ matrix.action-operator.cloud == 'lxd' }}
run: |
echo "MICROK8S_CONFIG<<-EOT" >> $GITHUB_ENV
microk8s.config view >> $GITHUB_ENV
echo "EOT" >> $GITHUB_ENV
echo "MICROK8S_CONFIG<<EOF" >> $GITHUB_ENV
sudo microk8s.config view >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- run: go mod download
- env:
TF_ACC: "1"
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test_integration_jaas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ jobs:
- name: Setup microk8s for juju_kubernetes_cloud test
run: |
sudo snap install microk8s --channel=1.28-strict/stable
sudo usermod -a -G microk8s ubuntu
sudo usermod -a -G snap_microk8s $USER
sudo chown -R $USER ~/.kube
sudo microk8s.enable dns storage
sudo microk8s.enable dns local-storage
sudo -g microk8s -E microk8s status --wait-ready --timeout=600
echo "MICROK8S_CONFIG<<-EOT" >> $GITHUB_ENV
microk8s.config view >> $GITHUB_ENV
echo "EOT" >> $GITHUB_ENV
sudo -g snap_microk8s -E microk8s status --wait-ready --timeout=600
echo "MICROK8S_CONFIG<<EOF" >> $GITHUB_ENV
sudo microk8s.config view >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create additional networks when testing with LXD
run: |
sudo lxc network create management-br ipv4.address=10.150.40.1/24 ipv4.nat=true ipv6.address=none ipv6.nat=false
Expand Down

0 comments on commit 44b5a11

Please sign in to comment.