Skip to content

Commit bce642a

Browse files
committed
Merge branch 'main' into feat/AB#72725/owner-role-name-id-support
2 parents 180d739 + 8a14a72 commit bce642a

File tree

9 files changed

+32
-38
lines changed

9 files changed

+32
-38
lines changed

.github/workflows/keyfactor-bootstrap-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: go test -v ./...
4747

4848
call-starter-workflow:
49-
uses: keyfactor/actions/.github/workflows/starter.yml@v3
49+
uses: keyfactor/actions/.github/workflows/starter.yml@3.2.0
5050
needs: test
5151
secrets:
5252
token: ${{ secrets.V2BUILDTOKEN}}

api/v1alpha1/issuer_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ type IssuerSpec struct {
4747
APIPath string `json:"apiPath,omitempty"`
4848

4949
// EnrollmentPatternId is the ID of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
50-
// If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
50+
// If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
5151
// If EnrollmentPatternId and EnrollmentPatternName are both specified, EnrollmentPatternId will take precedence.
5252
// Enrollment will fail if the specified template is not compatible with the enrollment pattern.
5353
// Refer to the Keyfactor Command documentation for more information.
5454
EnrollmentPatternId int32 `json:"enrollmentPatternId,omitempty"`
5555

5656
// EnrollmentPatternName is the name of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
57-
// If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
57+
// If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
5858
// If EnrollmentPatternId and EnrollmentPatternName are both specified, EnrollmentPatternId will take precedence.
5959
// Enrollment will fail if the specified template is not compatible with the enrollment pattern.
6060
// Refer to the Keyfactor Command documentation for more information.
6161
EnrollmentPatternName string `json:"enrollmentPatternName,omitempty"`
6262

6363
// Deprecated. CertificateTemplate is the name of the certificate template to use. If using Keyfactor Command 25.1 or later, use EnrollmentPatternName or EnrollmentPatternId instead.
64-
// If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
64+
// If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
6565
// Enrollment will fail if the specified template is not compatible with the enrollment pattern.
6666
// Refer to the Keyfactor Command documentation for more information.
6767
CertificateTemplate string `json:"certificateTemplate,omitempty"`

config/crd/bases/command-issuer.keyfactor.com_clusterissuers.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ spec:
7171
enrollmentPatternId:
7272
description: |-
7373
EnrollmentPatternId is the ID of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
74-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
75-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
74+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
75+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
7676
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
7777
Refer to the Keyfactor Command documentation for more information.
7878
type: integer
7979
format: int32
8080
enrollmentPatternName:
8181
description: |-
8282
EnrollmentPatternName is the name of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
83-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
84-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
83+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
84+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
8585
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
8686
Refer to the Keyfactor Command documentation for more information.
8787
type: string
@@ -103,7 +103,7 @@ spec:
103103
certificateTemplate:
104104
description: |-
105105
CertificateTemplate is the name of the certificate template to use. Deprecated in favor of EnrollmentPattern as of Keyfactor Command 25.1.
106-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
106+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
107107
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
108108
Refer to the Keyfactor Command documentation for more information.
109109
type: string

config/crd/bases/command-issuer.keyfactor.com_issuers.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ spec:
7171
enrollmentPatternId:
7272
description: |-
7373
EnrollmentPatternId is the ID of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
74-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
75-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
74+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
75+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
7676
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
7777
Refer to the Keyfactor Command documentation for more information.
7878
type: integer
7979
format: int32
8080
enrollmentPatternName:
8181
description: |-
8282
EnrollmentPatternName is the name of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
83-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
84-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
83+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
84+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
8585
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
8686
Refer to the Keyfactor Command documentation for more information.
8787
type: string
@@ -103,7 +103,7 @@ spec:
103103
certificateTemplate:
104104
description: |-
105105
CertificateTemplate is the name of the certificate template to use. Deprecated in favor of EnrollmentPattern as of Keyfactor Command 25.1.
106-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
106+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
107107
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
108108
Refer to the Keyfactor Command documentation for more information.
109109
type: string

deploy/charts/command-cert-manager-issuer/templates/crds/clusterissuers.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ spec:
6565
enrollmentPatternId:
6666
description: |-
6767
EnrollmentPatternId is the ID of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
68-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
69-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
68+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
69+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
7070
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
7171
Refer to the Keyfactor Command documentation for more information.
7272
type: integer
7373
format: int32
7474
enrollmentPatternName:
7575
description: |-
7676
EnrollmentPatternName is the name of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
77-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
78-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
77+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
78+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
7979
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
8080
Refer to the Keyfactor Command documentation for more information.
8181
type: string
@@ -97,7 +97,7 @@ spec:
9797
certificateTemplate:
9898
description: |-
9999
CertificateTemplate is the name of the certificate template to use. Deprecated in favor of EnrollmentPattern as of Keyfactor Command 25.1.
100-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
100+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
101101
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
102102
Refer to the Keyfactor Command documentation for more information.
103103
type: string

deploy/charts/command-cert-manager-issuer/templates/crds/issuers.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ spec:
6565
enrollmentPatternId:
6666
description: |-
6767
EnrollmentPatternId is the ID of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
68-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
69-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
68+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
69+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
7070
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
7171
Refer to the Keyfactor Command documentation for more information.
7272
type: integer
7373
format: int32
7474
enrollmentPatternName:
7575
description: |-
7676
EnrollmentPatternName is the name of the enrollment pattern to use. Supported in Keyfactor Command 25.1 and later.
77-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
78-
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precendence.
77+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
78+
If both enrollmentPatternId and enrollmentPatternName are specified, enrollmentPatternId will take precedence.
7979
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
8080
Refer to the Keyfactor Command documentation for more information.
8181
type: string
@@ -97,7 +97,7 @@ spec:
9797
certificateTemplate:
9898
description: |-
9999
CertificateTemplate is the name of the certificate template to use. Deprecated in favor of EnrollmentPattern as of Keyfactor Command 25.1.
100-
If both enrollment pattern and certificate template are specified, enrollment pattern will take precendence.
100+
If both enrollment pattern and certificate template are specified, enrollment pattern will take precedence.
101101
Enrollment will fail if the specified template is not compatible with the enrollment pattern.
102102
Refer to the Keyfactor Command documentation for more information.
103103
type: string

e2e/run_tests.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ install_cert_manager_issuer() {
201201

202202
# Only set the image repository parameter if we are deploying locally
203203
if [[ "$IS_LOCAL_DEPLOYMENT" == "true" ]]; then
204-
IMAGE_REPO_PARAM="--set image.repository=${IMAGE_NAME}"
204+
IMAGE_REPO_PARAM="--set image.repository=${IMAGE_REPO}/${IMAGE_NAME}"
205205
else
206206
IMAGE_REPO_PARAM=""
207207
fi
@@ -432,23 +432,13 @@ add_issuer_specification_field() {
432432
local field_value=$2
433433
local issuer_or_cluster_issuer=$3
434434

435-
resolved_value=""
436-
437-
# if field is strictly numeric, add the field as numeric. Otherwise, treat as string
438-
if [[ $field_value =~ ^[0-9]+$ ]]; then
439-
resolved_value=$field_value
440-
else
441-
resolved_value="\"$field_value\""
442-
fi
443-
444435
local target=$ISSUER_CRD_FQTN
445436
if [[ $issuer_or_cluster_issuer == "ClusterIssuer" ]]; then
446437
target=$CLUSTER_ISSUER_CRD_FQTN
447438
fi
448439

449440
echo "Adding $target specification field: $field_name with value: $field_value"
450441

451-
452442
kubectl -n "$ISSUER_NAMESPACE" patch $target $ISSUER_CR_NAME --type='json' -p="[{\"op\": \"add\", \"path\": \"/spec/$field_name\", \"value\": $field_value}]"
453443

454444
echo "✅ Issuer specification field added successfully."
@@ -534,6 +524,9 @@ if "$IS_LOCAL_DEPLOYMENT" = "true"; then
534524
echo "🐳 Building ${FULL_IMAGE_NAME} Docker image..."
535525
docker build -t ${FULL_IMAGE_NAME} .
536526
echo "✅ Docker image built successfully"
527+
528+
echo "📦 Listing Docker images..."
529+
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.CreatedAt}}\t{{.Size}}" | head -11
537530
fi
538531

539532
# 5. Deploy the command-cert-manager-issuer Helm chart if not exists
@@ -589,6 +582,7 @@ echo ""
589582
# Deploy Issuer
590583
echo "🔐 Deploying $ISSUER_NAMESPACE namespace if not exists..."
591584
kubectl create namespace ${ISSUER_NAMESPACE} --dry-run=client -o yaml | kubectl apply -f -
585+
regenerate_issuer
592586
echo "$ISSUER_NAMESPACE namespace is ready"
593587
echo ""
594588

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.24.0
66

77
require (
88
github.com/Keyfactor/keyfactor-auth-client-go v1.3.0
9-
github.com/Keyfactor/keyfactor-go-client-sdk/v25 v25.0.1
9+
github.com/Keyfactor/keyfactor-go-client-sdk/v25 v25.0.2
1010
github.com/cert-manager/cert-manager v1.16.2
1111
github.com/go-logr/logr v1.4.2
1212
github.com/stretchr/testify v1.10.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 h1:oygO0locgZJ
2424
github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
2525
github.com/Keyfactor/keyfactor-auth-client-go v1.3.0 h1:otC213b6CYzqeN9b3CRlH1Qj1hTFIN5nqPA8gTlHdLg=
2626
github.com/Keyfactor/keyfactor-auth-client-go v1.3.0/go.mod h1:97vCisBNkdCK0l2TuvOSdjlpvQa4+GHsMut1UTyv1jo=
27-
github.com/Keyfactor/keyfactor-go-client-sdk/v25 v25.0.1 h1:FkERxNxOyoSHBJP/vS60DLH0g+f8mKeJd8IUAGhV8m8=
28-
github.com/Keyfactor/keyfactor-go-client-sdk/v25 v25.0.1/go.mod h1:VnVW8x+pChhnOWBR1PNYPeCQQjlWIK1bwHI8i8j7UPI=
27+
github.com/Keyfactor/keyfactor-go-client-sdk/v25 v25.0.2 h1:7VsZOYgMHAO2a1eeyVgDKel9TJXXYRQpd1EvSvp8lKA=
28+
github.com/Keyfactor/keyfactor-go-client-sdk/v25 v25.0.2/go.mod h1:VnVW8x+pChhnOWBR1PNYPeCQQjlWIK1bwHI8i8j7UPI=
2929
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa h1:LHTHcTQiSGT7VVbI0o4wBRNQIgn917usHWOd6VAffYI=
3030
github.com/alexbrainman/sspi v0.0.0-20231016080023-1a75b4708caa/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
3131
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=

0 commit comments

Comments
 (0)