Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.
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
2 changes: 2 additions & 0 deletions .github/workflows/bundle-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
echo "IMG=ghcr.io/${GITHUB_REPOSITORY,,}:$TAG" >> $GITHUB_ENV
echo "BUNDLE_IMG=ghcr.io/${GITHUB_REPOSITORY,,}-bundle:$TAG" >> $GITHUB_ENV
echo "CATALOG_IMG=ghcr.io/${GITHUB_REPOSITORY,,}-catalog:$TAG" >> $GITHUB_ENV
echo "IMAGE_TAG_BASE=ghcr.io/${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: Install operator-sdk
run: |
Expand All @@ -52,5 +53,6 @@ jobs:
- name: Build and Push Images
shell: bash
run: |
cd simple-arc-operator/
make docker-build docker-push
make bundle bundle-build bundle-push catalog-build catalog-push
47 changes: 47 additions & 0 deletions .github/workflows/generate-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: GitHub Actions Demo
on:
push:
branches:
- codify-changes
workflow_dispatch:

jobs:
containers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install operator-sdk
run: |
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.26.0
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk

- name: Initialize Operator
run: |
rm -rf simple-arc-operator
mkdir simple-arc-operator
cd simple-arc-operator
operator-sdk init \
--plugins helm \
--domain boxboat.com \
--group github-practice \
--helm-chart actions-runner-controller \
--helm-chart-repo https://actions-runner-controller.github.io/actions-runner-controller

- name: Configure Operator Manifests
run: |
./chart-patch.sh
cat overlays/resource_limits.yaml >> simple-arc-operator/config/manager/kustomization.yaml
cat overlays/role_permissions.yaml >> simple-arc-operator/config/rbac/kustomization.yaml

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: new-release
title: Regenerated operator with new chart version

6 changes: 6 additions & 0 deletions chart-patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
filepath="simple-arc-operator/helm-charts/actions-runner-controller/templates/manager_role.yaml"
headStart=$(grep -n "rules:" $filepath | awk -F':' '{print $1}')
tailStart=$(($headStart + 1))
head -n${headStart} $filepath > head
tail -n+${tailStart} $filepath > tail
cat head overlays/patch.yaml tail > $filepath
20 changes: 0 additions & 20 deletions config/default/manager_config_patch.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions config/manager/controller_manager_config.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions config/manager/kustomization.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions config/rbac/actionsrunnercontroller_viewer_role.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions config/rbac/auth_proxy_client_clusterrole.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions config/rbac/auth_proxy_role.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/rbac/auth_proxy_role_binding.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions config/rbac/auth_proxy_service.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/rbac/leader_election_role_binding.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/rbac/role_binding.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions config/rbac/service_account.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions config/samples/multiple-sample-1.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions config/samples/multiple-sample-2.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions config/samples/runner-deployment.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions config/samples/simple-sample.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions head
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: {{ include "actions-runner-controller.managerRoleName" . }}
rules:
Loading