Skip to content
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

latest & greatest #116

Merged
merged 53 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7f10c3d
WIP: gh workflows
sebhoss Aug 6, 2023
df35b63
WIP: brand new version
sebhoss Aug 27, 2023
b7e7c43
fix: templates file name & docs
sebhoss Aug 27, 2023
9715c7a
fix: use core group for groupless resources
sebhoss Aug 27, 2023
9bd45e7
WIP: tests
sebhoss Aug 27, 2023
7d5f015
feat: unify fetching models
sebhoss Aug 29, 2023
45f2811
fix: schema validators
sebhoss Aug 29, 2023
e197901
chore: update code from upstream
sebhoss Aug 29, 2023
90eac53
chore: remove now useless condition
sebhoss Aug 29, 2023
aa2a82b
WIP: dep5 template
sebhoss Aug 29, 2023
8861e97
chore: replace deprecated option
sebhoss Aug 30, 2023
314d083
chore: remove slow AF golangci linter
sebhoss Aug 30, 2023
beeeda8
feat: move fetcher/generator to tools dir
sebhoss Aug 30, 2023
6408520
chore: update schemas
sebhoss Aug 30, 2023
dcd3879
chore: update CRDs & fetch them all
sebhoss Aug 30, 2023
64ccbd5
chore: remove run configs
sebhoss Sep 2, 2023
010e656
chore: re-enable all generators
sebhoss Sep 2, 2023
e178829
fix: use schema attributes
sebhoss Sep 2, 2023
914f919
feat: improve whitespace handling
sebhoss Sep 2, 2023
fde4102
feat: download more CRDs
sebhoss Sep 2, 2023
d78015f
chore: update deps
sebhoss Sep 2, 2023
5dcda87
fix: everything compiles again
sebhoss Sep 3, 2023
8d9dfcb
chore: remove golangci b/c its insane
sebhoss Sep 3, 2023
5226bfc
chore: reduce number of build artifacts to reduce release time
sebhoss Sep 3, 2023
8ad1169
fix: makefile find calls
sebhoss Sep 3, 2023
48d587d
chore: work on tests
sebhoss Sep 10, 2023
f884807
chore: generate docs
sebhoss Sep 10, 2023
98e3934
chore: update all dependencies
sebhoss Sep 10, 2023
6690dc1
feat: fetch gateway API CRDs from k8s-sigs
sebhoss Sep 10, 2023
2c6f4c1
chore: use yaml v2 instead of v3
sebhoss Sep 10, 2023
bfcefef
chore: download prom-operator CRDs from canonical source
sebhoss Sep 10, 2023
d5a1d29
chore: re-generate all sources
sebhoss Sep 10, 2023
bd8a861
fix: use plural forms for requests
sebhoss Sep 11, 2023
983776a
feat: wait on delete
sebhoss Sep 11, 2023
23eb3f5
feat: add kubean
sebhoss Sep 12, 2023
3fbbc08
fix: various fixes for resources
sebhoss Sep 12, 2023
1949dbb
feat: add more CRDs from kubernetes-sigs
sebhoss Sep 12, 2023
c9ebc5b
chore: re-generate all code
sebhoss Sep 12, 2023
34aaae8
fix: remove unused import
sebhoss Sep 12, 2023
74ce0e1
chore: format code
sebhoss Sep 12, 2023
7c126d2
chore: generate docs for data sources
sebhoss Sep 12, 2023
ae10b7d
chore: add test case for #112
sebhoss Sep 24, 2023
7359e43
fetch from kube-custom-resources-rs
sebhoss Mar 29, 2024
ea9401d
test against latest terraform
sebhoss Mar 29, 2024
8f6569c
fix reuse compliance
sebhoss Mar 29, 2024
79ff4e7
fix format for manifest template
sebhoss Mar 30, 2024
4424884
update workflows
sebhoss Mar 30, 2024
d6fa2e0
improve release workflow
sebhoss Mar 30, 2024
188ee3e
offline is true by default
sebhoss Mar 30, 2024
5a61775
remove id attribute
sebhoss Mar 30, 2024
0541399
fix reuse compliance
sebhoss Mar 30, 2024
b73aaf2
ignore failing test for now
sebhoss Mar 30, 2024
0c94f13
fix generated docs
sebhoss Mar 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 0 additions & 46 deletions .github/ISSUE_TEMPLATE/add-resource.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
# SPDX-License-Identifier: 0BSD

blank_issues_enabled: true
contact_links:
- name: Chat Room
url: https://matrix.to/#/#talk.metio:matrix.org
about: Chat with the developers
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/request-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: Add New Resource
description: Request a new resource to be added to this provider
title: "[Add]: "
labels: ["enhancement"]
assignees:
- sebhoss
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help this project!
- type: textarea
id: spec
attributes:
label: Link to upstream specification(s)
description: This can either be a CRDv1 or OpenAPIv2 specifications.
placeholder: ex. https://github.com/orga/repo/main/config/crd/some-crd.yaml
validations:
required: true
- type: input
id: license
attributes:
label: SPDX license identifier for the upstream spec
description: If license is not known by SPDX provide link to the license instead
placeholder: ex. Apache-2.0
validations:
required: true
- type: input
id: copyright
attributes:
label: Name of the copyright holder
description: If no single entity holds the copyright, use the upstream project name instead.
placeholder: ex. The Istio Authors
validations:
required: true
- type: textarea
id: example
attributes:
label: Example configuration of the resource in Kubernetes YAML
description: If available, add an example how the resource is used in plain YAML
render: YAML
validations:
required: false
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
language: [ go ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
43 changes: 35 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,70 @@ jobs:
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: last_release
name: Fetch last release info
run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: commits
name: Count Commits
run: echo "::set-output name=count::$(git rev-list --count HEAD --since='last Monday' -- internal)"
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD)" >> $GITHUB_OUTPUT
- id: release
name: Create Release Version
if: steps.commits.outputs.count > 0
run: echo "::set-output name=version::$(date +'%Y.%-m.%-d')"
run: echo "version=$(date +'%Y.%-m.%-d')" >> $GITHUB_OUTPUT
- id: tag
name: Create Release Tag
if: steps.commits.outputs.count > 0
uses: EndBug/latest-tag@latest
uses: EndBug/latest-tag@v1
with:
ref: ${{ steps.release.outputs.version }}
- id: setup_go
name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
if: steps.commits.outputs.count > 0
with:
go-version-file: go.mod
cache: true
- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
if: steps.commits.outputs.count > 0
with:
gpg_private_key: ${{ secrets.GPG_SECRET_KEY_BASE64 }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}
- id: goreleaser
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4.2.0
uses: goreleaser/goreleaser-action@v5
if: steps.commits.outputs.count > 0
with:
version: latest
args: release --rm-dist --timeout 120m --parallelism 1
args: release --clean --timeout 120m --parallelism 1
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: mail
name: Send Mail
if: steps.commits.outputs.count > 0
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.MAIL_SERVER }}
server_port: ${{ secrets.MAIL_PORT }}
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.event.repository.name }} version ${{ steps.release.outputs.version }} published
body: See https://github.com/metio/terraform-provider-k8s/releases/tag/${{ steps.release.outputs.version }} for details.
to: ${{ secrets.MAIL_RECIPIENT }}
from: ${{ secrets.MAIL_SENDER }}
- id: matrix
name: Send Matrix Message
if: steps.commits.outputs.count > 0
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: ${{ github.event.repository.name }} version [${{ steps.release.outputs.version }}](https://github.com/metio/terraform-provider-k8s/releases/tag/${{ steps.release.outputs.version }}) published
server: ${{ secrets.MATRIX_SERVER }}
4 changes: 2 additions & 2 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
uses: fsfe/reuse-action@v3
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: AboutK8SIoClusterPropertyV1Alpha1Manifest
on:
pull_request:
branches: [ main ]
paths:
- examples/data-sources/k8s_about_k8s_io_cluster_property_v1alpha1_manifest/**
- internal/provider/about_k8s_io_v1alpha1/about_k8s_io_cluster_property_v1alpha1_manifest.go
- internal/provider/about_k8s_io_v1alpha1/about_k8s_io_cluster_property_v1alpha1_manifest_test.go
- terratest/about_k8s_io_v1alpha1/about_k8s_io_cluster_property_v1alpha1_manifest_test.go
jobs:
terraform:
name: Test with Terraform
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: setup_go
name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- id: setup_terraform
name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- id: install
name: Install Provider
run: make install
- id: tests
name: Run Unit Tests
run: go test -v -timeout=120s -count=1 ./internal/provider/about_k8s_io_v1alpha1/about_k8s_io_cluster_property_v1alpha1_manifest_test.go
- id: terratest
name: Run Terratest Tests
run: go test -v -timeout=120s -count=1 -run TestAboutK8SIoClusterPropertyV1Alpha1Manifest ./terratest/about_k8s_io_v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: AcidZalanDoOperatorConfigurationV1Manifest
on:
pull_request:
branches: [ main ]
paths:
- examples/data-sources/k8s_acid_zalan_do_operator_configuration_v1_manifest/**
- internal/provider/acid_zalan_do_v1/acid_zalan_do_operator_configuration_v1_manifest.go
- internal/provider/acid_zalan_do_v1/acid_zalan_do_operator_configuration_v1_manifest_test.go
- terratest/acid_zalan_do_v1/acid_zalan_do_operator_configuration_v1_manifest_test.go
jobs:
terraform:
name: Test with Terraform
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: setup_go
name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- id: setup_terraform
name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- id: install
name: Install Provider
run: make install
- id: tests
name: Run Unit Tests
run: go test -v -timeout=120s -count=1 ./internal/provider/acid_zalan_do_v1/acid_zalan_do_operator_configuration_v1_manifest_test.go
- id: terratest
name: Run Terratest Tests
run: go test -v -timeout=120s -count=1 -run TestAcidZalanDoOperatorConfigurationV1Manifest ./terratest/acid_zalan_do_v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: AcidZalanDoPostgresTeamV1Manifest
on:
pull_request:
branches: [ main ]
paths:
- examples/data-sources/k8s_acid_zalan_do_postgres_team_v1_manifest/**
- internal/provider/acid_zalan_do_v1/acid_zalan_do_postgres_team_v1_manifest.go
- internal/provider/acid_zalan_do_v1/acid_zalan_do_postgres_team_v1_manifest_test.go
- terratest/acid_zalan_do_v1/acid_zalan_do_postgres_team_v1_manifest_test.go
jobs:
terraform:
name: Test with Terraform
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: setup_go
name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- id: setup_terraform
name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- id: install
name: Install Provider
run: make install
- id: tests
name: Run Unit Tests
run: go test -v -timeout=120s -count=1 ./internal/provider/acid_zalan_do_v1/acid_zalan_do_postgres_team_v1_manifest_test.go
- id: terratest
name: Run Terratest Tests
run: go test -v -timeout=120s -count=1 -run TestAcidZalanDoPostgresTeamV1Manifest ./terratest/acid_zalan_do_v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD

name: AcidZalanDoPostgresqlV1Manifest
on:
pull_request:
branches: [ main ]
paths:
- examples/data-sources/k8s_acid_zalan_do_postgresql_v1_manifest/**
- internal/provider/acid_zalan_do_v1/acid_zalan_do_postgresql_v1_manifest.go
- internal/provider/acid_zalan_do_v1/acid_zalan_do_postgresql_v1_manifest_test.go
- terratest/acid_zalan_do_v1/acid_zalan_do_postgresql_v1_manifest_test.go
jobs:
terraform:
name: Test with Terraform
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: setup_go
name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- id: setup_terraform
name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- id: install
name: Install Provider
run: make install
- id: tests
name: Run Unit Tests
run: go test -v -timeout=120s -count=1 ./internal/provider/acid_zalan_do_v1/acid_zalan_do_postgresql_v1_manifest_test.go
- id: terratest
name: Run Terratest Tests
run: go test -v -timeout=120s -count=1 -run TestAcidZalanDoPostgresqlV1Manifest ./terratest/acid_zalan_do_v1
Loading