Add app version to CRD manifests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
17633702fa
commit
863d3115f3
|
|
@ -29,6 +29,7 @@ import (
|
|||
"github.com/fluxcd/pkg/apis/kustomize"
|
||||
"github.com/fluxcd/pkg/apis/meta"
|
||||
|
||||
v2 "github.com/fluxcd/helm-controller/api/v2"
|
||||
"github.com/fluxcd/helm-controller/api/v2beta2"
|
||||
)
|
||||
|
||||
|
|
@ -931,7 +932,7 @@ type HelmReleaseStatus struct {
|
|||
// Note: this field is provisional to the v2beta2 API, and not actively used
|
||||
// by v2beta1 HelmReleases.
|
||||
// +optional
|
||||
History v2beta2.Snapshots `json:"history,omitempty"`
|
||||
History v2.Snapshots `json:"history,omitempty"`
|
||||
|
||||
// LastAttemptedGeneration is the last generation the controller attempted
|
||||
// to reconcile.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ limitations under the License.
|
|||
package v2beta1
|
||||
|
||||
import (
|
||||
"github.com/fluxcd/helm-controller/api/v2"
|
||||
"github.com/fluxcd/helm-controller/api/v2beta2"
|
||||
"github.com/fluxcd/pkg/apis/kustomize"
|
||||
"github.com/fluxcd/pkg/apis/meta"
|
||||
|
|
@ -306,11 +307,11 @@ func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) {
|
|||
}
|
||||
if in.History != nil {
|
||||
in, out := &in.History, &out.History
|
||||
*out = make(v2beta2.Snapshots, len(*in))
|
||||
*out = make(v2.Snapshots, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(v2beta2.Snapshot)
|
||||
*out = new(v2.Snapshot)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import (
|
|||
|
||||
"github.com/fluxcd/pkg/apis/kustomize"
|
||||
"github.com/fluxcd/pkg/apis/meta"
|
||||
|
||||
v2 "github.com/fluxcd/helm-controller/api/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -976,7 +978,7 @@ type HelmReleaseStatus struct {
|
|||
// History holds the history of Helm releases performed for this HelmRelease
|
||||
// up to the last successfully completed release.
|
||||
// +optional
|
||||
History Snapshots `json:"history,omitempty"`
|
||||
History v2.Snapshots `json:"history,omitempty"`
|
||||
|
||||
// LastAttemptedReleaseAction is the last release action performed for this
|
||||
// HelmRelease. It is used to determine the active remediation strategy.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ limitations under the License.
|
|||
package v2beta2
|
||||
|
||||
import (
|
||||
"github.com/fluxcd/helm-controller/api/v2"
|
||||
"github.com/fluxcd/pkg/apis/kustomize"
|
||||
"github.com/fluxcd/pkg/apis/meta"
|
||||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
|
|
@ -361,11 +362,11 @@ func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) {
|
|||
}
|
||||
if in.History != nil {
|
||||
in, out := &in.History, &out.History
|
||||
*out = make(Snapshots, len(*in))
|
||||
*out = make(v2.Snapshots, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(Snapshot)
|
||||
*out = new(v2.Snapshot)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1003,8 +1003,8 @@ spec:
|
|||
this field will be used to distinguish between the old and new methods.
|
||||
type: string
|
||||
appVersion:
|
||||
description: Version is the version of the release object in
|
||||
storage.
|
||||
description: AppVersion is the chart app version of the release
|
||||
object in storage.
|
||||
type: string
|
||||
chartName:
|
||||
description: ChartName is the chart name of the release object
|
||||
|
|
@ -2224,6 +2224,10 @@ spec:
|
|||
Provisional: when the calculation method of the Digest field is changed,
|
||||
this field will be used to distinguish between the old and new methods.
|
||||
type: string
|
||||
appVersion:
|
||||
description: AppVersion is the chart app version of the release
|
||||
object in storage.
|
||||
type: string
|
||||
chartName:
|
||||
description: ChartName is the chart name of the release object
|
||||
in storage.
|
||||
|
|
@ -3509,6 +3513,10 @@ spec:
|
|||
Provisional: when the calculation method of the Digest field is changed,
|
||||
this field will be used to distinguish between the old and new methods.
|
||||
type: string
|
||||
appVersion:
|
||||
description: AppVersion is the chart app version of the release
|
||||
object in storage.
|
||||
type: string
|
||||
chartName:
|
||||
description: ChartName is the chart name of the release object
|
||||
in storage.
|
||||
|
|
|
|||
|
|
@ -2243,18 +2243,6 @@ int
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>appVersion</code><br>
|
||||
<em>
|
||||
string
|
||||
</em>
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>Version is the version of the release object in storage.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>status</code><br>
|
||||
<em>
|
||||
string
|
||||
|
|
@ -2289,6 +2277,18 @@ storage.</p>
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>appVersion</code><br>
|
||||
<em>
|
||||
string
|
||||
</em>
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>AppVersion is the chart app version of the release object in storage.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>configDigest</code><br>
|
||||
<em>
|
||||
string
|
||||
|
|
|
|||
|
|
@ -200,11 +200,13 @@ func eventMessageWithLog(msg string, log *action.LogBuffer) string {
|
|||
// addMeta is a function that adds metadata to an event map.
|
||||
type addMeta func(map[string]string)
|
||||
|
||||
// metaOCIDigestKey is the key for the OCI digest metadata.
|
||||
const metaOCIDigestKey = "oci-digest"
|
||||
const (
|
||||
// metaOCIDigestKey is the key for the chart OCI artifact digest.
|
||||
metaOCIDigestKey = "oci-digest"
|
||||
|
||||
// metaAppVersionKey is the key for the app version found in chart metadata.
|
||||
const metaAppVersionKey = "app-version"
|
||||
// metaAppVersionKey is the key for the app version found in chart metadata.
|
||||
metaAppVersionKey = "app-version"
|
||||
)
|
||||
|
||||
// eventMeta returns the event (annotation) metadata based on the given
|
||||
// parameters.
|
||||
|
|
|
|||
Loading…
Reference in New Issue