diff --git a/README.md b/README.md index 9a9ff04..e1a551e 100644 --- a/README.md +++ b/README.md @@ -41,5 +41,4 @@ To see an example of this Action in use, check out the [self test](./.github/wor ## Roadmap -- Use https://github.com/helm/kind-action - Add signing of VEX documents diff --git a/action.yml b/action.yml index 56769d5..c7a8be9 100644 --- a/action.yml +++ b/action.yml @@ -18,7 +18,15 @@ inputs: runs: using: "composite" steps: - - name: "Setup" + - name: Create k8s Kind Cluster + uses: helm/kind-action@v1 + + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: v3.15.0 + + - name: "Setup Kubescape" run: $GITHUB_ACTION_PATH/setup.sh shell: bash diff --git a/setup.sh b/setup.sh index ee96518..51593a0 100755 --- a/setup.sh +++ b/setup.sh @@ -1,17 +1,6 @@ #!/usr/bin/env bash set -x -# Install kind and kubectl -curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-$(uname)-amd64 -chmod +x ./kind -./kind create cluster -curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.21.0/bin/linux/amd64/kubectl -chmod +x ./kubectl -sudo mv ./kubectl /usr/local/bin/kubectl -# Install helm -curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 -chmod 700 get_helm.sh -sudo ./get_helm.sh # Install Kubescape helm repo add kubescape https://kubescape.github.io/helm-charts/ helm repo update @@ -22,8 +11,8 @@ helm upgrade --install kubescape kubescape/kubescape-operator -n kubescape --cre --set nodeAgent.config.updatePeriod=1m \ --set logger.level=debug \ --wait -# Wait for the pod to be ready +# Wait for the pods to be ready sleep 5 kubectl -n kubescape wait --for=condition=ready pod -l app.kubernetes.io/name=node-agent --timeout=300s kubectl -n kubescape wait --for=condition=ready pod -l app.kubernetes.io/name=storage --timeout=300s -echo "Kubescape is ready" \ No newline at end of file +echo "Kubescape is ready"