Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with updating of JKS/PKCS targets when password changes #449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 26 additions & 31 deletions docs/api/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ import "github.com/cert-manager/trust-manager/pkg/apis/trust/v1alpha1"

## Constants

<a name="BundleKind"></a>

```go
const (
BundleKind = "Bundle"

BundleLabelKey = "trust.cert-manager.io/bundle"
BundleHashAnnotationKey = "trust.cert-manager.io/hash"
BundleJksPasswdHashAnnotationKey = "trust.cert-manager.io/jks-pwd-hash" // #nosec G101
BundlePkcs12PasswdHashAnnotationKey = "trust.cert-manager.io/pksc12-pwd-hash" // #nosec G101
)
```

<a name="DefaultJKSPassword"></a>

```go
Expand Down Expand Up @@ -91,24 +104,6 @@ var (
)
```

<a name="BundleHashAnnotationKey"></a>

```go
var BundleHashAnnotationKey = "trust.cert-manager.io/hash"
```

<a name="BundleKind"></a>

```go
var BundleKind = "Bundle"
```

<a name="BundleLabelKey"></a>

```go
var BundleLabelKey = "trust.cert-manager.io/bundle"
```

<a name="SchemeGroupVersion"></a>SchemeGroupVersion is group version used to register these objects

```go
Expand All @@ -125,7 +120,7 @@ func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource

<a name="AdditionalFormats"></a>
## type [AdditionalFormats](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L120-L128>)
## type [AdditionalFormats](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L124-L132>)

AdditionalFormats specifies any additional formats to write to the target

Expand Down Expand Up @@ -160,7 +155,7 @@ func (in *AdditionalFormats) DeepCopyInto(out *AdditionalFormats)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="Bundle"></a>
## type [Bundle](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L39-L49>)
## type [Bundle](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L43-L53>)



Expand Down Expand Up @@ -206,7 +201,7 @@ func (in *Bundle) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

<a name="BundleCondition"></a>
## type [BundleCondition](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L206-L245>)
## type [BundleCondition](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L210-L249>)

BundleCondition contains condition information for a Bundle.

Expand Down Expand Up @@ -272,7 +267,7 @@ func (in *BundleCondition) DeepCopyInto(out *BundleCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="BundleList"></a>
## type [BundleList](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L52-L57>)
## type [BundleList](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L56-L61>)

\+kubebuilder:object:root=true

Expand Down Expand Up @@ -313,7 +308,7 @@ func (in *BundleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

<a name="BundleSource"></a>
## type [BundleSource](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L70-L95>)
## type [BundleSource](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L74-L99>)

BundleSource is the set of sources whose data will be appended and synced to the BundleTarget in all Namespaces.

Expand Down Expand Up @@ -365,7 +360,7 @@ func (in *BundleSource) DeepCopyInto(out *BundleSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="BundleSpec"></a>
## type [BundleSpec](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L60-L66>)
## type [BundleSpec](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L64-L70>)

BundleSpec defines the desired state of a Bundle.

Expand Down Expand Up @@ -398,7 +393,7 @@ func (in *BundleSpec) DeepCopyInto(out *BundleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="BundleStatus"></a>
## type [BundleStatus](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L189-L203>)
## type [BundleStatus](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L193-L207>)

BundleStatus defines the observed state of the Bundle.

Expand Down Expand Up @@ -439,7 +434,7 @@ func (in *BundleStatus) DeepCopyInto(out *BundleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="BundleTarget"></a>
## type [BundleTarget](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L99-L117>)
## type [BundleTarget](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L103-L121>)

BundleTarget is the target resource that the Bundle will sync all source data to.

Expand Down Expand Up @@ -484,7 +479,7 @@ func (in *BundleTarget) DeepCopyInto(out *BundleTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="JKS"></a>
## type [JKS](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L130-L139>)
## type [JKS](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L134-L143>)



Expand Down Expand Up @@ -520,7 +515,7 @@ func (in *JKS) DeepCopyInto(out *JKS)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="KeySelector"></a>
## type [KeySelector](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L183-L186>)
## type [KeySelector](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L187-L190>)

KeySelector is a reference to a key for some map data object.

Expand Down Expand Up @@ -550,7 +545,7 @@ func (in *KeySelector) DeepCopyInto(out *KeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="NamespaceSelector"></a>
## type [NamespaceSelector](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L152-L157>)
## type [NamespaceSelector](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L156-L161>)

NamespaceSelector defines selectors to match on Namespaces.

Expand Down Expand Up @@ -582,7 +577,7 @@ func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="PKCS12"></a>
## type [PKCS12](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L141-L149>)
## type [PKCS12](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L145-L153>)



Expand Down Expand Up @@ -617,7 +612,7 @@ func (in *PKCS12) DeepCopyInto(out *PKCS12)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil.

<a name="SourceObjectKeySelector"></a>
## type [SourceObjectKeySelector](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L161-L180>)
## type [SourceObjectKeySelector](<https://github.com/cert-manager/trust-manager/blob/main/pkg/apis/trust/v1alpha1/types_bundle.go#L165-L184>)

SourceObjectKeySelector is a reference to a source object and its \`data\` key\(s\) in the trust Namespace.

Expand Down
10 changes: 7 additions & 3 deletions pkg/apis/trust/v1alpha1/types_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var BundleKind = "Bundle"
const (
BundleKind = "Bundle"

var BundleLabelKey = "trust.cert-manager.io/bundle"
var BundleHashAnnotationKey = "trust.cert-manager.io/hash"
BundleLabelKey = "trust.cert-manager.io/bundle"
BundleHashAnnotationKey = "trust.cert-manager.io/hash"
BundleJksPasswdHashAnnotationKey = "trust.cert-manager.io/jks-pwd-hash" // #nosec G101
BundlePkcs12PasswdHashAnnotationKey = "trust.cert-manager.io/pksc12-pwd-hash" // #nosec G101
)

// +kubebuilder:object:root=true
// +kubebuilder:printcolumn:name="ConfigMap Target",type="string",JSONPath=".spec.target.configMap.key",description="Bundle ConfigMap Target Key"
Expand Down
Loading