Skip to content

Commit 974290d

Browse files
committed
Fix merge conflicts 3
Signed-off-by: Rizwana777 <[email protected]>
1 parent 6080a21 commit 974290d

File tree

6 files changed

+20
-404
lines changed

6 files changed

+20
-404
lines changed

bundle/manifests/argocd-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ metadata:
257257
capabilities: Deep Insights
258258
categories: Integration & Delivery
259259
certified: "false"
260-
createdAt: "2025-05-14T11:29:42Z"
260+
createdAt: "2025-05-15T16:10:29Z"
261261
description: Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
262262
operators.operatorframework.io/builder: operator-sdk-v1.35.0
263263
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
Lines changed: 0 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
1-
<<<<<<< HEAD
2-
<<<<<<< HEAD
3-
=======
4-
5-
>>>>>>> 49a050d (Fix merge conflicts)
6-
=======
7-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
81
---
92
apiVersion: apiextensions.k8s.io/v1
103
kind: CustomResourceDefinition
114
metadata:
125
annotations:
13-
<<<<<<< HEAD
14-
<<<<<<< HEAD
156
controller-gen.kubebuilder.io/version: v0.14.0
16-
=======
17-
controller-gen.kubebuilder.io/version: v0.6.1
18-
creationTimestamp: null
19-
>>>>>>> 49a050d (Fix merge conflicts)
20-
=======
21-
controller-gen.kubebuilder.io/version: v0.14.0
22-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
237
name: namespacemanagements.argoproj.io
248
spec:
259
group: argoproj.io
@@ -37,16 +21,11 @@ spec:
3721
API
3822
properties:
3923
apiVersion:
40-
<<<<<<< HEAD
41-
<<<<<<< HEAD
42-
=======
43-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
4424
description: |-
4525
APIVersion defines the versioned schema of this representation of an object.
4626
Servers should convert recognized schemas to the latest internal value, and
4727
may reject unrecognized values.
4828
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
49-
<<<<<<< HEAD
5029
type: string
5130
kind:
5231
description: |-
@@ -55,26 +34,6 @@ spec:
5534
Cannot be updated.
5635
In CamelCase.
5736
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
58-
=======
59-
description: 'APIVersion defines the versioned schema of this representation
60-
of an object. Servers should convert recognized schemas to the latest
61-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
62-
type: string
63-
kind:
64-
description: 'Kind is a string value representing the REST resource this
65-
object represents. Servers may infer this from the endpoint the client
66-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
67-
>>>>>>> 49a050d (Fix merge conflicts)
68-
=======
69-
type: string
70-
kind:
71-
description: |-
72-
Kind is a string value representing the REST resource this object represents.
73-
Servers may infer this from the endpoint the client submits requests to.
74-
Cannot be updated.
75-
In CamelCase.
76-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
77-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
7837
type: string
7938
metadata:
8039
type: object
@@ -94,10 +53,6 @@ spec:
9453
conditions
9554
items:
9655
description: "Condition contains details for one aspect of the current
97-
<<<<<<< HEAD
98-
<<<<<<< HEAD
99-
=======
100-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
10156
state of this API Resource.\n---\nThis struct is intended for
10257
direct use as an array at the field path .status.conditions. For
10358
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
@@ -107,38 +62,6 @@ spec:
10762
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
10863
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
10964
\ // other fields\n\t}"
110-
<<<<<<< HEAD
111-
properties:
112-
lastTransitionTime:
113-
description: |-
114-
lastTransitionTime is the last time the condition transitioned from one status to another.
115-
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
116-
format: date-time
117-
type: string
118-
message:
119-
description: |-
120-
message is a human readable message indicating details about the transition.
121-
This may be an empty string.
122-
maxLength: 32768
123-
type: string
124-
observedGeneration:
125-
description: |-
126-
observedGeneration represents the .metadata.generation that the condition was set based upon.
127-
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
128-
with respect to the current state of the instance.
129-
=======
130-
state of this API Resource. --- This struct is intended for direct
131-
use as an array at the field path .status.conditions. For example,
132-
\n \ttype FooStatus struct{ \t // Represents the observations
133-
of a foo's current state. \t // Known .status.conditions.type
134-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
135-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
136-
\t // +listMapKey=type \t Conditions []metav1.Condition
137-
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
138-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
139-
\t}"
140-
=======
141-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
14265
properties:
14366
lastTransitionTime:
14467
description: |-
@@ -153,42 +76,19 @@ spec:
15376
maxLength: 32768
15477
type: string
15578
observedGeneration:
156-
<<<<<<< HEAD
157-
description: observedGeneration represents the .metadata.generation
158-
that the condition was set based upon. For instance, if .metadata.generation
159-
is currently 12, but the .status.conditions[x].observedGeneration
160-
is 9, the condition is out of date with respect to the current
161-
state of the instance.
162-
>>>>>>> 49a050d (Fix merge conflicts)
163-
=======
16479
description: |-
16580
observedGeneration represents the .metadata.generation that the condition was set based upon.
16681
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
16782
with respect to the current state of the instance.
168-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
16983
format: int64
17084
minimum: 0
17185
type: integer
17286
reason:
173-
<<<<<<< HEAD
174-
<<<<<<< HEAD
175-
=======
176-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
17787
description: |-
17888
reason contains a programmatic identifier indicating the reason for the condition's last transition.
17989
Producers of specific condition types may define expected values and meanings for this field,
18090
and whether the values are considered a guaranteed API.
18191
The value should be a CamelCase string.
182-
<<<<<<< HEAD
183-
=======
184-
description: reason contains a programmatic identifier indicating
185-
the reason for the condition's last transition. Producers
186-
of specific condition types may define expected values and
187-
meanings for this field, and whether the values are considered
188-
a guaranteed API. The value should be a CamelCase string.
189-
>>>>>>> 49a050d (Fix merge conflicts)
190-
=======
191-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
19292
This field may not be empty.
19393
maxLength: 1024
19494
minLength: 1
@@ -202,26 +102,12 @@ spec:
202102
- Unknown
203103
type: string
204104
type:
205-
<<<<<<< HEAD
206-
<<<<<<< HEAD
207-
=======
208-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
209105
description: |-
210106
type of condition in CamelCase or in foo.example.com/CamelCase.
211107
---
212108
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
213109
useful (see .node.status.conditions), the ability to deconflict is important.
214110
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
215-
<<<<<<< HEAD
216-
=======
217-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
218-
--- Many .condition.type values are consistent across resources
219-
like Available, but because arbitrary conditions can be useful
220-
(see .node.status.conditions), the ability to deconflict is
221-
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
222-
>>>>>>> 49a050d (Fix merge conflicts)
223-
=======
224-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)
225111
maxLength: 316
226112
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
227113
type: string
@@ -239,15 +125,3 @@ spec:
239125
storage: true
240126
subresources:
241127
status: {}
242-
<<<<<<< HEAD
243-
<<<<<<< HEAD
244-
=======
245-
status:
246-
acceptedNames:
247-
kind: ""
248-
plural: ""
249-
conditions: []
250-
storedVersions: []
251-
>>>>>>> 49a050d (Fix merge conflicts)
252-
=======
253-
>>>>>>> f0cd5b4 (Fix merge conflicts 2)

controllers/argocd/namespaceManagement_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ func TestReconcileNamespaceManagement_DeduplicateNamespaces(t *testing.T) {
305305
{Name: "ns-1", AllowManagedBy: true},
306306
}
307307
})
308-
testClient := testclient.NewSimpleClientset()
309308

310309
nm := &argoproj.NamespaceManagement{
311310
ObjectMeta: metav1.ObjectMeta{

controllers/argocd/secret_test.go

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -578,97 +578,6 @@ func TestGenerateSortedManagedNamespaceListForArgoCDCR(t *testing.T) {
578578

579579
assert.NoError(t, createNamespace(r, a.Namespace, ""))
580580

581-
// 1) The result of call should include both 'my-managed-namespace' and a.Namespace
582-
managedByNamespace := corev1.Namespace{
583-
ObjectMeta: metav1.ObjectMeta{
584-
Name: "my-managed-namespace",
585-
Labels: map[string]string{common.ArgoCDManagedByLabel: a.Namespace},
586-
},
587-
}
588-
err := cl.Create(context.Background(), &managedByNamespace)
589-
assert.NoError(t, err)
590-
591-
res, err := generateSortedManagedNamespaceListForArgoCDCR(a, r.Client)
592-
assert.NoError(t, err)
593-
assert.Equal(t, res, []string{a.Namespace, managedByNamespace.Name})
594-
595-
// 2) Ensure that results returned by this function are sorted by namespace name
596-
err = cl.Delete(context.Background(), &managedByNamespace)
597-
assert.NoError(t, err)
598-
599-
managedByNamespace = corev1.Namespace{
600-
ObjectMeta: metav1.ObjectMeta{
601-
Name: "aaaa-first-when-sorted",
602-
Labels: map[string]string{common.ArgoCDManagedByLabel: a.Namespace},
603-
},
604-
}
605-
err = cl.Create(context.Background(), &managedByNamespace)
606-
assert.NoError(t, err)
607-
608-
res, err = generateSortedManagedNamespaceListForArgoCDCR(a, r.Client)
609-
assert.NoError(t, err)
610-
assert.Equal(t, res, []string{managedByNamespace.Name, a.Namespace})
611-
612-
// If Namespace management is enabled, fetch from NamespaceManagement CRs
613-
// and Ensure that results returned by this function are sorted by namespace name
614-
os.Setenv(common.EnableManagedNamespace, "true")
615-
defer os.Unsetenv(common.EnableManagedNamespace)
616-
617-
nsMgmt1 := argoproj.NamespaceManagement{
618-
ObjectMeta: metav1.ObjectMeta{
619-
Name: "namespace-mgmt-1",
620-
Namespace: "aaaa-second-when-sorted-nm",
621-
},
622-
Spec: argoproj.NamespaceManagementSpec{
623-
ManagedBy: a.Namespace,
624-
},
625-
}
626-
627-
nsMgmt2 := argoproj.NamespaceManagement{
628-
ObjectMeta: metav1.ObjectMeta{
629-
Name: "namespace-mgmt-2",
630-
Namespace: "bbbb-third-when-sorted-nm",
631-
},
632-
Spec: argoproj.NamespaceManagementSpec{
633-
ManagedBy: a.Namespace,
634-
},
635-
}
636-
637-
err = cl.Create(context.Background(), &nsMgmt1)
638-
assert.NoError(t, err)
639-
err = cl.Create(context.Background(), &nsMgmt2)
640-
assert.NoError(t, err)
641-
642-
res, err = generateSortedManagedNamespaceListForArgoCDCR(a, r.Client)
643-
assert.NoError(t, err)
644-
assert.Equal(t, res, []string{managedByNamespace.Name, nsMgmt1.Namespace, a.Namespace, nsMgmt2.Namespace})
645-
646-
}
647-
648-
func TestGenerateSortedManagedNamespaceListForArgoCDCR1(t *testing.T) {
649-
logf.SetLogger(ZapLogger(true))
650-
a := makeTestArgoCD(func(cr *argoproj.ArgoCD) {
651-
cr.Spec.NamespaceManagement = []argoproj.ManagedNamespaces{
652-
{
653-
Name: "aaaa-second-when-sorted-nm",
654-
AllowManagedBy: true,
655-
},
656-
{
657-
Name: "bbbb-third-when-sorted-nm",
658-
AllowManagedBy: true,
659-
},
660-
}
661-
})
662-
663-
resObjs := []client.Object{a}
664-
subresObjs := []client.Object{a}
665-
runtimeObjs := []runtime.Object{}
666-
sch := makeTestReconcilerScheme(argoproj.AddToScheme)
667-
cl := makeTestReconcilerClient(sch, resObjs, subresObjs, runtimeObjs)
668-
r := makeTestReconciler(cl, sch, testclient.NewSimpleClientset())
669-
670-
assert.NoError(t, createNamespace(r, a.Namespace, ""))
671-
672581
t.Run("should return default and managedBy namespaces", func(t *testing.T) {
673582
ns := corev1.Namespace{
674583
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)