Skip to content

Commit 84e69bf

Browse files
authored
init Generic control plane skeleton (#1)
* wire in for self-contained start * bootstrap tooling
1 parent 32bc111 commit 84e69bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3399
-312
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
title: "bug: "
4+
labels:
5+
- kind/bug
6+
body:
7+
- type: textarea
8+
id: description
9+
attributes:
10+
label: Describe the bug
11+
description: Please provide a clear and concise description of the bug.
12+
placeholder: |
13+
Add logs and screenshots if any.
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: reproducing
19+
attributes:
20+
label: Steps To Reproduce
21+
description: Steps to reproduce the behavior.
22+
placeholder: |
23+
1. Go to '...'
24+
2. Click on '...'
25+
3. Scroll down to '...'
26+
4. See the error
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: expected
32+
attributes:
33+
label: Expected Behaviour
34+
description: A clear and concise description of what you expected to happen.
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: additional
40+
attributes:
41+
label: Additional Context
42+
description: Add any other context about the problem here.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Community Meeting Agenda
2+
description: Create a new weekly meeting agenda
3+
title: "Community Meeting [DATE]"
4+
labels:
5+
- community-meeting
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Overview
10+
value: |
11+
At 11am Eastern, 8am Pacific, 3pm UTC; [find your time](https://www.timeanddate.com/worldclock/converter.html?iso=20210518T150000&p1=1440&p2=4826&p3=234&p4=195)
12+
13+
Video call link: https://meet.google.com/bvb-qmdk-qwr
14+
Or dial: ‪(DE) +49 40 8081619805‬ PIN: ‪475 948 161‬#
15+
More phone numbers: https://meet.google.com/tel/qhs-tuik-kwj?pin=7061261814168&hs=1
16+
17+
Meeting recordings available on YouTube at https://www.youtube.com/playlist?list=PLqN7RcoCwL96nXIIW6O51l8Lu_J-f5D27
18+
19+
Incoming issues: https://github.com/orgs/kcp-dev/projects/1/views/22
20+
21+
Milestone epics: https://github.com/kcp-dev/kcp/issues?q=is%3Aopen+is%3Aissue+label%3Amilestone-blocker+label%3Aepic
22+
23+
Add topics you'd like to discuss below!
24+
validations:
25+
required: true

.github/ISSUE_TEMPLATE/epic.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Epic
2+
description: For tracking a large feature, including how to demo it.
3+
title: "epic: "
4+
labels:
5+
- epic
6+
body:
7+
- type: textarea
8+
id: objective
9+
attributes:
10+
label: Demo Objective
11+
description: Please describe the objective of your demo.
12+
placeholder: |
13+
- [ ] User should be able to ...
14+
- [ ] ...
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: steps
20+
attributes:
21+
label: Demo Steps
22+
description: Please describe the steps for the demo.
23+
placeholder: |
24+
1. Admin does X
25+
1. User does Y
26+
1. Everyone is happy :)
27+
28+
- type: checkboxes
29+
id: action-items
30+
attributes:
31+
label: Action Items
32+
description: Please check the following
33+
options:
34+
- label: Scope of the current demo is necessary to fit in the prototype boundaries
35+
required: true
36+
- label: Contribute to the final demo script and recording
37+
38+
- type: textarea
39+
id: stories
40+
attributes:
41+
label: Stories
42+
placeholder: |
43+
- [ ] (Example) Add new API group
44+
- [ ] (Example) Add Widget API type
45+
- [ ] (Example) Add WidgetController
46+
- [ ] (Example) **stretch-goal:** Add Widgets to `kubectl kcp` plugin
47+
- Out-of-scope (prototype x): Send Widgets to space
48+
validations:
49+
required: false
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "feature: "
4+
labels:
5+
- kind/feature
6+
body:
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Feature Description
11+
description: Is your feature request related to a problem? A clear and concise description of what the problem is.
12+
placeholder: I'm always frustrated when [...]
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
id: solution
18+
attributes:
19+
label: Proposed Solution
20+
description: A clear and consise description of what you want to happen.
21+
placeholder: We can do [...]
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: alternatives
27+
attributes:
28+
label: Alternative Solutions
29+
description: A clear and consise description of any alternative solutions or features that you've considered.
30+
placeholder: I think another approach would be [...]
31+
validations:
32+
required: false
33+
34+
- type: checkboxes
35+
id: contribute
36+
attributes:
37+
label: Want to contribute?
38+
options:
39+
- label: I would like to work on this issue.
40+
required: false
41+
42+
- type: textarea
43+
id: additional
44+
attributes:
45+
label: Additional Context
46+
description: Add any other context or screenshots about the feature request here.
47+
validations:
48+
required: false

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"

.github/pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
Thanks for creating a pull request!
3+
4+
If this is your first time, please make sure to review CONTRIBUTING.MD.
5+
6+
Please copy the appropriate `:text:` or icon to the beginning of your PR title:
7+
8+
:sparkles: ✨ feature
9+
:bug: 🐛 bug fix
10+
:book: 📖 docs
11+
:memo: 📝 proposal
12+
:warning: ⚠️ breaking change
13+
:seedling: 🌱 other/misc
14+
:question: ❓ requires manual review/categorization
15+
16+
-->
17+
## Summary
18+
19+
## Related issue(s)
20+
21+
Fixes #
22+
23+
## Release Notes
24+
25+
<!--
26+
Please add a release note in the block below. Leave NONE only if no user-facing changes are in this PR.
27+
-->
28+
29+
```release-note
30+
NONE
31+
```

.github/workflows/goreleaser.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: goreleaser
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/goreleaser.yml
7+
- .goreleaser.yaml
8+
push:
9+
tags:
10+
- 'v*'
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
goreleaser:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
- uses: actions/setup-go@v5
24+
with:
25+
go-version: v1.22.2
26+
- name: Delete non-semver tags
27+
run: 'git tag -d $(git tag -l | grep -v "^v")'
28+
- name: Set LDFLAGS
29+
run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV
30+
- name: Run GoReleaser on tag
31+
if: github.event_name != 'pull_request'
32+
uses: goreleaser/goreleaser-action@v4
33+
with:
34+
distribution: goreleaser
35+
version: latest
36+
args: release --timeout 60m
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
40+
- name: Run GoReleaser on pull request
41+
if: github.event_name == 'pull_request'
42+
uses: goreleaser/goreleaser-action@v4
43+
with:
44+
distribution: goreleaser
45+
version: latest
46+
args: release --timeout 60m --snapshot
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
50+
- uses: cytopia/upload-artifact-retry-action@v0.1.7
51+
if: ${{ always() }}
52+
with:
53+
name: binaries
54+
path: dist/*.tar.gz

.github/workflows/images.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Create and publish a Container image
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
packages: write
12+
id-token: write
13+
14+
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
15+
env:
16+
REGISTRY: ghcr.io
17+
IMAGE_NAME: ${{ github.repository }}
18+
GOPRIVATE: github.com/{organisation}
19+
20+
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
21+
jobs:
22+
build-and-push-image:
23+
runs-on: ubuntu-latest
24+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
25+
permissions:
26+
contents: read
27+
packages: write
28+
#
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
33+
- name: Log in to the Container registry
34+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
40+
- name: Extract metadata (tags, labels) for Docker
41+
id: meta
42+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
43+
with:
44+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
45+
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
46+
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
47+
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
48+
- name: Build and push Docker image
49+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
50+
with:
51+
context: .
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+
build-args: |
56+
GH_TOKEN=${{ secrets.GH_TOKEN }}

.github/workflows/pr-verifier.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Verifier
2+
3+
on:
4+
# NB: using `pull_request_target` runs this in the context of
5+
# the base repository, so it has permission to upload to the checks API.
6+
# This means changes won't kick in to this file until merged onto the
7+
# main branch.
8+
pull_request_target:
9+
types: [opened, edited, reopened, synchronize]
10+
11+
jobs:
12+
verify:
13+
name: verify PR contents
14+
permissions:
15+
checks: write
16+
pull-requests: read
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Verifier action
20+
id: verifier
21+
uses: kubernetes-sigs/kubebuilder-release-tools@v0.4.3
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.gcp
2+
**__debug*
3+
.vscode
4+
vendor
5+
hack/tools/*
6+
bin/*

.goreleaser.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
builds:
3+
- id: "gcp"
4+
main: ./cmd/gcp
5+
binary: bin/gcp
6+
ldflags:
7+
- "{{ .Env.LDFLAGS }}"
8+
goos:
9+
- linux
10+
- darwin
11+
goarch:
12+
- amd64
13+
- arm64
14+
- ppc64le
15+
ignore:
16+
- goos: darwin
17+
goarch: ppc64le
18+
env:
19+
- CGO_ENABLED=0
20+
archives:
21+
- id: gcp
22+
builds:
23+
- gcp
24+
25+
release:
26+
draft: true
27+
mode: keep-existing

0 commit comments

Comments
 (0)