Skip to content

Commit

Permalink
code-refactoring: Replace ArgoCD v1alpha1 references with v1beta1 (ar…
Browse files Browse the repository at this point in the history
…goproj-labs#1003)

* Replace ArgoCD v1alpha1 references with v1beta1

Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>

* Update alpha ref in keycloak.go

Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>

---------

Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
  • Loading branch information
svghadi authored and Julia Teslia committed Apr 24, 2024
1 parent 7305643 commit d105149
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions controllers/argocd/custommapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestArgoCDReconciler_tlsSecretMapperRepoServer(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -192,7 +192,7 @@ func TestArgoCDReconciler_tlsSecretMapperRepoServer(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -242,7 +242,7 @@ func TestArgoCDReconciler_tlsSecretMapperRepoServer(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -376,7 +376,7 @@ func TestArgoCDReconciler_tlsSecretMapperRedis(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -433,7 +433,7 @@ func TestArgoCDReconciler_tlsSecretMapperRedis(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -483,7 +483,7 @@ func TestArgoCDReconciler_tlsSecretMapperRedis(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down
2 changes: 1 addition & 1 deletion controllers/argocd/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func getKeycloakDeploymentConfigTemplate(cr *argoproj.ArgoCD) *appsv1.Deployment
Namespace: ns,
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
UID: cr.UID,
Name: cr.Name,
Controller: &controllerRef,
Expand Down
4 changes: 2 additions & 2 deletions controllers/argocd/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func Test_ArgoCDReconciler_ReconcileRepoTLSSecret(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down Expand Up @@ -375,7 +375,7 @@ func Test_ArgoCDReconciler_ReconcileRedisTLSSecret(t *testing.T) {
Namespace: "argocd-operator",
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "argoproj.io/v1alpha1",
APIVersion: "argoproj.io/v1beta1",
Kind: "ArgoCD",
Name: "argocd",
UID: argocd.GetUID(),
Expand Down
6 changes: 5 additions & 1 deletion controllers/argocd/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
"github.com/argoproj-labs/argocd-operator/pkg/argoutil"

=======
argoprojv1alpha1 "github.com/argoproj-labs/argocd-operator/api/v1alpha1"
>>>>>>> 5d6261d (code-refactoring: Replace ArgoCD v1alpha1 references with v1beta1 (#1003))
argoproj "github.com/argoproj-labs/argocd-operator/api/v1beta1"
=======
argoprojv1alpha1 "github.com/argoproj-labs/argocd-operator/api/v1alpha1"
Expand Down Expand Up @@ -92,7 +96,7 @@ func makeTestNs(opts ...namespaceOpt) *corev1.Namespace {
func makeTestReconciler(t *testing.T, objs ...runtime.Object) *ArgoCDReconciler {
s := scheme.Scheme
assert.NoError(t, argoproj.AddToScheme(s))
assert.NoError(t, argoproj.AddToScheme(s))
assert.NoError(t, argoprojv1alpha1.AddToScheme(s))

cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build()
logger := ctrl.Log.WithName("test-logger")
Expand Down

0 comments on commit d105149

Please sign in to comment.