Skip to content

Commit

Permalink
Merge pull request #312 from psturc/update-k8s-io-api-pkg
Browse files Browse the repository at this point in the history
chore: update redhat-appstudio -> konflux-ci deps
  • Loading branch information
psturc authored Jun 11, 2024
2 parents a320048 + 79a5467 commit 2dee6cf
Show file tree
Hide file tree
Showing 18 changed files with 181 additions and 1,224 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)

KUSTOMIZE = $(shell pwd)/bin/kustomize
.PHONY: kustomize
Expand Down
2 changes: 0 additions & 2 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down Expand Up @@ -126,7 +125,6 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: manager-role
namespace: system
rules:
Expand Down
2 changes: 1 addition & 1 deletion controllers/component_build_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/predicate"

appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"

"github.com/konflux-ci/build-service/pkg/boerrors"
"github.com/konflux-ci/build-service/pkg/bometrics"
Expand Down
4 changes: 2 additions & 2 deletions controllers/component_build_controller_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"sort"
"strings"

appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
"github.com/konflux-ci/build-service/pkg/boerrors"
. "github.com/konflux-ci/build-service/pkg/common"
l "github.com/konflux-ci/build-service/pkg/logs"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
"gopkg.in/yaml.v2"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -390,7 +390,7 @@ func generateVolumeClaimTemplate() *corev1.PersistentVolumeClaim {
AccessModes: []corev1.PersistentVolumeAccessMode{
"ReadWriteOnce",
},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
"storage": resource.MustParse("1Gi"),
},
Expand Down
4 changes: 2 additions & 2 deletions controllers/component_build_controller_pac.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (

"github.com/go-logr/logr"
"github.com/google/go-containerregistry/pkg/authn"
appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
pacv1alpha1 "github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
routev1 "github.com/openshift/api/route/v1"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
tektonapi_v1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
oci "github.com/tektoncd/pipeline/pkg/remote/oci"
Expand Down Expand Up @@ -1300,7 +1300,7 @@ func retrievePipelineSpec(ctx context.Context, bundleUri, pipelineName string) (
if v1beta1Pipeline, ok := obj.(tektonapi_v1beta1.PipelineObject); ok {
v1beta1PipelineSpec := v1beta1Pipeline.PipelineSpec()
log.Info("Converting from v1beta1 to v1", "PipelineName", pipelineName, "Bundle", bundleUri)
err := v1beta1PipelineSpec.ConvertTo(ctx, &pipelineSpec)
err := v1beta1PipelineSpec.ConvertTo(ctx, &pipelineSpec, &metav1.ObjectMeta{})
if err != nil {
return nil, boerrors.NewBuildOpError(
boerrors.EPipelineConversionFailed,
Expand Down
2 changes: 1 addition & 1 deletion controllers/component_build_controller_simple_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 1 addition & 1 deletion controllers/component_build_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
"github.com/konflux-ci/build-service/pkg/boerrors"
. "github.com/konflux-ci/build-service/pkg/common"
"github.com/konflux-ci/build-service/pkg/git/github"
gp "github.com/konflux-ci/build-service/pkg/git/gitprovider"
gpf "github.com/konflux-ci/build-service/pkg/git/gitproviderfactory"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
//+kubebuilder:scaffold:imports
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/component_build_controller_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
. "github.com/konflux-ci/build-service/pkg/common"
"github.com/konflux-ci/build-service/pkg/slices"

appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
pacv1alpha1 "github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
)

Expand Down
4 changes: 2 additions & 2 deletions controllers/component_dependency_update_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"text/template"
"time"

applicationapi "github.com/redhat-appstudio/application-api/api/v1alpha1"
releaseapi "github.com/redhat-appstudio/release-service/api/v1alpha1"
applicationapi "github.com/konflux-ci/application-api/api/v1alpha1"
releaseapi "github.com/konflux-ci/release-service/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
"golang.org/x/exp/slices"
corev1 "k8s.io/api/core/v1"
Expand Down
3 changes: 2 additions & 1 deletion controllers/component_dependency_update_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package controllers

import (
"fmt"

l "github.com/konflux-ci/build-service/pkg/logs"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -29,9 +30,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"

applicationapi "github.com/konflux-ci/application-api/api/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
applicationapi "github.com/redhat-appstudio/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"

"context"
Expand Down
2 changes: 1 addition & 1 deletion controllers/git_tekton_resources_renovater.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/predicate"

appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"

. "github.com/konflux-ci/build-service/pkg/common"
"github.com/konflux-ci/build-service/pkg/git"
Expand Down
2 changes: 1 addition & 1 deletion controllers/pac_pipelinerun_pruner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/predicate"

appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
l "github.com/konflux-ci/build-service/pkg/logs"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/renovate_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/redhat-appstudio/application-api/api/v1alpha1"
"github.com/konflux-ci/application-api/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
12 changes: 6 additions & 6 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"time"

"github.com/go-logr/logr"
appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"
releaseapi "github.com/konflux-ci/release-service/api/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
pacv1alpha1 "github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
routev1 "github.com/openshift/api/route/v1"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
releaseapi "github.com/redhat-appstudio/release-service/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
corev1 "k8s.io/api/core/v1"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand Down Expand Up @@ -73,14 +73,14 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")

applicationApiDepVersion := "v0.0.0-20231026192857-89515ad2504f"
applicationApiDepVersion := "v0.0.0-20240527211352-be061932d497"
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{
filepath.Join("..", "hack", "routecrd", "route.yaml"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "redhat-appstudio", "application-api@"+applicationApiDepVersion, "config", "crd", "bases"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "tektoncd", "pipeline@v0.46.0", "config"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "konflux-ci", "application-api@"+applicationApiDepVersion, "config", "crd", "bases"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "tektoncd", "pipeline@v0.57.0", "config"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "openshift-pipelines", "[email protected]", "config"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "redhat-appstudio", "[email protected]20231213200646-9aea1dba75c0", "config", "crd", "bases"),
filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "konflux-ci", "[email protected]20240610124538-758a1d48d002", "config", "crd", "bases"),
},
ErrorIfCRDPathMissing: true,
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"

gh "github.com/google/go-github/v45/github"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
appstudiov1alpha1 "github.com/konflux-ci/application-api/api/v1alpha1"

. "github.com/konflux-ci/build-service/pkg/common"
"github.com/konflux-ci/build-service/pkg/git/github"
Expand Down
Loading

0 comments on commit 2dee6cf

Please sign in to comment.