Skip to content

Commit

Permalink
Ongoing work fixes
Browse files Browse the repository at this point in the history
- externalDNSEndpoint Scheme
- create update operations
- Add CI things
- Handle node IP change
- Fix license
- Add chart

Signed-off-by: Dinar Valeev <k0da@opensuse.org>
  • Loading branch information
kuritka authored and k0da committed Sep 12, 2024
1 parent 4a2f18c commit d7de0d1
Show file tree
Hide file tree
Showing 24 changed files with 1,451 additions and 27 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/golagci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2024 The cap-infra-dns Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
# Copyright 2024 The external-dns-infoblox-webhook Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
---
name: GolangCI
on: # yamllint disable-line rule:truthy
push:
paths-ignore:
- '**.md'
pull_request:
branches:
- main
jobs:
lint:
name: GolangCI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: GolangCI
uses: golangci/golangci-lint-action@v3
with:
version: v1.61.0
args: --timeout=3m
51 changes: 51 additions & 0 deletions .github/workflows/golic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2024 The cap-infra-dns Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
# Copyright 2024 The external-dns-infoblox-webhook Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
---
name: GoLic
on: # yamllint disable-line rule:truthy
push:
paths-ignore:
- '**.md'
pull_request:
branches:
- main
jobs:
golic:
name: GoLic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: golic
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go install github.com/AbsaOSS/golic@v0.7.2
golic inject --dry -x -t apache2
108 changes: 108 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Copyright 2024 The cap-infra-dns Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
# Copyright 2024 The external-dns-infoblox-webhook Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
---
name: Release

on: # yamllint disable-line rule:truthy
push:
branches:
- main

permissions:
contents: write
pull-requests: write
packages: write
id-token: write

env:
GO111MODULE: "on"

jobs:
release:
runs-on: ubuntu-latest
name: Release
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}

steps:
- uses: googleapis/release-please-action@v4
id: release

provider:
if: needs.release.outputs.release_created
runs-on: ubuntu-latest
name: Publish Provider
needs:
- release
strategy:
max-parallel: 4
matrix:
go-version: [1.22.x]

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

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "${{ matrix.go-version }}"

- name: Install cosign
uses: sigstore/cosign-installer@v3.5.0
- name: Download Syft
uses: anchore/sbom-action/download-syft@v0.16.0

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Release via GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
args: -p 3 release --clean --timeout 60m0s
version: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_COMMIT_TIMESTAMP: ${{ github.event.repository.updated_at }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_COMMIT_TAG: ${{ needs.release.outputs.tag_name }}
53 changes: 53 additions & 0 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2024 The cap-infra-dns Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
# Copyright 2024 The external-dns-infoblox-webhook Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
---
name: YamlLint
on: # yamllint disable-line rule:truthy
push:
paths-ignore:
- '**.md'
pull_request:
branches:
- main
jobs:
lint:
name: YamlLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5

- name: YamlLint
run: yamllint .
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Ignore everything
*

# But not these files...
!/.gitignore

!*.go
!go.sum
!go.mod

!Makefile
!*.yaml

!.release-please-manifest.json
!release-please-config.json
!.goreleaser.yml
!.gitleaks.toml
!.yamllint
!.golangci.toml
!.golic.yaml
!.licignore
!Dockerfile
!CODEOWNERS
!README.md
!LICENSE
!renovate.json

# ...even if they are in subdirectories
!*/
9 changes: 9 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title = "Gitleaks Configuration"

[extend]
useDefault = true
[allowlist]
description = "global allow list"
paths = [
'''README.md''','''.idea''','''.vscode'''
]
52 changes: 52 additions & 0 deletions .golic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2024 The cap-infra-dns Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
# Copyright 2022 The k8gb Contributors.
#
# 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.
#
# Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
golic:
licenses:
apache2: |
Copyright 2024 The cap-infra-dns Contributors.
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.
Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
rules:
"*.go.txt":
prefix: "/*"
suffix: "*/"
Loading

0 comments on commit d7de0d1

Please sign in to comment.