Skip to content

Commit d673cc8

Browse files
committed
Updated crds, added missing labels.
1 parent bbc947e commit d673cc8

9 files changed

Lines changed: 40 additions & 30 deletions

manifests/generate-manifests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ dotnet run --no-build --project $project -- generator crd -o $output\crd\
2020
# Remove-Item -Recurse $output\installer\ -ErrorAction Ignore
2121
# dotnet run --no-build --project $project -- generator installer -o $output\installer\
2222

23-
Write-Host "Generating operator."
24-
Remove-Item -Recurse $output\operator\ -ErrorAction Ignore
25-
dotnet run --no-build --project $project -- generator operator -o $output\operator\
23+
# Write-Host "Generating operator."
24+
# Remove-Item -Recurse $output\operator\ -ErrorAction Ignore
25+
# dotnet run --no-build --project $project -- generator operator -o $output\operator\
2626

2727
Write-Host "Generating rbac."
2828
Remove-Item -Recurse $output\rbac\ -ErrorAction Ignore

manifests/install/all/base/crd/agentconfigurations_agents_contrastsecurity_com.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: agentconfigurations.agents.contrastsecurity.com
5+
labels:
6+
app.kubernetes.io/part-of: contrast-agent-operator
57
spec:
68
group: agents.contrastsecurity.com
79
names:
@@ -28,4 +30,4 @@ spec:
2830
type: object
2931
type: object
3032
served: true
31-
storage: true
33+
storage: true

manifests/install/all/base/crd/agentconnections_agents_contrastsecurity_com.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: agentconnections.agents.contrastsecurity.com
5+
labels:
6+
app.kubernetes.io/part-of: contrast-agent-operator
57
spec:
68
group: agents.contrastsecurity.com
79
names:
@@ -82,4 +84,4 @@ spec:
8284
type: object
8385
type: object
8486
served: true
85-
storage: true
87+
storage: true

manifests/install/all/base/crd/agentinjectors_agents_contrastsecurity_com.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: agentinjectors.agents.contrastsecurity.com
5+
labels:
6+
app.kubernetes.io/part-of: contrast-agent-operator
57
spec:
68
group: agents.contrastsecurity.com
79
names:
@@ -25,7 +27,7 @@ spec:
2527
type: boolean
2628
version:
2729
description: |-
28-
The version of the agent to inject. The literal 'latest' will inject the latest version detected.
30+
The version of the agent to inject. The literal 'latest' will inject the last version. Partial version matches are supported, e.g. '2' will select the version '2.1.0'.
2931
Defaults to 'latest'.
3032
nullable: true
3133
pattern: ^(latest|(\d+(\.\d+){0,3}(-.+)?))$
@@ -41,7 +43,7 @@ spec:
4143
properties:
4244
registry:
4345
description: |-
44-
The fully qualified name of the registry to pull agent images from. This registry must be accessible by the pods being injected.
46+
The fully qualified name of the registry to pull agent images from. This registry must be accessible by the pods being injected and the operator.
4547
Defaults to the official Contrast container image registry.
4648
nullable: true
4749
type: string
@@ -52,7 +54,7 @@ spec:
5254
nullable: true
5355
type: string
5456
pullSecretName:
55-
description: The name of a pull secret to append to the pod's imagePullSecrets.
57+
description: The name of a pull secret to append to the pod's imagePullSecrets list.
5658
nullable: true
5759
type: string
5860
pullPolicy:
@@ -71,14 +73,14 @@ spec:
7173
images:
7274
description: |-
7375
Container images to inject the agent into. Glob patterns are supported.
74-
Defaults to ['*'].
76+
Selects all containers in Pod.
7577
items:
7678
type: string
7779
type: array
7880
labels:
7981
description: |-
80-
Deployment/StatefulSet/DaemonSet labels whose pods are eligible for agent injection.
81-
Defaults to selecting everything.
82+
Deployment/StatefulSet/DaemonSet/DeploymentConfig labels whose pods are eligible for agent injection.
83+
Selects all workloads in namespace.
8284
items:
8385
properties:
8486
name:
@@ -113,7 +115,7 @@ spec:
113115
name:
114116
description: |-
115117
The name of a AgentConfiguration resource. Must exist within the same namespace.
116-
Defaults a AgentConfiguration specified by a ClusterAgentConnection.
118+
Defaults a AgentConfiguration specified by a ClusterAgentConfiguration.
117119
nullable: true
118120
type: string
119121
type: object
@@ -122,4 +124,4 @@ spec:
122124
type: object
123125
type: object
124126
served: true
125-
storage: true
127+
storage: true

manifests/install/all/base/crd/clusteragentconfigurations_agents_contrastsecurity_com.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: clusteragentconfigurations.agents.contrastsecurity.com
5+
labels:
6+
app.kubernetes.io/part-of: contrast-agent-operator
57
spec:
68
group: agents.contrastsecurity.com
79
names:
@@ -45,8 +47,8 @@ spec:
4547
type: object
4648
namespaces:
4749
description: |-
48-
The namespaces to apply this AgentConfiguration template to. Splat syntax is supported.
49-
Optional, defaults to '*', selecting all namespaces.
50+
The namespaces to apply this AgentConfiguration template to. Glob syntax is supported.
51+
Optional, defaults to selecting all namespaces.
5052
items:
5153
type: string
5254
type: array
@@ -55,4 +57,4 @@ spec:
5557
type: object
5658
type: object
5759
served: true
58-
storage: true
60+
storage: true

manifests/install/all/base/crd/clusteragentconnections_agents_contrastsecurity_com.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
name: clusteragentconnections.agents.contrastsecurity.com
5+
labels:
6+
app.kubernetes.io/part-of: contrast-agent-operator
57
spec:
68
group: agents.contrastsecurity.com
79
names:
@@ -99,8 +101,8 @@ spec:
99101
type: object
100102
namespaces:
101103
description: |-
102-
The namespaces to apply this AgentConfiguration template to. Splat syntax is supported.
103-
Optional, defaults to '*', selecting all namespaces.
104+
The namespaces to apply this AgentConnection template to. Glob syntax is supported.
105+
Optional, defaults to selecting all namespaces.
104106
items:
105107
type: string
106108
type: array
@@ -109,4 +111,4 @@ spec:
109111
type: object
110112
type: object
111113
served: true
112-
storage: true
114+
storage: true

src/Contrast.K8s.AgentOperator/Entities/V1Beta1AgentInjector.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class AgentInjectorSpec
2121
public bool Enabled { get; set; } = true;
2222

2323
/// <summary>
24-
/// The version of the agent to inject. The literal 'latest' will inject the latest version detected.
24+
/// The version of the agent to inject. The literal 'latest' will inject the last version. Partial version matches are supported, e.g. '2' will select the version '2.1.0'.
2525
/// Defaults to 'latest'.
2626
/// </summary>
2727
[Pattern(RegexConstants.InjectorVersionRegex)]
@@ -59,7 +59,7 @@ public class AgentInjectorSpec
5959
public class AgentInjectorImageSpec
6060
{
6161
/// <summary>
62-
/// The fully qualified name of the registry to pull agent images from. This registry must be accessible by the pods being injected.
62+
/// The fully qualified name of the registry to pull agent images from. This registry must be accessible by the pods being injected and the operator.
6363
/// Defaults to the official Contrast container image registry.
6464
/// </summary>
6565
public string? Registry { get; set; }
@@ -71,7 +71,7 @@ public class AgentInjectorImageSpec
7171
public string? Name { get; set; }
7272

7373
/// <summary>
74-
/// The name of a pull secret to append to the pod's imagePullSecrets.
74+
/// The name of a pull secret to append to the pod's imagePullSecrets list.
7575
/// </summary>
7676
public string? PullSecretName { get; set; }
7777

@@ -87,13 +87,13 @@ public class AgentInjectorSelectorSpec
8787
{
8888
/// <summary>
8989
/// Container images to inject the agent into. Glob patterns are supported.
90-
/// Defaults to ['*'].
90+
/// Selects all containers in Pod.
9191
/// </summary>
9292
public IReadOnlyCollection<string> Images { get; set; } = Array.Empty<string>();
9393

9494
/// <summary>
95-
/// Deployment/StatefulSet/DaemonSet labels whose pods are eligible for agent injection.
96-
/// Defaults to selecting everything.
95+
/// Deployment/StatefulSet/DaemonSet/DeploymentConfig labels whose pods are eligible for agent injection.
96+
/// Selects all workloads in namespace.
9797
/// </summary>
9898
public IReadOnlyCollection<LabelSelectorSpec> Labels { get; set; } = Array.Empty<LabelSelectorSpec>();
9999
}
@@ -127,7 +127,7 @@ public class AgentInjectorConfigurationSpec
127127
{
128128
/// <summary>
129129
/// The name of a AgentConfiguration resource. Must exist within the same namespace.
130-
/// Defaults a AgentConfiguration specified by a ClusterAgentConnection.
130+
/// Defaults a AgentConfiguration specified by a ClusterAgentConfiguration.
131131
/// </summary>
132132
public string? Name { get; set; }
133133
}

src/Contrast.K8s.AgentOperator/Entities/V1Beta1ClusterAgentConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public class ClusterAgentConfigurationSpec
2222
public V1Beta1AgentConfiguration? Template { get; set; }
2323

2424
/// <summary>
25-
/// The namespaces to apply this AgentConfiguration template to. Splat syntax is supported.
26-
/// Optional, defaults to '*', selecting all namespaces.
25+
/// The namespaces to apply this AgentConfiguration template to. Glob syntax is supported.
26+
/// Optional, defaults to selecting all namespaces.
2727
/// </summary>
2828
public IReadOnlyCollection<string> Namespaces { get; set; } = Array.Empty<string>();
2929
}

src/Contrast.K8s.AgentOperator/Entities/V1Beta1ClusterAgentConnection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public class ClusterAgentConnectionSpec
2222
public V1Beta1AgentConnection? Template { get; set; }
2323

2424
/// <summary>
25-
/// The namespaces to apply this AgentConfiguration template to. Splat syntax is supported.
26-
/// Optional, defaults to '*', selecting all namespaces.
25+
/// The namespaces to apply this AgentConnection template to. Glob syntax is supported.
26+
/// Optional, defaults to selecting all namespaces.
2727
/// </summary>
2828
public IReadOnlyCollection<string> Namespaces { get; set; } = Array.Empty<string>();
2929
}

0 commit comments

Comments
 (0)