Skip to content

Update action to accomodate Kubernetes and test scenario in kubernetes #425

@NyakudyaA

Description

@NyakudyaA

Feature description

All the scenario tests https://github.com/kartoza/docker-postgis/tree/develop/scenario_tests use docker-compose. This image is also being used in Kubernetes environments and it is important to test these scenarios in either minikube or Kubernetes.

Additional context

We need to update to something like

- name: Install kube-tools
      uses: superbrothers/setup-kube-tools@v1.2.0

    - name: Start local Kubernetes cluster or minikube
      if: runner.os == 'Linux'
      run: |
        sudo kubeadm init
        mkdir -p $HOME/.kube
        sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
        sudo chown $(id -u):$(id -g) $HOME/.kube/config
        sudo kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

    - name: Start minikube
      if: runner.os == 'Windows'
      run: |
        choco install minikube
        minikube start

    - name: Deploy kartoza/postgis image
      run: |
        kubectl create deployment postgis --image=kartoza/postgis:latest
        kubectl expose deployment postgis --port=5432 --type=LoadBalancer

    - name: Wait for deployment to be ready
      run: |
        kubectl rollout status deployment/postgis

@tharanathkartoza What is the best option in creating a deployment file to test the deployment and the scenario test. Ideally we need to convert the example https://github.com/kartoza/docker-postgis/blob/develop/scenario_tests/init_scripts/docker-compose.yml

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions