@@ -19,12 +19,10 @@ package v1beta2
19
19
import (
20
20
"time"
21
21
22
- apimeta "k8s.io/apimachinery/pkg/api/meta"
23
22
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24
23
25
24
"github.com/fluxcd/pkg/apis/acl"
26
25
"github.com/fluxcd/pkg/apis/meta"
27
- "github.com/fluxcd/pkg/runtime/conditions"
28
26
)
29
27
30
28
// HelmChartKind is the string representation of a HelmChart.
@@ -115,6 +113,16 @@ type HelmChartStatus struct {
115
113
// +optional
116
114
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
117
115
116
+ // ObservedSourceArtifactRevision is the last observed Artifact.Revision
117
+ // of the Source reference.
118
+ // +optional
119
+ ObservedSourceArtifactRevision string `json:"observedSourceArtifactRevision,omitempty"`
120
+
121
+ // ObservedChartName is the last observed chart name as defined by the
122
+ // resolved chart reference.
123
+ // +optional
124
+ ObservedChartName string `json:"observedChartName,omitempty"`
125
+
118
126
// Conditions holds the conditions for the HelmChart.
119
127
// +optional
120
128
Conditions []metav1.Condition `json:"conditions,omitempty"`
@@ -148,46 +156,6 @@ const (
148
156
ChartPackageSucceededReason string = "ChartPackageSucceeded"
149
157
)
150
158
151
- // HelmChartProgressing resets the conditions of the HelmChart to meta.Condition
152
- // of type meta.ReadyCondition with status 'Unknown' and meta.ProgressingReason
153
- // reason and message. It returns the modified HelmChart.
154
- func HelmChartProgressing (chart HelmChart ) HelmChart {
155
- chart .Status .ObservedGeneration = chart .Generation
156
- chart .Status .URL = ""
157
- chart .Status .Conditions = []metav1.Condition {}
158
- conditions .MarkUnknown (& chart , meta .ReadyCondition , meta .ProgressingReason , "reconciliation in progress" )
159
- return chart
160
- }
161
-
162
- // HelmChartReady sets the given Artifact and URL on the HelmChart and sets the
163
- // meta.ReadyCondition to 'True', with the given reason and message. It returns
164
- // the modified HelmChart.
165
- func HelmChartReady (chart HelmChart , artifact Artifact , url , reason , message string ) HelmChart {
166
- chart .Status .Artifact = & artifact
167
- chart .Status .URL = url
168
- conditions .MarkTrue (& chart , meta .ReadyCondition , reason , message )
169
- return chart
170
- }
171
-
172
- // HelmChartNotReady sets the meta.ReadyCondition on the given HelmChart to
173
- // 'False', with the given reason and message. It returns the modified
174
- // HelmChart.
175
- func HelmChartNotReady (chart HelmChart , reason , message string ) HelmChart {
176
- conditions .MarkFalse (& chart , meta .ReadyCondition , reason , message )
177
- return chart
178
- }
179
-
180
- // HelmChartReadyMessage returns the message of the meta.ReadyCondition with
181
- // status 'True', or an empty string.
182
- func HelmChartReadyMessage (chart HelmChart ) string {
183
- if c := apimeta .FindStatusCondition (chart .Status .Conditions , meta .ReadyCondition ); c != nil {
184
- if c .Status == metav1 .ConditionTrue {
185
- return c .Message
186
- }
187
- }
188
- return ""
189
- }
190
-
191
159
// GetConditions returns the status conditions of the object.
192
160
func (in HelmChart ) GetConditions () []metav1.Condition {
193
161
return in .Status .Conditions
0 commit comments