Skip to content
Open
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
26 changes: 13 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9
with:
only-new-issues: true
problem-matchers: true
Expand All @@ -40,10 +40,10 @@ jobs:
modified: ${{ steps.filter.outputs.docker-or-gocode }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Check if Dockerfile oer Go code has changed
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@v4
id: filter
with:
filters: |
Expand All @@ -63,23 +63,23 @@ jobs:
- paths-filter
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: arm64,arm

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v6
with:
images: |
blakec/external-mdns
ghcr.io/${{ github.repository }}

- name: Build image and push to local image cache
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
Expand All @@ -97,11 +97,11 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: tj-actions/changed-files@v45
- uses: tj-actions/changed-files@v47
id: changed-files
with:
files: '**/*.md'
Expand All @@ -114,7 +114,7 @@ jobs:
# If there are no changed files, it will not run
# If there are changed files, it will run and lint them
# The output of this step will be the list of changed files
uses: DavidAnson/markdownlint-cli2-action@v19
uses: DavidAnson/markdownlint-cli2-action@v23
if: steps.changed-files.outputs.any_changed == 'true'
with:
globs: ${{ steps.changed-files.outputs.all_changed_files }}
Expand All @@ -126,12 +126,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Check if YAML files have changed
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@v4
id: changes
with:
filters: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/container_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: arm64,arm

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@906ecf0fc0a80f9110f79d9e6c04b1080f4a2621
uses: docker/metadata-action@v6
env:
# Attach metadata annotations to both the image index and the manifest
DOCKER_METADATA_ANNOTATIONS_LEVELS: index,manifest
Expand Down Expand Up @@ -103,15 +103,15 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v4
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push container image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
Expand All @@ -124,7 +124,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
uses: actions/attest-build-provenance@v4
with:
subject-name: ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}
subject-digest: ${{ steps.push.outputs.digest }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM --platform=$BUILDPLATFORM golang:1.16 AS build
FROM --platform=$BUILDPLATFORM golang:1.25 AS build

ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT

ADD . /go/src/github.com/blake/external-mdns
COPY . /go/src/github.com/blake/external-mdns
WORKDIR /go/src/github.com/blake/external-mdns

RUN mkdir -p /release/etc &&\
Expand Down
39 changes: 39 additions & 0 deletions gateway-api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2020 Blake Covarrubias
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
gatewayclientset "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
gatewayinformers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
)

func newGWK8sClient() (*gatewayclientset.Clientset, error) {
// Creates the k8sClient
config := initAuthCreds()
gwk8sClient, err := gatewayclientset.NewForConfig(config)

if err != nil {
return nil, err
}
return gwk8sClient, nil
}

func newGWK8sInformerFactory() (gatewayinformers.SharedInformerFactory, error) {
gwk8sClient, err := newGWK8sClient()
if err != nil {
return nil, err
}
return gatewayinformers.NewSharedInformerFactory(gwk8sClient, 0), nil
}
54 changes: 50 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,59 @@
module github.com/blake/external-mdns

go 1.16
go 1.25.0

require (
github.com/jpillora/go-tld v1.0.0
github.com/miekg/dns v1.1.31
github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/go-homedir v1.1.0
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/client-go v0.22.2
k8s.io/api v0.35.1
k8s.io/apimachinery v0.35.1
k8s.io/client-go v0.35.1
sigs.k8s.io/gateway-api v1.5.1
)

require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-openapi/jsonpointer v0.21.2 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.9.1 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/term v0.39.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
k8s.io/utils v0.0.0-20260108192941-914a6e750570 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
Loading