Skip to content

Commit eed093f

Browse files
authored
Merge pull request #34 from invidian/release-v0.9.0
Release v0.9.0
2 parents 5b4da12 + 61c8d65 commit eed093f

File tree

16 files changed

+1618
-270
lines changed

16 files changed

+1618
-270
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10-
container: golangci/golangci-lint:v1.46.0
10+
container: golangci/golangci-lint:v1.54.2
1111
steps:
1212
- uses: actions/checkout@v2
1313
with:
1414
# Required for Codecov report uploading.
1515
fetch-depth: 0
1616
- run: make install-cc-test-reporter install-changelog BIN_PATH=/usr/local/bin
17-
- run: make build build-test test-update-linters lint test-tidy test-changelog
17+
- run: |
18+
# Required to avoid error 'fatal: detected dubious ownership in repository at' while calling
19+
# 'git status --porcelain'.
20+
git config --global --add safe.directory /__w/terraform-provider-flexkube/terraform-provider-flexkube
21+
make build build-test test-update-linters lint test-tidy test-changelog
1822
- run: make test-cover-upload
1923
e2e:
2024
runs-on: ubuntu-latest
2125
steps:
2226
- uses: actions/setup-go@v2
2327
with:
24-
go-version: '1.18'
28+
go-version: '1.21'
2529
- uses: actions/cache@v2
2630
with:
2731
path: |
@@ -33,7 +37,32 @@ jobs:
3337
- uses: actions/checkout@v2
3438
- uses: hashicorp/setup-terraform@v1
3539
- name: Setup containerd
36-
uses: crazy-max/ghaction-setup-containerd@v1.3.0
40+
run: |
41+
# From https://docs.docker.com/engine/install/ubuntu/.
42+
sudo apt-get remove docker docker-engine docker.io containerd runc
43+
sudo apt-get update
44+
sudo apt-get install \
45+
ca-certificates \
46+
curl \
47+
gnupg \
48+
lsb-release
49+
sudo mkdir -p /etc/apt/keyrings
50+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
51+
echo \
52+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
53+
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
54+
sudo apt-get update
55+
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
56+
# From Flatcar default configuration and image-builder containerd role.
57+
sudo sed -i 's/^disabled_plugins.*/disabled_plugins = []/g' /etc/containerd/config.toml
58+
cat <<EOF | sudo tee -a /etc/containerd/config.toml
59+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
60+
# setting runc.options unsets parent settings
61+
runtime_type = "io.containerd.runc.v2"
62+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
63+
SystemdCgroup = true
64+
EOF
65+
sudo systemctl restart containerd
3766
- name: Fetch dependencies and configure tests
3867
run: |
3968
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

.golangci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ linters-settings:
4545

4646
linters:
4747
disable:
48+
# We don't need this tight control over imports.
49+
- depguard
4850
# Disabled until we implement some error types and migrate to use them.
4951
- goerr113
5052
# As we use formatting rules from different linter and they are conflicting.
@@ -66,17 +68,17 @@ linters:
6668
- maligned
6769
- golint
6870
enable:
71+
- asasalint
6972
- asciicheck
7073
- bidichk
7174
- bodyclose
7275
- containedctx
7376
- contextcheck
7477
- cyclop
75-
- deadcode
7678
- decorder
77-
- depguard
7879
- dogsled
7980
- dupl
81+
- dupword
8082
- durationcheck
8183
- errchkjson
8284
- errname
@@ -86,6 +88,7 @@ linters:
8688
- exportloopref
8789
- forbidigo
8890
- funlen
91+
- gocheckcompilerdirectives
8992
- gochecknoglobals
9093
- gochecknoinits
9194
- gocognit
@@ -101,14 +104,17 @@ linters:
101104
- gomnd
102105
- gomodguard
103106
- goprintffuncname
107+
- gosmopolitan
104108
- grouper
105-
- ifshort
106109
- importas
107110
- ineffassign
111+
- interfacebloat
108112
- lll
109113
- maintidx
110114
- makezero
115+
- mirror
111116
- misspell
117+
- musttag
112118
- nakedret
113119
- nestif
114120
- nilerr
@@ -122,20 +128,22 @@ linters:
122128
- prealloc
123129
- predeclared
124130
- promlinter
131+
- reassign
125132
- revive
126133
- sqlclosecheck
127-
- structcheck
128134
- stylecheck
135+
- tagalign
129136
- tagliatelle
130137
- tenv
138+
- testableexamples
131139
- testpackage
132140
- thelper
133141
- tparallel
134-
- typecheck
135142
- unconvert
136143
- unparam
137-
- varcheck
144+
- usestdlibvars
138145
- wastedassign
139146
- whitespace
140147
- wrapcheck
141148
- wsl
149+
- zerologlint

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.0] - 2023-08-28
9+
### Changed
10+
- Updated `libflexkube` version to `v0.10.0`.
11+
- Updated remaining dependencies to latest versions.
12+
813
## [0.8.0] - 2022-09-13
914
### Changed
1015
- Updated `libflexkube` version to `v0.9.0`.
@@ -65,6 +70,7 @@ in `libflexkube` and `flexkube_pki` and `flexkube_etcd_cluster` resources compla
6570
### Changed
6671
- flexkube_containers: rename 'container' to 'host_configured_container'.
6772

73+
[0.9.0]: https://github.com/flexkube/terraform-provider-flexkube/compare/v0.8.0...v0.9.0
6874
[0.8.0]: https://github.com/flexkube/terraform-provider-flexkube/compare/v0.7.0...v0.8.0
6975
[0.7.0]: https://github.com/flexkube/terraform-provider-flexkube/compare/v0.6.0...v0.7.0
7076
[0.6.0]: https://github.com/flexkube/terraform-provider-flexkube/compare/v0.5.1...v0.6.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GOBUILD=CGO_ENABLED=$(CGO_ENABLED) $(GOCMD) build -v -buildmode=exe -ldflags $(L
1313
GO_PACKAGES=./...
1414
GO_TESTS=^.*$
1515

16-
GOLANGCI_LINT_VERSION=v1.46.0
16+
GOLANGCI_LINT_VERSION=v1.54.2
1717

1818
BIN_PATH=$$HOME/bin
1919

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ terraform {
1111
required_providers {
1212
flexkube = {
1313
source = "flexkube/flexkube"
14-
version = "0.7.0"
14+
version = "0.9.0"
1515
}
1616
}
1717
}

e2e/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM hashicorp/terraform:1.1.9
1+
FROM hashicorp/terraform:1.5.5
22

33
RUN apk add -U make bash bash-completion vim coreutils
44

5-
RUN wget https://get.helm.sh/helm-v3.8.1-linux-amd64.tar.gz -O - | tar -xzvf - linux-amd64/helm && \
5+
RUN wget https://get.helm.sh/helm-v3.12.3-linux-amd64.tar.gz -O - | tar -xzvf - linux-amd64/helm && \
66
mv linux-amd64/helm /usr/local/bin/
77

88
RUN wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(wget -q -O- https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \
99
&& chmod +x /usr/local/bin/kubectl \
1010
&& echo -e 'source /usr/share/bash-completion/bash_completion\nsource <(kubectl completion bash)' >> $HOME/.bashrc
1111

12-
RUN VERSION=0.56.6 OS=linux && \
12+
RUN VERSION=0.56.17 OS=linux && \
1313
wget "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${VERSION}/sonobuoy_${VERSION}_${OS}_amd64.tar.gz" -O sonobuoy.tar.gz && \
1414
tar -xzf sonobuoy.tar.gz -C /usr/local/bin && \
1515
chmod +x /usr/local/bin/sonobuoy && \

e2e/variables.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ variable "metrics_server_helm_chart_source" {
5555
}
5656

5757
variable "kube_apiserver_helm_chart_version" {
58-
default = "0.5.0"
58+
default = "0.8.0"
5959
}
6060

6161
variable "kubernetes_helm_chart_version" {
62-
default = "0.6.0"
62+
default = "0.9.0"
6363
}
6464

6565
variable "kube_proxy_helm_chart_version" {
66-
default = "0.5.0"
66+
default = "0.8.0"
6767
}
6868

6969
variable "tls_bootstrapping_helm_chart_version" {
@@ -75,15 +75,15 @@ variable "coredns_helm_chart_version" {
7575
}
7676

7777
variable "metrics_server_helm_chart_version" {
78-
default = "3.0.9"
78+
default = "3.0.10"
7979
}
8080

8181
variable "kubelet_rubber_stamp_helm_chart_version" {
82-
default = "0.1.8"
82+
default = "0.1.9"
8383
}
8484

8585
variable "calico_helm_chart_version" {
86-
default = "0.4.22"
86+
default = "0.5.1"
8787
}
8888

8989
variable "flatcar_channel" {

flexkube/direct.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
"github.com/flexkube/libflexkube/pkg/host/transport/direct"
77
)
88

9-
func directMarshal(c direct.Config) interface{} {
9+
func directMarshal(direct.Config) interface{} {
1010
return []interface{}{map[string]interface{}{}}
1111
}
1212

13-
func directUnmarshal(i interface{}) *direct.Config {
13+
func directUnmarshal(interface{}) *direct.Config {
1414
return &direct.Config{}
1515
}
1616

flexkube/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Provider() *schema.Provider {
2323
}
2424
}
2525

26-
func providerConfigure(d *schema.ResourceData) (interface{}, error) {
26+
func providerConfigure(*schema.ResourceData) (interface{}, error) {
2727
return &meta{
2828
helmClientLock: sync.Mutex{},
2929
}, nil

flexkube/resource_controlplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func controlplaneUnmarshal(d getter, includeState bool) types.ResourceConfig {
9797
return c
9898
}
9999

100-
func controlplaneDestroy(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
100+
func controlplaneDestroy(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics {
101101
c := controlplaneUnmarshal(d, true)
102102

103103
c.(*controlplane.Controlplane).Destroy = true

0 commit comments

Comments
 (0)