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

Upgrade controller-tools to 0.14.0 and fix formatting #181

Merged
merged 2 commits into from
Jun 3, 2024
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CHLOGGEN ?= $(LOCALBIN)/chloggen
ADDLICENSE ?= $(LOCALBIN)/addlicense

KUSTOMIZE_VERSION ?= v5.0.3
CONTROLLER_TOOLS_VERSION ?= v0.12.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use the latest version v0.15.0 instead?

Copy link
Contributor Author

@lisguo lisguo May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw in the github issue that 0.14.0 fixed it. Upstream is using 0.14.0 as well: https://github.com/open-telemetry/opentelemetry-operator/blob/main/Makefile#L393

ALL_SRC := $(shell find . -name '*.go' -type f | sort)
CW_AGENT_OPERATOR_IMPORT_PATH = "github.com/aws/amazon-cloudwatch-agent-operator"

Expand Down
19 changes: 16 additions & 3 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions apis/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion controllers/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"context"
"testing"

"github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
logf "sigs.k8s.io/controller-runtime/pkg/log"

"github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1"
)

func TestEnabledAcceleratedComputeByAgentConfig(t *testing.T) {
Expand Down
7 changes: 7 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,13 @@ AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent.
Volumes represents which volumes to use in the underlying collector deployment(s).<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>workingDir</b></td>
<td>string</td>
<td>
WorkingDir represents Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.<br/>
</td>
<td>false</td>
</tr></tbody>
</table>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"crypto/rand"
"encoding/json"
"fmt"
"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
"math/big"
"path/filepath"
"testing"
"time"

"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
)

func TestJavaAndPythonDaemonSet(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@ package annotations
import (
"context"
"fmt"
"github.com/google/uuid"
"strconv"
"testing"

"github.com/google/uuid"

"github.com/aws/amazon-cloudwatch-agent-operator/integration-tests/util"

"os"
"os/exec"
"path/filepath"
"strings"
"time"

appsV1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import (
"crypto/rand"
"encoding/json"
"fmt"
"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
"github.com/stretchr/testify/assert"
"math/big"
"path/filepath"
"testing"
"time"

"github.com/stretchr/testify/assert"

"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
)

func TestJavaAndPythonDeployment(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ import (
"crypto/rand"
"encoding/json"
"fmt"
"github.com/aws/amazon-cloudwatch-agent-operator/integration-tests/util"
"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
"github.com/google/uuid"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"math/big"
"os"
"path/filepath"
"testing"
"time"

"github.com/google/uuid"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/aws/amazon-cloudwatch-agent-operator/integration-tests/util"
"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
)

func TestJavaAndPythonNamespace(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"crypto/rand"
"encoding/json"
"fmt"
"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
"math/big"
"path/filepath"
"testing"
"time"

"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/auto"
)

func TestJavaAndPythonStatefulSet(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ package util
import (
"context"
"fmt"
"time"

appsV1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/kubernetes"
"time"
)

const TimoutDuration = 2 * time.Minute
Expand Down
Loading