Skip to content

Commit 535721d

Browse files
authored
Merge pull request #805 from fluxcd/remove-v1beta1-api
Remove deprecated APIs in group `image.toolkit.fluxcd.io/v1beta1`
2 parents 1d48f27 + 85f7a70 commit 535721d

File tree

7 files changed

+5
-449
lines changed

7 files changed

+5
-449
lines changed

api/v1beta1/doc.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v1beta1 contains API types for the image API group, version
18-
// v1beta1. These types are concerned with reflecting metadata from
19-
// OCI image repositories into a cluster, so they can be consulted for
20-
// e.g., automation.
17+
// Package v1beta1 contains API types for the image v1beta1 API group
18+
//
19+
// Deprecated: v1beta1 is no longer supported, use v1 instead.
2120
//
2221
// +kubebuilder:object:generate=true
2322
// +groupName=image.toolkit.fluxcd.io

api/v1beta1/imagepolicy_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ func SetImagePolicyReadiness(p *ImagePolicy, status metav1.ConditionStatus, reas
130130
}
131131

132132
// +kubebuilder:object:root=true
133-
// +kubebuilder:subresource:status
134-
// +kubebuilder:printcolumn:name="LatestImage",type=string,JSONPath=`.status.latestImage`
133+
// +kubebuilder:skipversion
135134

136135
// ImagePolicy is the Schema for the imagepolicies API
137136
type ImagePolicy struct {

api/v1beta1/imagerepository_types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ func (in ImageRepository) GetTimeout() time.Duration {
149149
}
150150

151151
// +kubebuilder:object:root=true
152-
// +kubebuilder:subresource:status
153-
// +kubebuilder:printcolumn:name="Last scan",type=string,JSONPath=`.status.lastScanResult.scanTime`
154-
// +kubebuilder:printcolumn:name="Tags",type=string,JSONPath=`.status.lastScanResult.tagCount`
152+
// +kubebuilder:skipversion
155153

156154
// ImageRepository is the Schema for the imagerepositories API
157155
type ImageRepository struct {

config/crd/bases/image.toolkit.fluxcd.io_imagepolicies.yaml

Lines changed: 0 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -17,198 +17,6 @@ spec:
1717
singular: imagepolicy
1818
scope: Namespaced
1919
versions:
20-
- additionalPrinterColumns:
21-
- jsonPath: .status.latestImage
22-
name: LatestImage
23-
type: string
24-
name: v1beta1
25-
schema:
26-
openAPIV3Schema:
27-
description: ImagePolicy is the Schema for the imagepolicies API
28-
properties:
29-
apiVersion:
30-
description: |-
31-
APIVersion defines the versioned schema of this representation of an object.
32-
Servers should convert recognized schemas to the latest internal value, and
33-
may reject unrecognized values.
34-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
35-
type: string
36-
kind:
37-
description: |-
38-
Kind is a string value representing the REST resource this object represents.
39-
Servers may infer this from the endpoint the client submits requests to.
40-
Cannot be updated.
41-
In CamelCase.
42-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
43-
type: string
44-
metadata:
45-
type: object
46-
spec:
47-
description: |-
48-
ImagePolicySpec defines the parameters for calculating the
49-
ImagePolicy
50-
properties:
51-
filterTags:
52-
description: |-
53-
FilterTags enables filtering for only a subset of tags based on a set of
54-
rules. If no rules are provided, all the tags from the repository will be
55-
ordered and compared.
56-
properties:
57-
extract:
58-
description: |-
59-
Extract allows a capture group to be extracted from the specified regular
60-
expression pattern, useful before tag evaluation.
61-
type: string
62-
pattern:
63-
description: |-
64-
Pattern specifies a regular expression pattern used to filter for image
65-
tags.
66-
type: string
67-
type: object
68-
imageRepositoryRef:
69-
description: |-
70-
ImageRepositoryRef points at the object specifying the image
71-
being scanned
72-
properties:
73-
name:
74-
description: Name of the referent.
75-
type: string
76-
namespace:
77-
description: Namespace of the referent, when not specified it
78-
acts as LocalObjectReference.
79-
type: string
80-
required:
81-
- name
82-
type: object
83-
policy:
84-
description: |-
85-
Policy gives the particulars of the policy to be followed in
86-
selecting the most recent image
87-
properties:
88-
alphabetical:
89-
description: Alphabetical set of rules to use for alphabetical
90-
ordering of the tags.
91-
properties:
92-
order:
93-
default: asc
94-
description: |-
95-
Order specifies the sorting order of the tags. Given the letters of the
96-
alphabet as tags, ascending order would select Z, and descending order
97-
would select A.
98-
enum:
99-
- asc
100-
- desc
101-
type: string
102-
type: object
103-
numerical:
104-
description: Numerical set of rules to use for numerical ordering
105-
of the tags.
106-
properties:
107-
order:
108-
default: asc
109-
description: |-
110-
Order specifies the sorting order of the tags. Given the integer values
111-
from 0 to 9 as tags, ascending order would select 9, and descending order
112-
would select 0.
113-
enum:
114-
- asc
115-
- desc
116-
type: string
117-
type: object
118-
semver:
119-
description: |-
120-
SemVer gives a semantic version range to check against the tags
121-
available.
122-
properties:
123-
range:
124-
description: |-
125-
Range gives a semver range for the image tag; the highest
126-
version within the range that's a tag yields the latest image.
127-
type: string
128-
required:
129-
- range
130-
type: object
131-
type: object
132-
required:
133-
- imageRepositoryRef
134-
- policy
135-
type: object
136-
status:
137-
default:
138-
observedGeneration: -1
139-
description: ImagePolicyStatus defines the observed state of ImagePolicy
140-
properties:
141-
conditions:
142-
items:
143-
description: Condition contains details for one aspect of the current
144-
state of this API Resource.
145-
properties:
146-
lastTransitionTime:
147-
description: |-
148-
lastTransitionTime is the last time the condition transitioned from one status to another.
149-
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
150-
format: date-time
151-
type: string
152-
message:
153-
description: |-
154-
message is a human readable message indicating details about the transition.
155-
This may be an empty string.
156-
maxLength: 32768
157-
type: string
158-
observedGeneration:
159-
description: |-
160-
observedGeneration represents the .metadata.generation that the condition was set based upon.
161-
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
162-
with respect to the current state of the instance.
163-
format: int64
164-
minimum: 0
165-
type: integer
166-
reason:
167-
description: |-
168-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
169-
Producers of specific condition types may define expected values and meanings for this field,
170-
and whether the values are considered a guaranteed API.
171-
The value should be a CamelCase string.
172-
This field may not be empty.
173-
maxLength: 1024
174-
minLength: 1
175-
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
176-
type: string
177-
status:
178-
description: status of the condition, one of True, False, Unknown.
179-
enum:
180-
- "True"
181-
- "False"
182-
- Unknown
183-
type: string
184-
type:
185-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
186-
maxLength: 316
187-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
188-
type: string
189-
required:
190-
- lastTransitionTime
191-
- message
192-
- reason
193-
- status
194-
- type
195-
type: object
196-
type: array
197-
latestImage:
198-
description: |-
199-
LatestImage gives the first in the list of images scanned by
200-
the image repository, when filtered and ordered according to
201-
the policy.
202-
type: string
203-
observedGeneration:
204-
format: int64
205-
type: integer
206-
type: object
207-
type: object
208-
served: true
209-
storage: false
210-
subresources:
211-
status: {}
21220
- additionalPrinterColumns:
21321
- jsonPath: .status.latestRef.name
21422
name: Image

0 commit comments

Comments
 (0)