Skip to content

feat: add ReferenceGrant RBAC permissions and enhance Docker workflow #177

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

Draft
wants to merge 3 commits into
base: release-v2-dev
Choose a base branch
from
Draft
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
33 changes: 22 additions & 11 deletions .github/workflows/push-docker-v2-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,50 @@ on:
branches:
- release-v2-dev
workflow_dispatch:
inputs:
tag:
type: string
description: "Image tag manually"
adc_version:
type: string
default: dev
description: "adc version"
jobs:
docker:
runs-on: buildjet-2vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: recursive

- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build push image
-
name: Build and push multi-arch image
env:
TAG: dev
ARCH: amd64
ENABLE_PROXY: "false"
BASE_IMAGE_TAG: "debug"
TAG: ${{ github.event.inputs.tag || github.ref_name }}dev
IMAGE_TAG: ${{ github.event.inputs.tag || github.ref_name }}dev
ADC_VERSION: ${{ github.event.inputs.adc_version }}
run: |
echo "building images..."
make build-push-image
make docker-build
make docker-push
4 changes: 2 additions & 2 deletions .github/workflows/push-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: push on dockerhub
on:
on:
push:
tags:
- '*'

jobs:
docker:
runs-on: buildjet-2vcpu-ubuntu-2204
Expand Down
31 changes: 0 additions & 31 deletions config/rbac/gatewayproxy_editor_role.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions config/rbac/gatewayproxy_viewer_role.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ rules:
- gatewayclasses/status
- gateways/status
- httproutes/status
- referencegrants/status
verbs:
- get
- update
Expand All @@ -102,6 +103,14 @@ rules:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
- referencegrants
verbs:
- list
- update
- watch
- apiGroups:
- networking.k8s.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions internal/manager/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ import (
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways/status,verbs=get;update
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=httproutes,verbs=get;list;watch
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=httproutes/status,verbs=get;update
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=referencegrants,verbs=list;watch;update
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=referencegrants/status,verbs=get;update

// Networking
// +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;update
Expand Down
Loading