-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
928 changed files
with
387,170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version = 1 | ||
|
||
[merge] | ||
method = "squash" # default: "merge" | ||
delete_branch_on_merge = true # default: false | ||
optimistic_updates = true # default: true | ||
prioritize_ready_to_merge = true # default: false | ||
|
||
[merge.message] | ||
title = "pull_request_title" # default: "github_default" | ||
body = "github_default" # default: "github_default" | ||
strip_html_comments = true # default: false | ||
|
||
[update] | ||
always = true # default: false | ||
|
||
[approve] | ||
auto_approve_usernames = ["1gtm", "tamalsaha"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.22' | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Prepare Host | ||
run: | | ||
sudo apt-get -qq update || true | ||
sudo apt-get install -y bzr | ||
# install yq | ||
curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 | ||
chmod +x yqq | ||
sudo mv yqq /usr/local/bin/yqq | ||
pip3 install yq | ||
# install kubectl | ||
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/amd64/kubectl | ||
chmod +x ./kubectl | ||
sudo mv ./kubectl /usr/local/bin/kubectl | ||
- name: Run checks | ||
run: | | ||
make ci | ||
kubernetes: | ||
name: Kubernetes | ||
runs-on: ubuntu-20.04 | ||
needs: build | ||
strategy: | ||
matrix: | ||
k8s: [v1.21.14, v1.22.17, v1.23.17, v1.24.12, v1.25.8, v1.26.3, v1.27.1, v1.28.0, v1.29.0] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Install yq | ||
run: | | ||
curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 | ||
chmod +x yqq | ||
sudo mv yqq /usr/local/bin/yqq | ||
- name: Create Kubernetes ${{ matrix.k8s }} cluster | ||
id: kind | ||
uses: engineerd/[email protected] | ||
with: | ||
version: v0.17.0 | ||
config: hack/kubernetes/kind.yaml | ||
image: kindest/node:${{ matrix.k8s }} | ||
|
||
- name: Prepare cluster for testing | ||
id: local-path | ||
env: | ||
USERNAME: 1gtm | ||
REGISTRY_SECRET: regcred | ||
run: | | ||
echo "waiting for nodes to be ready ..." | ||
kubectl wait --for=condition=Ready nodes --all --timeout=5m | ||
kubectl get nodes | ||
echo | ||
echo "install helm 3" | ||
pushd /usr/local/bin && sudo curl -fsSLO https://github.com/x-helm/helm/releases/latest/download/helm && sudo chmod +x helm && popd | ||
- name: Issue License | ||
env: | ||
BYTEBUILDERS_LICENSE_TOKEN: ${{ secrets.BYTEBUILDERS_LICENSE_TOKEN }} | ||
THIS_IS_NATS_PASSWORD: ${{ secrets.THIS_IS_NATS_PASSWORD }} | ||
run: | | ||
export KUBECONFIG="${HOME}/.kube/config" | ||
CLUSTER_UID=$(kubectl get ns kube-system -o=jsonpath='{.metadata.uid}') | ||
echo "issuing license" | ||
LICENSE_KEY=$(curl -X POST -d "name=1gtm&[email protected]&product=platform-enterprise&cluster=${CLUSTER_UID}&tos=true&token=${BYTEBUILDERS_LICENSE_TOKEN}" https://license-issuer.appscode.com/issue-license) | ||
# ref: https://github.com/mikefarah/yq/issues/230#issuecomment-487458629 | ||
yqq w -i ./charts/panopticon/ci/ci-values.yaml license --tag '!!str' -- "${LICENSE_KEY}" | ||
yqq w -i ./charts/scanner/ci/ci-values.yaml license --tag '!!str' -- "${LICENSE_KEY}" | ||
yqq w -i ./charts/scanner/ci/ci-values.yaml nats.auth.password --tag '!!str' -- "${THIS_IS_NATS_PASSWORD}" | ||
# configure cluster-connector | ||
yqq w -i ./charts/cluster-connector/ci/ci-values.yaml user.token --tag '!!str' -- "${BYTEBUILDERS_LICENSE_TOKEN}" | ||
# config-syncer | ||
LICENSE_KEY=$(curl -X POST -d "name=1gtm&[email protected]&product=config-syncer-enterprise&cluster=${CLUSTER_UID}&tos=true&token=${BYTEBUILDERS_LICENSE_TOKEN}" https://license-issuer.appscode.com/issue-license) | ||
yqq w -i ./charts/config-syncer/ci/ci-values.yaml license --tag '!!str' -- "${LICENSE_KEY}" | ||
- name: Install cert-manager | ||
run: | | ||
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml | ||
- name: Test charts | ||
run: | | ||
export KUBECONFIG="${HOME}/.kube/config" | ||
./hack/scripts/ct.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: OCI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*.*" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-oci | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to the GitHub Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: 1gtm | ||
password: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
|
||
- name: Install Helm 3 | ||
run: | | ||
pushd /usr/local/bin && sudo curl -fsSLO https://github.com/x-helm/helm/releases/latest/download/helm && sudo chmod +x helm && popd | ||
- name: Clone charts repository | ||
env: | ||
GITHUB_USER: 1gtm | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
CHART_REPOSITORY: github.com/appscode/charts | ||
run: | | ||
url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${CHART_REPOSITORY}.git" | ||
cd $RUNNER_WORKSPACE | ||
git clone $url | ||
cd $(basename $CHART_REPOSITORY) | ||
git config user.name "${GITHUB_USER}" | ||
git config user.email "${GITHUB_USER}@appscode.com" | ||
- name: Publish OCI charts | ||
env: | ||
GITHUB_USER: 1gtm | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
CHART_REPOSITORY: github.com/appscode/charts | ||
run: | | ||
export REGISTRY_0=oci://ghcr.io/appscode-charts | ||
$RUNNER_WORKSPACE/$(basename $CHART_REPOSITORY)/hack/scripts/publish-oci-charts.sh $(pwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: release-tracker | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Prepare git | ||
env: | ||
GITHUB_USER: 1gtm | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.name "${GITHUB_USER}" | ||
git config --global user.email "${GITHUB_USER}@appscode.com" | ||
git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
- name: Install GitHub CLI | ||
run: | | ||
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 | ||
sudo mv bin/hub /usr/local/bin | ||
- name: Update release tracker | ||
if: | | ||
github.event.action == 'closed' && | ||
github.event.pull_request.merged == true | ||
env: | ||
GITHUB_USER: 1gtm | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
run: | | ||
./hack/scripts/update-release-tracker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*.*" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-release | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install GitHub CLI | ||
run: | | ||
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 | ||
sudo mv bin/hub /usr/local/bin | ||
- name: Install Helm 3 | ||
run: | | ||
pushd /usr/local/bin && sudo curl -fsSLO https://github.com/x-helm/helm/releases/latest/download/helm && sudo chmod +x helm && popd | ||
- name: Clone charts repository | ||
env: | ||
GITHUB_USER: 1gtm | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
CHART_REPOSITORY: ${{ secrets.CHART_REPOSITORY }} | ||
run: | | ||
url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${CHART_REPOSITORY}.git" | ||
cd $RUNNER_WORKSPACE | ||
git clone $url | ||
cd $(basename $CHART_REPOSITORY) | ||
git config user.name "${GITHUB_USER}" | ||
git config user.email "${GITHUB_USER}@appscode.com" | ||
- name: Package | ||
env: | ||
GITHUB_USER: 1gtm | ||
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }} | ||
CHART_REPOSITORY: ${{ secrets.CHART_REPOSITORY }} | ||
run: | | ||
cd $RUNNER_WORKSPACE/$(basename $CHART_REPOSITORY) | ||
GIT_TAG=${GITHUB_REF#"refs/tags/"} | ||
if [[ $GIT_TAG =~ "-alpha." ]] || [[ $GIT_TAG =~ "-beta." ]]; then | ||
export REPO_DIR=testing | ||
fi | ||
./hack/scripts/open-pr.sh $GITHUB_WORKSPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
|
||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
*.prof | ||
|
||
**/.env | ||
**/junit.xml | ||
/.idea | ||
/.vscode | ||
/apiserver.local.config | ||
/coverage.txt | ||
/dist | ||
|
||
/bin | ||
/.go | ||
/.crds | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Developer Certificate of Origin | ||
Version 1.1 | ||
|
||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. | ||
660 York Street, Suite 102, | ||
San Francisco, CA 94110 USA | ||
|
||
Everyone is permitted to copy and distribute verbatim copies of this | ||
license document, but changing it is not allowed. | ||
|
||
|
||
Developer's Certificate of Origin 1.1 | ||
|
||
By making a contribution to this project, I certify that: | ||
|
||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
|
||
(b) The contribution is based upon previous work that, to the best | ||
of my knowledge, is covered under an appropriate open source | ||
license and I have the right under that license to submit that | ||
work with modifications, whether created in whole or in part | ||
by me, under the same open source license (unless I am | ||
permitted to submit under a different license), as indicated | ||
in the file; or | ||
|
||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
|
||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including all | ||
personal information I submit with it, including my sign-off) is | ||
maintained indefinitely and may be redistributed consistent with | ||
this project or the open source license(s) involved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## License | ||
|
||
Source code in this repository, Binaries, Docker images and Charts produced by the build process are licensed under the AppsCode Community License 1.0.0. You may obtain a copy of the License at | ||
|
||
- [AppsCode-Community-1.0.0](https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md) |
Oops, something went wrong.