generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAP Operator: Initial open source version created
Initial Open Source version Change-Id: I51258701067d3b05b9a79dbff0d37101c2dac1e8
- Loading branch information
Showing
461 changed files
with
50,213 additions
and
62 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,4 @@ | ||
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Ignore build and test binaries. | ||
bin/ | ||
testbin/ |
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,32 @@ | ||
name: Go (Build & Unit test) | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.21 | ||
cache: true | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Build all relevant packages | ||
run: CGO_ENABLED=0 go build -v ./cmd/... | ||
|
||
- name: Test relevant packages | ||
run: CGO_ENABLED=0 go test -v ./... |
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,79 @@ | ||
name: Publish Website | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- website/** | ||
- .github/workflows/publish-website.yaml | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.21 | ||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: "0.115.2" | ||
extended: true | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
- name: Update dependencies | ||
run: | | ||
cd website | ||
npm ci | ||
- name: Build with Hugo | ||
env: | ||
HUGO_ENVIRONMENT: production | ||
HUGO_ENV: production | ||
run: | | ||
cd website | ||
hugo \ | ||
--gc \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: website/public | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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,21 @@ | ||
local/ | ||
.kubeconfig | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
bin | ||
testbin/* | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# OS specific | ||
.DS_Store | ||
|
||
# Hugo artifacts | ||
.hugo_build.lock | ||
/website/resources | ||
/website/node_modules | ||
/website/public |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: <YOUR-REPO-NAME> | ||
Upstream-Contact: <YOUR-CONTACT (MAIL ADDRESS ETC.)> | ||
Source: <https://github.com/sap/YOUR-REPO-NAME> | ||
Upstream-Name: cap-operator | ||
Upstream-Contact: [email protected] | ||
Source: <https://github.com/sap/cap-operator> | ||
Disclaimer: The code in this project may include calls to APIs ("API Calls") of | ||
SAP or third-party products or services developed outside of this project | ||
("External Products"). | ||
|
@@ -24,14 +24,6 @@ Disclaimer: The code in this project may include calls to APIs ("API Calls") of | |
you any rights to use or access any SAP External Product, or provide any third | ||
parties the right to use of access any SAP External Product, through API Calls. | ||
|
||
Files: <YOUR-FILE-OR-FOLDER-LIST> | ||
Copyright: <YEARS-RELEVANT-FOR-YOUR-PROJECT> SAP SE or an SAP affiliate company and <YOUR-PROJECT-NAME> contributors | ||
License: Apache-2.0 | ||
|
||
Files: <THIRD-PARTY-FILE-OR-FOLDER-LIST> | ||
Copyright: <COPYRIGHT-OF-THIRD-PARTY-CODE> | ||
License: <LICENSE-OF-THIRD-PARTY-CODE> | ||
|
||
Files: <ANOTHER-THIRD-PARTY-FILE-OR-FOLDER-LIST> | ||
Copyright: <COPYRIGHT-OF-ANOTHER-THIRD-PARTY-CODE> | ||
License: <LICENSE-OF-ANOTHER- THIRD-PARTY-CODE> | ||
Files: ** | ||
Copyright: 2023 SAP SE or an SAP affiliate company and cap-operator contributors | ||
License: Apache-2.0 |
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,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Controller", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/cmd/controller" | ||
} | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,37 +1,25 @@ | ||
# SAP Repository Template | ||
# [CAP Operator](https://sap.github.io/cap-operator/) | ||
|
||
Default templates for SAP open source repositories, including LICENSE, .reuse/dep5, Code of Conduct, etc... All repositories on github.com/SAP will be created based on this template. | ||
CAP Operator manages the lifecycle operations involved in running multi-tenant CAP applications on Kubernetes clusters, primarily SAP Gardener managed clusters. | ||
|
||
## To-Do | ||
#### Documentation | ||
Visit the [Documentation](https://sap.github.io/cap-operator/docs) to find out how to install and use the CAP Operator | ||
|
||
In case you are the maintainer of a new SAP open source project, these are the steps to do with the template files: | ||
#### Helm Chart | ||
The local version of the [helm chart](https://github.com/sap/cap-operator-lifecycle/tree/release/chart) is now part of [CAP Operator Lifecycle](https://github.com/sap/cap-operator-lifecycle) repo. | ||
|
||
- Check if the default license (Apache 2.0) also applies to your project. A license change should only be required in exceptional cases. If this is the case, please change the [license file](LICENSE). | ||
- Enter the correct metadata for the REUSE tool. See our [wiki page](https://wiki.wdf.sap.corp/wiki/display/ospodocs/Using+the+Reuse+Tool+of+FSFE+for+Copyright+and+License+Information) for details how to do it. You can find an initial .reuse/dep5 file to build on. Please replace the parts inside the single angle quotation marks < > by the specific information for your repository and be sure to run the REUSE tool to validate that the metadata is correct. | ||
- Adjust the contribution guidelines (e.g. add coding style guidelines, pull request checklists, different license if needed etc.) | ||
- Add information about your project to this README (name, description, requirements etc). Especially take care for the <your-project> placeholders - those ones need to be replaced with your project name. See the sections below the horizontal line and [our guidelines on our wiki page](https://wiki.wdf.sap.corp/wiki/display/ospodocs/Guidelines+for+README.md+file) what is required and recommended. | ||
- Remove all content in this README above and including the horizontal line ;) | ||
#### CRDs | ||
CRDs for the CAP Operator can be applied from the [./crds](./crds) folder, these are also copied over to the [helm chart](https://github.com/sap/cap-operator-lifecycle/tree/main/chart) when updated. | ||
|
||
*** | ||
|
||
# Our new open source project | ||
|
||
## About this project | ||
|
||
*Insert a short description of your project here...* | ||
|
||
## Requirements and Setup | ||
|
||
*Insert a short description what is required to get your project running...* | ||
|
||
## Support, Feedback, Contributing | ||
|
||
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/<your-project>/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). | ||
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/cap-operator/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). | ||
|
||
## Code of Conduct | ||
|
||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md) at all times. | ||
|
||
## Licensing | ||
|
||
Copyright (20xx-)20xx SAP SE or an SAP affiliate company and <your-project> contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/<your-project>). | ||
Copyright 2023 SAP SE or an SAP affiliate company and cap-operator contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/cap-operator). |
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,15 @@ | ||
# Build stage for go modules | ||
FROM golang:1.21-alpine as build | ||
|
||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go build -o bin/controller ./cmd/controller/ | ||
|
||
# Run Stage | ||
FROM gcr.io/distroless/static AS final | ||
|
||
ENTRYPOINT ["/app/controller"] | ||
|
||
COPY --from=build /build/bin/controller /app/controller |
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,15 @@ | ||
# Build stage for go modules | ||
FROM golang:1.21-alpine as build | ||
|
||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go build -o ./bin/mtx-job ./cmd/mtx-job/main.go | ||
|
||
# Run Stage | ||
FROM gcr.io/distroless/static AS final | ||
|
||
ENTRYPOINT ["/app/mtx-job"] | ||
|
||
COPY --from=build /build/bin/mtx-job /app/mtx-job |
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,15 @@ | ||
# Build stage for go modules | ||
FROM golang:1.21-alpine as build | ||
|
||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go build -o bin/server ./cmd/server/ | ||
|
||
# Run Stage | ||
FROM gcr.io/distroless/static AS final | ||
|
||
ENTRYPOINT ["/app/server"] | ||
|
||
COPY --from=build /build/bin/server /app/server |
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,15 @@ | ||
# Build stage for go modules | ||
FROM golang:1.21-alpine as build | ||
|
||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go build -o ./bin/webhook ./cmd/web-hooks/main.go | ||
|
||
# Run Stage | ||
FROM gcr.io/distroless/static AS final | ||
|
||
ENTRYPOINT ["/app/webhook"] | ||
|
||
COPY --from=build /build/bin/webhook /app/webhook |
Oops, something went wrong.