Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ linters-settings:
ifshort:
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
max-decl-chars: 50
goimports:
gci:
local-prefixes: sigs.k8s.io/cluster-api-provider-openstack
importas:
no-unaliased: true
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha3/openstackcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const (

// OpenStackClusterSpec defines the desired state of OpenStackCluster.
type OpenStackClusterSpec struct {

// The name of the secret containing the openstack credentials
// +optional
// +k8s:conversion-gen=false
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha3/openstackmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ type OpenStackMachineSpec struct {

// OpenStackMachineStatus defines the observed state of OpenStackMachine.
type OpenStackMachineStatus struct {

// Ready is true when the provider resource is ready.
// +optional
Ready bool `json:"ready"`
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha4/openstackmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ type OpenStackMachineSpec struct {

// OpenStackMachineStatus defines the observed state of OpenStackMachine.
type OpenStackMachineStatus struct {

// Ready is true when the provider resource is ready.
// +optional
Ready bool `json:"ready"`
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/prometheus/client_golang v1.11.0
github.com/spf13/pflag v1.0.5
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
golang.org/x/text v0.3.6
gopkg.in/ini.v1 v1.63.2
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
Expand Down
9 changes: 1 addition & 8 deletions hack/ci/create_devstack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,7 @@ function wait_for_ssh {
function start_sshuttle {
if ! command -v sshuttle;
then
# Install sshuttle from source because we need: https://github.com/sshuttle/sshuttle/pull/661
# TODO(sbueringer) install via pip after the next release after 1.0.5 via:
# pip3 install sshuttle
pushd /tmp
git clone https://github.com/sshuttle/sshuttle.git
cd sshuttle
pip3 install .
popd || exit 1
pip3 install sshuttle
fi

kill_sshuttle
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/a8m/envsubst v1.2.0
github.com/golang/mock v1.6.0
github.com/golangci/golangci-lint v1.42.1
github.com/golangci/golangci-lint v1.45.2
github.com/itchyny/gojq v0.12.2
github.com/onsi/ginkgo v1.16.4
k8s.io/code-generator v0.22.2
Expand Down
523 changes: 383 additions & 140 deletions hack/tools/go.sum

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pkg/cloud/services/networking/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (s *Service) ReconcileRouter(openStackCluster *infrav1.OpenStackCluster, cl
return err
}

//nolint:ifshort
createInterface := true
// check all router interfaces for an existing port in our subnet.
INTERFACE_LOOP:
Expand Down
11 changes: 6 additions & 5 deletions pkg/record/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ limitations under the License.
package record

import (
"strings"
"sync"

"golang.org/x/text/cases"
"golang.org/x/text/language"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/record"
Expand All @@ -45,20 +46,20 @@ func InitFromRecorder(recorder record.EventRecorder) {

// Event constructs an event from the given information and puts it in the queue for sending.
func Event(object runtime.Object, reason, message string) {
defaultRecorder.Event(object, corev1.EventTypeNormal, strings.Title(reason), message)
defaultRecorder.Event(object, corev1.EventTypeNormal, cases.Title(language.English).String(reason), message)
}

// Eventf is just like Event, but with Sprintf for the message field.
func Eventf(object runtime.Object, reason, message string, args ...interface{}) {
defaultRecorder.Eventf(object, corev1.EventTypeNormal, strings.Title(reason), message, args...)
defaultRecorder.Eventf(object, corev1.EventTypeNormal, cases.Title(language.English).String(reason), message, args...)
}

// Warn constructs a warning event from the given information and puts it in the queue for sending.
func Warn(object runtime.Object, reason, message string) {
defaultRecorder.Event(object, corev1.EventTypeWarning, strings.Title(reason), message)
defaultRecorder.Event(object, corev1.EventTypeWarning, cases.Title(language.English).String(reason), message)
}

// Warnf is just like Warn, but with Sprintf for the message field.
func Warnf(object runtime.Object, reason, message string, args ...interface{}) {
defaultRecorder.Eventf(object, corev1.EventTypeWarning, strings.Title(reason), message, args...)
defaultRecorder.Eventf(object, corev1.EventTypeWarning, cases.Title(language.English).String(reason), message, args...)
}