Skip to content

Implement podman rootless and rootful #154

Implement podman rootless and rootful

Implement podman rootless and rootful #154

Workflow file for this run

---
name: Pull Request Test
on:
push:
workflow_dispatch:
pull_request:
jobs:
install-requirements:
name: Test installation of the project requirements
runs-on: ubuntu-latest
strategy:
matrix:
python: [ 3.11 ]
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install python requirements
run: |
pip install -r requirements.txt
pip install -r molecule/requirements.txt
ansible-galaxy collection install -r collections/requirements.yml --upgrade
- name: Print configuration versions
run: |
pip freeze
ansible-galaxy collection list
# - name: Run role tests
# run: |
# molecule test --scenario-name github
kind-test-docker:
name: Test Kind Deployment on Docker
runs-on: ${{ matrix.os }}
strategy:
matrix:
kind_version: [v0.22.0]
os: [ubuntu-latest,macos-13]
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Deploy kind
run: |
curl -Lo ./kind/kind https://kind.sigs.k8s.io/dl/${{ matrix.kind_version }}/kind-linux-amd64
chmod 755 kind
./kind/registry.sh install --registry-name kind-registry.local
./kind/kind.sh install --registry-name kind-registry.local
- name: Check that ingress is available
run: |
set +e
CURL_EXIT_CODE=$(curl -o /dev/null -s -w "%{exitcode}\n" http://localhost)
if [ ! "${CURL_EXIT_CODE}" == '0' ]; then
echo "Exit code should have been 0 but it was ${CURL_EXIT_CODE}."
curl -o /dev/null -s -w "%{http_code}\n" http://localhost
curl -o /dev/null -s -w "%{exitcode}\n" http://localhost
exit 1
fi
kind-test-podman-rootless:
name: Test Kind Deployment on Podman with Rootless Containers
runs-on: ${{ matrix.os }}
strategy:
matrix:
kind_version: [v0.22.0]
os: [ubuntu-latest,macos-13]
steps:
- name: Setup Podman
run: |
sudo apt update
sudo apt-get -y install podman
- name: Checkout project
uses: actions/checkout@v3
- name: Deploy kind
run: |
curl -Lo ./kind/kind https://kind.sigs.k8s.io/dl/${{ matrix.kind_version }}/kind-linux-amd64
chmod 755 kind
./kind/registry.sh install --registry-name kind-registry.local --provider podman --rootless
./kind/kind.sh install --registry-name kind-registry.local --provider podman --rootless
- name: Check that ingress is available
run: |
set +e
CURL_EXIT_CODE=$(curl -o /dev/null -s -w "%{exitcode}\n" http://localhost:30080/)
if [ ! "${CURL_EXIT_CODE}" == '0' ]; then
echo "Exit code should have been 0 but it was ${CURL_EXIT_CODE}."
curl -o /dev/null -s -w "%{http_code}\n" http://localhost:30080
curl -o /dev/null -s -w "%{exitcode}\n" http://localhost:30080
echo "Not going to fail as rootless containers still don't work with podman."
exit 0
else
echo "If rootless containers now work must review this workflow."
exit 1
fi
kind-test-podman-rootful:
name: Test Kind Deployment on Podman with Rootful Containers
runs-on: ${{ matrix.os }}
strategy:
matrix:
kind_version: [v0.22.0]
os: [ubuntu-latest,macos-13]
steps:
- name: Setup Podman
run: |
sudo apt update
sudo apt-get -y install podman
- name: Checkout project
uses: actions/checkout@v3
- name: Deploy kind
run: |
curl -Lo ./kind/kind https://kind.sigs.k8s.io/dl/${{ matrix.kind_version }}/kind-linux-amd64
chmod 755 kind
./kind/registry.sh install --registry-name kind-registry.local --provider podman
./kind/kind.sh install --registry-name kind-registry.local --provider podman
- name: Check that ingress is available
run: |
set +e
CURL_EXIT_CODE=$(curl -o /dev/null -s -w "%{exitcode}\n" http://localhost)
if [ ! "${CURL_EXIT_CODE}" == '0' ]; then
echo "Exit code should have been 0 but it was ${CURL_EXIT_CODE}."
curl -o /dev/null -s -w "%{http_code}\n" http://localhost
curl -o /dev/null -s -w "%{exitcode}\n" http://localhost
exit 1
fi
...