-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shorten cluster-api-provider-linode to capl, add release process (#124)
* shorten cluster-api-provider-linode to capl, add release process * update docs for name shortening, add release page
- Loading branch information
1 parent
71766a3
commit 951b4db
Showing
18 changed files
with
278 additions
and
81 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,43 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Create Release Artifacts | ||
run: make release | ||
env: | ||
RELEASE_TAG: ${{ github.ref_name }} | ||
- name: Upload Release Artifacts | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
./release | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
linode/cluster-api-provider-linode | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | ||
type=semver,pattern={{raw}},value=${{ github.ref_name }} | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and Push to Docker Hub | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ cover.out | |
kubeconfig* | ||
.devbox/* | ||
docs/book | ||
release/* |
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,34 +1,42 @@ | ||
load("ext://k8s_attach", "k8s_attach") | ||
|
||
docker_build("controller", ".", only=("Dockerfile", "Makefile", "vendor","go.mod", "go.sum", "./api", "./cloud","./cmd", "./controller", "./util", "./version"), build_args={'VERSION': os.getenv("VERSION","")}) | ||
docker_build( | ||
"docker.io/linode/cluster-api-provider-linode", | ||
context = ".", | ||
only=("Dockerfile", "Makefile", "vendor","go.mod", "go.sum", "./api", "./cloud","./cmd", "./controller", "./util", "./version"), | ||
build_args={'VERSION': os.getenv("VERSION","")}, | ||
) | ||
|
||
local_resource( | ||
'capi-controller-manager', | ||
cmd='EXP_CLUSTER_RESOURCE_SET=true clusterctl init --addon helm', | ||
) | ||
|
||
k8s_yaml(kustomize('config/default')) | ||
|
||
# get generated secret name so we can categorize it | ||
token_secret_name = str(local('kustomize build config/default | grep -m1 "name: cluster-api-provider-linode-token-"', quiet=True, echo_off=True)).split()[1] | ||
templated_yaml = local( | ||
'kustomize build config/default | envsubst', | ||
env={'LINODE_TOKEN': os.getenv('LINODE_TOKEN')}, | ||
quiet=True, | ||
echo_off=True | ||
) | ||
k8s_yaml(templated_yaml) | ||
|
||
k8s_resource( | ||
workload="cluster-api-provider-linode-controller-manager", | ||
workload="capl-controller-manager", | ||
objects=[ | ||
"cluster-api-provider-linode-system:namespace", | ||
"capl-system:namespace", | ||
"linodeclusters.infrastructure.cluster.x-k8s.io:customresourcedefinition", | ||
"linodemachines.infrastructure.cluster.x-k8s.io:customresourcedefinition", | ||
"linodeclustertemplates.infrastructure.cluster.x-k8s.io:customresourcedefinition", | ||
"linodemachinetemplates.infrastructure.cluster.x-k8s.io:customresourcedefinition", | ||
"linodevpcs.infrastructure.cluster.x-k8s.io:customresourcedefinition", | ||
"cluster-api-provider-linode-controller-manager:serviceaccount", | ||
"cluster-api-provider-linode-leader-election-role:role", | ||
"cluster-api-provider-linode-manager-role:clusterrole", | ||
"cluster-api-provider-linode-metrics-reader:clusterrole", | ||
"cluster-api-provider-linode-proxy-role:clusterrole", | ||
"cluster-api-provider-linode-leader-election-rolebinding:rolebinding", | ||
"cluster-api-provider-linode-manager-rolebinding:clusterrolebinding", | ||
"cluster-api-provider-linode-proxy-rolebinding:clusterrolebinding", | ||
"%s:secret" % token_secret_name | ||
"capl-controller-manager:serviceaccount", | ||
"capl-leader-election-role:role", | ||
"capl-manager-role:clusterrole", | ||
"capl-metrics-reader:clusterrole", | ||
"capl-proxy-role:clusterrole", | ||
"capl-leader-election-rolebinding:rolebinding", | ||
"capl-manager-rolebinding:clusterrolebinding", | ||
"capl-proxy-rolebinding:clusterrolebinding", | ||
"capl-manager-credentials:secret", | ||
] | ||
) |
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
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,7 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: manager-credentials | ||
stringData: | ||
apiToken: ${LINODE_TOKEN} |
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,17 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
namespace: system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
env: | ||
- name: LINODE_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
key: apiToken | ||
name: capl-manager-credentials |
Oops, something went wrong.