Skip to content

Commit 5ee6476

Browse files
authored
Merge pull request #2089 from tecarter94/remove-deprecated-code-from-crd
Remove deprecated code in CRD
2 parents bba2231 + fa39a99 commit 5ee6476

File tree

8 files changed

+11
-220
lines changed

8 files changed

+11
-220
lines changed

deploy/crds/base/jvmbuildservice.io_dependencybuilds.yaml

-14
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ spec:
125125
url:
126126
type: string
127127
type: object
128-
hermeticBuildImage:
129-
description: |-
130-
Deprecated
131-
The hermetic build image produced by the build
132-
type: string
133128
image:
134129
description: the image resulting from the run
135130
type: string
@@ -210,9 +205,6 @@ spec:
210205
type: string
211206
javaVersion:
212207
type: string
213-
pipeline:
214-
description: Deprecated
215-
type: string
216208
postBuildScript:
217209
type: string
218210
preBuildScript:
@@ -366,9 +358,6 @@ spec:
366358
type: object
367359
failedVerification:
368360
type: boolean
369-
hermetic:
370-
description: Deprecated
371-
type: boolean
372361
message:
373362
type: string
374363
pipelineRetries:
@@ -422,9 +411,6 @@ spec:
422411
type: string
423412
javaVersion:
424413
type: string
425-
pipeline:
426-
description: Deprecated
427-
type: string
428414
postBuildScript:
429415
type: string
430416
preBuildScript:

deploy/crds/base/jvmbuildservice.io_jbsconfigs.yaml

-33
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ spec:
107107
url:
108108
type: string
109109
type: object
110-
hermeticBuilds:
111-
description: Deprecated
112-
type: string
113110
mavenBaseLocations:
114111
additionalProperties:
115112
type: string
@@ -148,36 +145,6 @@ spec:
148145
secretName:
149146
type: string
150147
type: object
151-
relocationPatterns:
152-
description: Deprecated
153-
items:
154-
properties:
155-
relocationPattern:
156-
properties:
157-
buildPolicy:
158-
type: string
159-
patterns:
160-
items:
161-
properties:
162-
pattern:
163-
properties:
164-
from:
165-
type: string
166-
to:
167-
type: string
168-
required:
169-
- from
170-
- to
171-
type: object
172-
required:
173-
- pattern
174-
type: object
175-
type: array
176-
type: object
177-
required:
178-
- relocationPattern
179-
type: object
180-
type: array
181148
requireArtifactVerification:
182149
description: |-
183150
If this is true then the build will fail if artifact verification fails

java-components/resource-model/src/main/resources/crds/jvmbuildservice.io_dependencybuilds.yaml

-14
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ spec:
125125
url:
126126
type: string
127127
type: object
128-
hermeticBuildImage:
129-
description: |-
130-
Deprecated
131-
The hermetic build image produced by the build
132-
type: string
133128
image:
134129
description: the image resulting from the run
135130
type: string
@@ -210,9 +205,6 @@ spec:
210205
type: string
211206
javaVersion:
212207
type: string
213-
pipeline:
214-
description: Deprecated
215-
type: string
216208
postBuildScript:
217209
type: string
218210
preBuildScript:
@@ -366,9 +358,6 @@ spec:
366358
type: object
367359
failedVerification:
368360
type: boolean
369-
hermetic:
370-
description: Deprecated
371-
type: boolean
372361
message:
373362
type: string
374363
pipelineRetries:
@@ -422,9 +411,6 @@ spec:
422411
type: string
423412
javaVersion:
424413
type: string
425-
pipeline:
426-
description: Deprecated
427-
type: string
428414
postBuildScript:
429415
type: string
430416
preBuildScript:

java-components/resource-model/src/main/resources/crds/jvmbuildservice.io_jbsconfigs.yaml

-33
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ spec:
107107
url:
108108
type: string
109109
type: object
110-
hermeticBuilds:
111-
description: Deprecated
112-
type: string
113110
mavenBaseLocations:
114111
additionalProperties:
115112
type: string
@@ -148,36 +145,6 @@ spec:
148145
secretName:
149146
type: string
150147
type: object
151-
relocationPatterns:
152-
description: Deprecated
153-
items:
154-
properties:
155-
relocationPattern:
156-
properties:
157-
buildPolicy:
158-
type: string
159-
patterns:
160-
items:
161-
properties:
162-
pattern:
163-
properties:
164-
from:
165-
type: string
166-
to:
167-
type: string
168-
required:
169-
- from
170-
- to
171-
type: object
172-
required:
173-
- pattern
174-
type: object
175-
type: array
176-
type: object
177-
required:
178-
- relocationPattern
179-
type: object
180-
type: array
181148
requireArtifactVerification:
182149
description: |-
183150
If this is true then the build will fail if artifact verification fails

pkg/apis/jvmbuildservice/v1alpha1/dependencybuild_types.go

+11-18
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@ type DependencyBuildStatus struct {
3232
Message string `json:"message,omitempty"`
3333
Contaminants []*Contaminant `json:"contaminates,omitempty"`
3434
// PotentialBuildRecipes additional recipes to try if the current recipe fails
35-
PotentialBuildRecipes []*BuildRecipe `json:"potentialBuildRecipes,omitempty"`
36-
PotentialBuildRecipesIndex int `json:"potentialBuildRecipesIndex,omitempty"`
37-
CommitTime int64 `json:"commitTime,omitempty"`
38-
DeployedArtifacts []string `json:"deployedArtifacts,omitempty"`
39-
FailedVerification bool `json:"failedVerification,omitempty"`
40-
// Deprecated
41-
Hermetic bool `json:"hermetic,omitempty"`
42-
PipelineRetries int `json:"pipelineRetries,omitempty"`
43-
BuildAttempts []*BuildAttempt `json:"buildAttempts,omitempty"`
44-
DiscoveryPipelineResults *PipelineResults `json:"discoveryPipelineResults,omitempty"`
45-
DeployPipelineResults *PipelineResults `json:"deployPipelineResults,omitempty"`
46-
PreBuildImages []PreBuildImage `json:"builderImages,omitempty"`
35+
PotentialBuildRecipes []*BuildRecipe `json:"potentialBuildRecipes,omitempty"`
36+
PotentialBuildRecipesIndex int `json:"potentialBuildRecipesIndex,omitempty"`
37+
CommitTime int64 `json:"commitTime,omitempty"`
38+
DeployedArtifacts []string `json:"deployedArtifacts,omitempty"`
39+
FailedVerification bool `json:"failedVerification,omitempty"`
40+
PipelineRetries int `json:"pipelineRetries,omitempty"`
41+
BuildAttempts []*BuildAttempt `json:"buildAttempts,omitempty"`
42+
DiscoveryPipelineResults *PipelineResults `json:"discoveryPipelineResults,omitempty"`
43+
DeployPipelineResults *PipelineResults `json:"deployPipelineResults,omitempty"`
44+
PreBuildImages []PreBuildImage `json:"builderImages,omitempty"`
4745
}
4846

4947
// +genclient
@@ -103,9 +101,6 @@ type BuildPipelineRunResults struct {
103101
VerificationResults string `json:"verificationFailures,omitempty"`
104102
// The produced GAVs
105103
Gavs []string `json:"gavs,omitempty"`
106-
// Deprecated
107-
// The hermetic build image produced by the build
108-
HermeticBuildImage string `json:"hermeticBuildImage,omitempty"`
109104
// The git archive source information
110105
GitArchive GitArchive `json:"gitArchive,omitempty"`
111106

@@ -150,9 +145,7 @@ func (r *DependencyBuildStatus) ProblemContaminates() []*Contaminant {
150145
}
151146

152147
type BuildRecipe struct {
153-
//Deprecated
154-
Pipeline string `json:"pipeline,omitempty"`
155-
Tool string `json:"tool,omitempty"`
148+
Tool string `json:"tool,omitempty"`
156149
// The base builder image (ubi7 / ubi8)
157150
Image string `json:"image,omitempty"`
158151
ContextPath string `json:"contextPath,omitempty"`

pkg/apis/jvmbuildservice/v1alpha1/jbsconfig_types.go

-26
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
55
)
66

7-
type HermeticBuildType string
8-
97
const (
108
JBSConfigName = "jvm-build-config"
119
DefaultImageSecretName = "jvm-build-image-secrets" //#nosec
@@ -33,8 +31,6 @@ const (
3331
ConfigArtifactCacheWorkerThreadsDefault = "50"
3432
ConfigArtifactCacheStorageDefault = "10Gi"
3533

36-
HermeticBuildTypeRequired HermeticBuildType = "Required"
37-
3834
KonfluxBuildDefinitions = "https://github.com/konflux-ci/build-definitions.git"
3935
KonfluxBuildahPath = "task/buildah-oci-ta/0.2/buildah-oci-ta.yaml"
4036
)
@@ -45,8 +41,6 @@ type JBSConfigSpec struct {
4541
// If this is true then the build will fail if artifact verification fails
4642
// otherwise deploy will happen as normal, but a field will be set on the DependencyBuild
4743
RequireArtifactVerification bool `json:"requireArtifactVerification,omitempty"`
48-
// Deprecated
49-
HermeticBuilds HermeticBuildType `json:"hermeticBuilds,omitempty"`
5044

5145
AdditionalRecipes []string `json:"additionalRecipes,omitempty"`
5246

@@ -58,8 +52,6 @@ type JBSConfigSpec struct {
5852
GitSourceArchive GitSourceArchive `json:"gitSourceArchive,omitempty"`
5953
CacheSettings CacheSettings `json:"cacheSettings,omitempty"`
6054
BuildSettings BuildSettings `json:"buildSettings,omitempty"`
61-
// Deprecated
62-
RelocationPatterns []RelocationPatternElement `json:"relocationPatterns,omitempty"`
6355

6456
// Whether to use a standard build pipeline or build in a Docker container via buildah.
6557
ContainerBuilds bool `json:"containerBuilds,omitempty"`
@@ -130,24 +122,6 @@ type GitSourceArchive struct {
130122
DisableSSLVerification bool `json:"disableSSLVerification,omitempty"`
131123
}
132124

133-
type RelocationPatternElement struct {
134-
RelocationPattern RelocationPattern `json:"relocationPattern"`
135-
}
136-
137-
type RelocationPattern struct {
138-
BuildPolicy string `json:"buildPolicy,omitempty" default:"default"`
139-
Patterns []PatternElement `json:"patterns,omitempty"`
140-
}
141-
142-
type PatternElement struct {
143-
Pattern Pattern `json:"pattern"`
144-
}
145-
146-
type Pattern struct {
147-
From string `json:"from"`
148-
To string `json:"to"`
149-
}
150-
151125
// +genclient
152126
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
153127
// +kubebuilder:subresource:status

pkg/apis/jvmbuildservice/v1alpha1/zz_generated.deepcopy.go

-74
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/reconciler/jbsconfig/jbsconfig.go

-8
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,6 @@ func (r *ReconcilerJBSConfig) Reconcile(ctx context.Context, request reconcile.R
7373
return reconcile.Result{}, err
7474
}
7575
log.Info("reconciling JBSConfig")
76-
if jbsConfig.Spec.RelocationPatterns != nil {
77-
jbsConfig.Spec.RelocationPatterns = nil
78-
return reconcile.Result{}, r.client.Update(ctx, &jbsConfig)
79-
}
80-
if jbsConfig.Spec.HermeticBuilds != "" {
81-
jbsConfig.Spec.HermeticBuilds = ""
82-
return reconcile.Result{}, r.client.Update(ctx, &jbsConfig)
83-
}
8476

8577
// TODO: ### Should we add some sanity checking i.e. if ContainerBuilds are enabled, we need GIT_DEPLOY_TOKEN
8678
// i.e. source archiving in DeployPreBuildSourceCommand

0 commit comments

Comments
 (0)