Skip to content

✨ init Generic control plane skeleton #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Bug Report
description: Create a report to help us improve
title: "bug: "
labels:
- kind/bug
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: Please provide a clear and concise description of the bug.
placeholder: |
Add logs and screenshots if any.
validations:
required: true

- type: textarea
id: reproducing
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See the error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behaviour
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/community_meeting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Community Meeting Agenda
description: Create a new weekly meeting agenda
title: "Community Meeting [DATE]"
labels:
- community-meeting
body:
- type: textarea
attributes:
label: Overview
value: |
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)

Video call link: https://meet.google.com/bvb-qmdk-qwr
Or dial: ‪(DE) +49 40 8081619805‬ PIN: ‪475 948 161‬#
More phone numbers: https://meet.google.com/tel/qhs-tuik-kwj?pin=7061261814168&hs=1

Meeting recordings available on YouTube at https://www.youtube.com/playlist?list=PLqN7RcoCwL96nXIIW6O51l8Lu_J-f5D27

Incoming issues: https://github.com/orgs/kcp-dev/projects/1/views/22

Milestone epics: https://github.com/kcp-dev/kcp/issues?q=is%3Aopen+is%3Aissue+label%3Amilestone-blocker+label%3Aepic

Add topics you'd like to discuss below!
validations:
required: true
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Epic
description: For tracking a large feature, including how to demo it.
title: "epic: "
labels:
- epic
body:
- type: textarea
id: objective
attributes:
label: Demo Objective
description: Please describe the objective of your demo.
placeholder: |
- [ ] User should be able to ...
- [ ] ...
validations:
required: true

- type: textarea
id: steps
attributes:
label: Demo Steps
description: Please describe the steps for the demo.
placeholder: |
1. Admin does X
1. User does Y
1. Everyone is happy :)

- type: checkboxes
id: action-items
attributes:
label: Action Items
description: Please check the following
options:
- label: Scope of the current demo is necessary to fit in the prototype boundaries
required: true
- label: Contribute to the final demo script and recording

- type: textarea
id: stories
attributes:
label: Stories
placeholder: |
- [ ] (Example) Add new API group
- [ ] (Example) Add Widget API type
- [ ] (Example) Add WidgetController
- [ ] (Example) **stretch-goal:** Add Widgets to `kubectl kcp` plugin
- Out-of-scope (prototype x): Send Widgets to space
validations:
required: false
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Feature Request
description: Suggest an idea for this project
title: "feature: "
labels:
- kind/feature
body:
- type: textarea
id: problem
attributes:
label: Feature Description
description: Is your feature request related to a problem? A clear and concise description of what the problem is.
placeholder: I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: A clear and consise description of what you want to happen.
placeholder: We can do [...]
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternative Solutions
description: A clear and consise description of any alternative solutions or features that you've considered.
placeholder: I think another approach would be [...]
validations:
required: false

- type: checkboxes
id: contribute
attributes:
label: Want to contribute?
options:
- label: I would like to work on this issue.
required: false

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
31 changes: 31 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Thanks for creating a pull request!

If this is your first time, please make sure to review CONTRIBUTING.MD.

Please copy the appropriate `:text:` or icon to the beginning of your PR title:

:sparkles: ✨ feature
:bug: 🐛 bug fix
:book: 📖 docs
:memo: 📝 proposal
:warning: ⚠️ breaking change
:seedling: 🌱 other/misc
:question: ❓ requires manual review/categorization

-->
## Summary

## Related issue(s)

Fixes #

## Release Notes

<!--
Please add a release note in the block below. Leave NONE only if no user-facing changes are in this PR.
-->

```release-note
NONE
```
54 changes: 54 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: goreleaser

on:
pull_request:
paths:
- .github/workflows/goreleaser.yml
- .goreleaser.yaml
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: v1.22.2
- name: Delete non-semver tags
run: 'git tag -d $(git tag -l | grep -v "^v")'
- name: Set LDFLAGS
run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV
- name: Run GoReleaser on tag
if: github.event_name != 'pull_request'
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
- name: Run GoReleaser on pull request
if: github.event_name == 'pull_request'
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --timeout 60m --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
- uses: cytopia/upload-artifact-retry-action@v0.1.7
if: ${{ always() }}
with:
name: binaries
path: dist/*.tar.gz
56 changes: 56 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Create and publish a Container image

on:
push:
branches:
- 'main'
workflow_dispatch:

permissions:
contents: read
packages: write
id-token: write

# 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.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GOPRIVATE: github.com/{organisation}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# 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.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# 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.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# 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.
# 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.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GH_TOKEN=${{ secrets.GH_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/pr-verifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Verifier

on:
# NB: using `pull_request_target` runs this in the context of
# the base repository, so it has permission to upload to the checks API.
# This means changes won't kick in to this file until merged onto the
# main branch.
pull_request_target:
types: [opened, edited, reopened, synchronize]

jobs:
verify:
name: verify PR contents
permissions:
checks: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Verifier action
id: verifier
uses: kubernetes-sigs/kubebuilder-release-tools@v0.4.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gcp
**__debug*
.vscode
vendor
hack/tools/*
bin/*
27 changes: 27 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

builds:
- id: "gcp"
main: ./cmd/gcp
binary: bin/gcp
ldflags:
- "{{ .Env.LDFLAGS }}"
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- ppc64le
ignore:
- goos: darwin
goarch: ppc64le
env:
- CGO_ENABLED=0
archives:
- id: gcp
builds:
- gcp

release:
draft: true
mode: keep-existing
Loading
Loading