Skip to content

Commit 9950e9f

Browse files
committed
outputResources -> targetKind
1 parent 2dbc207 commit 9950e9f

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

deploy/helm/secret-operator/crds/crds.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ spec:
392392
- kerberos
393393
nullable: true
394394
type: string
395-
outputResource:
395+
secretClassName:
396+
description: The name of the SecretClass that the request concerns.
397+
type: string
398+
targetKind:
396399
default: ConfigMap
397400
description: |-
398401
Which Kubernetes resource should be used to output the requested information to.
@@ -404,9 +407,6 @@ spec:
404407
- Secret
405408
- ConfigMap
406409
type: string
407-
secretClassName:
408-
description: The name of the SecretClass that the request concerns.
409-
type: string
410410
required:
411411
- secretClassName
412412
type: object

rust/operator-binary/src/crd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ pub struct TrustStoreSpec {
526526
///
527527
/// Can be either `ConfigMap` or `Secret`, defaults to `ConfigMap`.
528528
#[serde(default)]
529-
pub output_resource: TrustStoreOutputType,
529+
pub target_kind: TrustStoreOutputType,
530530

531531
/// The [format](DOCS_BASE_URL_PLACEHOLDER/secret-operator/secretclass#format) that the data should be converted into.
532532
pub format: Option<SecretFormat>,

rust/operator-binary/src/truststore_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ async fn reconcile(
305305
.context(BuildOwnerReferenceSnafu)?
306306
.build();
307307

308-
match truststore.spec.output_resource {
308+
match truststore.spec.target_kind {
309309
TrustStoreOutputType::ConfigMap => {
310310
let trust_cm = ConfigMap {
311311
metadata: trust_metadata,

tests/templates/kuttl/tls-truststore/02-assert.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ kind: TestAssert
44
timeout: 5
55
---
66
apiVersion: v1
7-
kind: {{ test_scenario['values']['truststore-output-resource'] }}
7+
kind: {{ test_scenario['values']['truststore-target-kind'] }}
88
metadata:
99
name: truststore-pem
1010
# data is validated in 03-assert.yaml
1111
---
1212
apiVersion: v1
13-
kind: {{ test_scenario['values']['truststore-output-resource'] }}
13+
kind: {{ test_scenario['values']['truststore-target-kind'] }}
1414
metadata:
1515
name: truststore-pkcs12
1616
# data is validated in 03-assert.yaml
1717
---
18-
{% if test_scenario['values']['truststore-output-resource'] == 'ConfigMap' %}
18+
{% if test_scenario['values']['truststore-target-kind'] == 'ConfigMap' %}
1919
apiVersion: v1
2020
kind: ConfigMap
2121
metadata:

tests/templates/kuttl/tls-truststore/02_truststore.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
spec:
88
secretClassName: tls-$NAMESPACE
99
format: tls-pem
10-
outputResource: {{ test_scenario['values']['truststore-output-resource'] }}
10+
targetKind: {{ test_scenario['values']['truststore-target-kind'] }}
1111
---
1212
apiVersion: secrets.stackable.tech/v1alpha1
1313
kind: TrustStore
@@ -16,12 +16,12 @@ metadata:
1616
spec:
1717
secretClassName: tls-$NAMESPACE
1818
format: tls-pkcs12
19-
outputResource: {{ test_scenario['values']['truststore-output-resource'] }}
19+
targetKind: {{ test_scenario['values']['truststore-target-kind'] }}
2020
---
2121
apiVersion: secrets.stackable.tech/v1alpha1
2222
kind: TrustStore
2323
metadata:
2424
name: truststore-k8ssearch
2525
spec:
2626
secretClassName: k8ssearch-$NAMESPACE
27-
outputResource: {{ test_scenario['values']['truststore-output-resource'] }}
27+
targetKind: {{ test_scenario['values']['truststore-target-kind'] }}

tests/templates/kuttl/tls-truststore/03-assert.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: kuttl.dev/v1beta1
44
kind: TestAssert
55
timeout: 10
66
commands:
7-
{% if test_scenario['values']['truststore-output-resource'] == 'ConfigMap' %}
7+
{% if test_scenario['values']['truststore-target-kind'] == 'ConfigMap' %}
88
- script: kubectl --namespace=$NAMESPACE get configmap/truststore-pem --output=jsonpath='{.data.ca\.crt}' | openssl x509 -noout
99
- script: kubectl --namespace=$NAMESPACE get configmap/truststore-pkcs12 --output=jsonpath='{.binaryData.truststore\.p12}' | base64 --decode | openssl pkcs12 -noout -passin 'pass:' -legacy
1010
{% else %}

tests/test-definition.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dimensions:
1919
values:
2020
- false
2121
- true
22-
- name: truststore-output-resource
22+
- name: truststore-target-kind
2323
values:
2424
- ConfigMap
2525
- Secret
@@ -44,7 +44,7 @@ tests:
4444
- name: tls-truststore
4545
dimensions:
4646
- openshift
47-
- truststore-output-resource
47+
- truststore-target-kind
4848
- name: cert-manager-tls
4949
dimensions:
5050
- openshift

0 commit comments

Comments
 (0)