Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
gadinaor committed Oct 21, 2020
0 parents commit 9828301
Show file tree
Hide file tree
Showing 91 changed files with 19,680 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Report a bug encountered
title: ''
labels: kind/bug
assignees: ''

---

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:
- Kubernetes version (use `kubectl version`):
- Cloud provider or configuration:
- Install tools:
- Others:
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Enhancement Request
about: Suggest an enhancement
title: ''
labels: kind/enhancement
assignees: ''

---
**What would you like to be added**:

**Why is this needed**:
76 changes: 76 additions & 0 deletions .github/workflows/k8s_versions_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Test Matrix Alcide iSKan

on: [workflow_dispatch]

jobs:
scan-tests:
name: Alcide iSKan on Kubernetes ${{ matrix.config.kubever }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# https://github.com/kubernetes-sigs/kind/releases
config:
- kubever: v1.13.12
# - kubever: v1.14.10
# - kubever: v1.15.12
# - kubever: v1.16.15
# - kubever: v1.17.11
# - kubever: v1.18.8
# - kubever: v1.19.1

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Launch Cluster
uses: helm/kind-action@v1.0.0
with:
version: v0.9.0
cluster_name: iskan
node_image: kindest/node:${{ matrix.config.kubever }}
wait: 5m

- name: Check Cluster
run: |
kubectl cluster-info
kubectl get storageclass standard
- name: E2E
env:
E2E_PIPELINE: ${{ secrets.E2E_PIPELINE }}
E2E_GCR_PULLSECRET: ${{ secrets.E2E_GCR_PULLSECRET }}
E2E_API_CONFIG: ${{ secrets.E2E_API_CONFIG }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AZURE_ACR_SP_USER: ${{ secrets.AZURE_ACR_SP_USER }}
AZURE_ACR_SP_PASS: ${{ secrets.AZURE_ACR_SP_PASS }}
run: |
make e2e
- name: Build iSKan
run: |
make build
echo "running a scan and saving the report" && ./bin/iskan cluster -f json -o report.json
cp report.json iskan-${{ matrix.config.kubever }}.json
- name: Upload iSKan Report
uses: actions/upload-artifact@v1
with:
name: 'iskan-${{ matrix.config.kubever }}.json'
path: 'iskan-${{ matrix.config.kubever }}.json'

- name: Scan Local Cluster
uses: alcideio/advisor-action@v1.1.0
with:
exclude_namespaces: '-'
include_namespaces: '*'
output_file: 'advisor-scan-${{ matrix.config.kubever }}.html'

- name: Upload Alcide Advisor Scan Report
uses: actions/upload-artifact@v1
with:
name: 'advisor-scan-${{ matrix.config.kubever }}.html'
path: 'advisor-scan-${{ matrix.config.kubever }}.html'

50 changes: 50 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Pull Request
on: [pull_request]

jobs:
pull-request-hygiene:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Launch Cluster
uses: helm/kind-action@v1.0.0
with:
version: v0.9.0
cluster_name: iskan
node_image: kindest/node:${{ matrix.config.kubever }}
wait: 5m

- name: Coverage
run: |
make coverage
- name: Upload Coverage Report
uses: actions/upload-artifact@v1
with:
name: 'coverage report (html)'
path: 'coverage.html'

- name: E2E
env:
E2E_PIPELINE: ${{ secrets.E2E_PIPELINE }}
E2E_GCR_PULLSECRET: ${{ secrets.E2E_GCR_PULLSECRET }}
E2E_API_CONFIG: ${{ secrets.E2E_API_CONFIG }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AZURE_ACR_SP_USER: ${{ secrets.AZURE_ACR_SP_USER }}
AZURE_ACR_SP_PASS: ${{ secrets.AZURE_ACR_SP_PASS }}
run: |
make e2e
- name: Build
run: |
make get-bins
make gorelease-snapshot
49 changes: 49 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Launch Cluster
uses: helm/kind-action@v1.0.0
with:
version: v0.9.0
cluster_name: iskan
node_image: kindest/node:v1.19.1
wait: 5m

- name: E2E
env:
E2E_PIPELINE: ${{ secrets.E2E_PIPELINE }}
E2E_GCR_PULLSECRET: ${{ secrets.E2E_GCR_PULLSECRET }}
E2E_API_CONFIG: ${{ secrets.E2E_API_CONFIG }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AZURE_ACR_SP_USER: ${{ secrets.AZURE_ACR_SP_USER }}
AZURE_ACR_SP_PASS: ${{ secrets.AZURE_ACR_SP_PASS }}
run: |
make e2e
- name: Build & Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALCIDE_DOCKER_HUB_TOKEN: ${{ secrets.ALCIDE_DOCKER_HUB_TOKEN }}
run: |
docker login --username alcide --password=$ALCIDE_DOCKER_HUB_TOKEN
make get-bins
make gorelease
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

.idea/

# Dependency directories (remove the comment below to include it)
vendor/
bin/
dist/
artifacts/

*coverage.*

config-example.yaml
report-filter.yaml
e2e/images/*/build.txt
creds.sh

Loading

0 comments on commit 9828301

Please sign in to comment.