diff --git a/argo-cd-apps/base/member/infra-deployments/jvm-build-service/jvm-build-service.yaml b/argo-cd-apps/base/member/infra-deployments/jvm-build-service/jvm-build-service.yaml deleted file mode 100644 index 1f93091c496..00000000000 --- a/argo-cd-apps/base/member/infra-deployments/jvm-build-service/jvm-build-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: ApplicationSet -metadata: - name: jvm-build-service -spec: - generators: - - merge: - mergeKeys: - - nameNormalized - generators: - - clusters: - values: - sourceRoot: components/jvm-build-service - environment: staging - clusterDir: "" - - list: - elements: [] - template: - metadata: - name: jvm-build-service-{{nameNormalized}} - spec: - project: default - source: - path: '{{values.sourceRoot}}/{{values.environment}}/{{values.clusterDir}}' - repoURL: https://github.com/redhat-appstudio/infra-deployments.git - targetRevision: main - destination: - namespace: default # not relevant yet since every object has an explicit namespace. - server: '{{server}}' - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true - retry: - limit: -1 - backoff: - duration: 10s - factor: 2 - maxDuration: 3m diff --git a/argo-cd-apps/base/member/infra-deployments/jvm-build-service/kustomization.yaml b/argo-cd-apps/base/member/infra-deployments/jvm-build-service/kustomization.yaml deleted file mode 100644 index 9951d81da89..00000000000 --- a/argo-cd-apps/base/member/infra-deployments/jvm-build-service/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- jvm-build-service.yaml -components: - - ../../../../k-components/deploy-to-member-cluster-merge-generator diff --git a/argo-cd-apps/base/member/infra-deployments/kustomization.yaml b/argo-cd-apps/base/member/infra-deployments/kustomization.yaml index 83455f2a0df..c7936958aab 100644 --- a/argo-cd-apps/base/member/infra-deployments/kustomization.yaml +++ b/argo-cd-apps/base/member/infra-deployments/kustomization.yaml @@ -7,7 +7,6 @@ resources: - integration - enterprise-contract - build-service - - jvm-build-service - pipeline-service - build-templates - internal-services diff --git a/argo-cd-apps/overlays/development/kustomization.yaml b/argo-cd-apps/overlays/development/kustomization.yaml index 6c64f51e096..738527b8f21 100644 --- a/argo-cd-apps/overlays/development/kustomization.yaml +++ b/argo-cd-apps/overlays/development/kustomization.yaml @@ -52,11 +52,6 @@ patches: kind: ApplicationSet version: v1alpha1 name: multi-platform-controller - - path: development-overlay-patch.yaml - target: - kind: ApplicationSet - version: v1alpha1 - name: jvm-build-service - path: development-overlay-patch.yaml target: kind: ApplicationSet diff --git a/components/backup/base/member/schedules/backup-tenants-schedule.yaml b/components/backup/base/member/schedules/backup-tenants-schedule.yaml index 949e90a6228..a51797c0e5b 100644 --- a/components/backup/base/member/schedules/backup-tenants-schedule.yaml +++ b/components/backup/base/member/schedules/backup-tenants-schedule.yaml @@ -29,7 +29,6 @@ spec: - image-controller - integration-service - internal-services - - jvm-build-service - multi-platform-controller - perf-team-prometheus-reader - plnsvc-tests diff --git a/components/build-service/README.md b/components/build-service/README.md index 529a6b0c081..8fb0b2fa754 100644 --- a/components/build-service/README.md +++ b/components/build-service/README.md @@ -9,7 +9,6 @@ The StoneSoup Build System is composed of the following components: - [Tekton Results](https://github.com/tektoncd/results) - [Pipelines as Code](https://pipelinesascode.com/) - [App Studio Build Service](https://github.com/konflux-ci/build-service/) -- [HACBS JVM Build Service](https://github.com/redhat-appstudio/jvm-build-service) - [PVC Cleaner](https://github.com/redhat-appstudio/pvc-cleaner/) This repository installs all the components and includes a set of example scripts that simplify usage and provide examples of a working system. There are no additional components needed to use the build system API, however some utilities and scripts are provided to demonstrate functionality. @@ -30,7 +29,7 @@ To validate execution via RHTAP you can run `./hack/build/build-via-appstudio.sh To build specific repository, pass its URL and path to repository's Dockerfile as arguments as shown below: ``` -./hack/build/build-via-appstudio.sh https://github.com/devfile-samples/devfile-sample-java-springboot-basic docker/Dockerfile +./hack/build/build-via-appstudio.sh https://github.com/devfile-samples/devfile-sample-python-basic docker/Dockerfile ``` To enable PipelineAsCode integration you need to set `PIPELINESASCODE` env variable to `1` and also have to have set GitHub credentials in your `./hack/preview.env`. diff --git a/components/cluster-secret-store/base/appsre-stonesoup-vault-secret-store.yaml b/components/cluster-secret-store/base/appsre-stonesoup-vault-secret-store.yaml index 2a1ecca0304..b095a5b0a75 100644 --- a/components/cluster-secret-store/base/appsre-stonesoup-vault-secret-store.yaml +++ b/components/cluster-secret-store/base/appsre-stonesoup-vault-secret-store.yaml @@ -38,7 +38,6 @@ spec: - konflux-ci - image-controller - multi-platform-controller - - jvm-build-service - openshift-logging - quality-dashboard - sprayproxy diff --git a/components/jvm-build-service/OWNERS b/components/jvm-build-service/OWNERS deleted file mode 100644 index 5b8268d967a..00000000000 --- a/components/jvm-build-service/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -# See the OWNERS docs: https://go.k8s.io/owners - -approvers: -- rnc -- mmorhun - -reviewers: -- rnc -- mmorhun diff --git a/components/jvm-build-service/base/allow-argocd-to-manage.yaml b/components/jvm-build-service/base/allow-argocd-to-manage.yaml deleted file mode 100644 index 6cea787426a..00000000000 --- a/components/jvm-build-service/base/allow-argocd-to-manage.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: grant-argocd -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: admin -subjects: -- kind: ServiceAccount - name: openshift-gitops-argocd-application-controller - namespace: openshift-gitops diff --git a/components/jvm-build-service/base/external-secrets/kustomization.yaml b/components/jvm-build-service/base/external-secrets/kustomization.yaml deleted file mode 100644 index 204f0861d23..00000000000 --- a/components/jvm-build-service/base/external-secrets/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- quaytoken.yaml -namespace: jvm-build-service diff --git a/components/jvm-build-service/base/external-secrets/quaytoken.yaml b/components/jvm-build-service/base/external-secrets/quaytoken.yaml deleted file mode 100644 index f63da8dc3b3..00000000000 --- a/components/jvm-build-service/base/external-secrets/quaytoken.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: quaytoken - annotations: - argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true - argocd.argoproj.io/sync-wave: "-1" -spec: - dataFrom: - - extract: - key: staging/build/image-controller #use the same secret as the image controller for now - refreshInterval: 1h - secretStoreRef: - kind: ClusterSecretStore - name: appsre-stonesoup-vault - target: - creationPolicy: Owner - deletionPolicy: Delete - name: quaytoken diff --git a/components/jvm-build-service/base/kustomization.yaml b/components/jvm-build-service/base/kustomization.yaml deleted file mode 100644 index f6fa2f89e27..00000000000 --- a/components/jvm-build-service/base/kustomization.yaml +++ /dev/null @@ -1,28 +0,0 @@ -resources: -- allow-argocd-to-manage.yaml -- https://github.com/redhat-appstudio/jvm-build-service/deploy/crds/base?ref=cac2c46771e4ce11554e7032b90aab221d928645 -- https://github.com/redhat-appstudio/jvm-build-service/deploy/operator/base?ref=cac2c46771e4ce11554e7032b90aab221d928645 -- https://github.com/redhat-appstudio/jvm-build-service/deploy/operator/config?ref=cac2c46771e4ce11554e7032b90aab221d928645 -- monitoring.yaml - -# Skip applying the jvm-build-service operands (SystemConfig) while the jvm-build-service operator is being installed. -# See more information about this option, here: -# https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#skip-dry-run-for-new-custom-resources-types -commonAnnotations: - argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true - -namespace: jvm-build-service - -images: -- name: hacbs-jvm-operator - newName: quay.io/redhat-appstudio/hacbs-jvm-controller - newTag: cac2c46771e4ce11554e7032b90aab221d928645 - -patches: -- path: ./operator_env_patch.yaml - target: - kind: Deployment - name: hacbs-jvm-operator - -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization diff --git a/components/jvm-build-service/base/monitoring.yaml b/components/jvm-build-service/base/monitoring.yaml deleted file mode 100644 index 0b3ca5f253a..00000000000 --- a/components/jvm-build-service/base/monitoring.yaml +++ /dev/null @@ -1,48 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: metrics-reader ---- -apiVersion: v1 -kind: Secret -metadata: - name: metrics-reader - annotations: - kubernetes.io/service-account.name: metrics-reader -type: kubernetes.io/service-account-token ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: jvm-build-service-metrics-reader -rules: -- nonResourceURLs: - - /metrics - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: prometheus-jvm-build-service-metrics-reader -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: jvm-build-service-metrics-reader -subjects: -- kind: ServiceAccount - name: metrics-reader ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: jvm-build-service -spec: - endpoints: - - path: /metrics - interval: 15s - port: http-metrics - scheme: http - selector: - matchLabels: - app: hacbs-jvm-operator diff --git a/components/jvm-build-service/base/operator_env_patch.yaml b/components/jvm-build-service/base/operator_env_patch.yaml deleted file mode 100644 index 25cdbcdca66..00000000000 --- a/components/jvm-build-service/base/operator_env_patch.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- op: add - path: /spec/template/spec/containers/0/env - value: - - name: IMAGE_TAG - value: cac2c46771e4ce11554e7032b90aab221d928645 -- op: add - path: /spec/template/spec/containers/0/env - value: - - name: "USE_IMAGE_SPI" - value: "true" diff --git a/components/jvm-build-service/development/kustomization.yaml b/components/jvm-build-service/development/kustomization.yaml deleted file mode 100644 index bdf7ce4f415..00000000000 --- a/components/jvm-build-service/development/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- ../base diff --git a/components/jvm-build-service/production/kustomization.yaml b/components/jvm-build-service/production/kustomization.yaml deleted file mode 100644 index 81fb17a56dd..00000000000 --- a/components/jvm-build-service/production/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- ../base -- ../base/external-secrets -patches: - - path: quaytoken.yaml - target: - name: quaytoken - kind: ExternalSecret - group: external-secrets.io - version: v1beta1 diff --git a/components/jvm-build-service/production/quaytoken.yaml b/components/jvm-build-service/production/quaytoken.yaml deleted file mode 100644 index bdeb524ff6b..00000000000 --- a/components/jvm-build-service/production/quaytoken.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- op: add - path: /spec/dataFrom/0/extract/key - value: production/build/image-controller diff --git a/components/jvm-build-service/staging/kustomization.yaml b/components/jvm-build-service/staging/kustomization.yaml deleted file mode 100644 index 479bc600768..00000000000 --- a/components/jvm-build-service/staging/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- ../base -- ../base/external-secrets diff --git a/components/monitoring/grafana/base/dashboards/jvm-build-service/OWNERS b/components/monitoring/grafana/base/dashboards/jvm-build-service/OWNERS deleted file mode 100644 index 8034d2f2b5d..00000000000 --- a/components/monitoring/grafana/base/dashboards/jvm-build-service/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -# See the OWNERS docs: https://go.k8s.io/owners - -approvers: -- mmorhun -- rnc diff --git a/components/monitoring/grafana/base/dashboards/jvm-build-service/dashboard.yaml b/components/monitoring/grafana/base/dashboards/jvm-build-service/dashboard.yaml deleted file mode 100644 index 077d59814dd..00000000000 --- a/components/monitoring/grafana/base/dashboards/jvm-build-service/dashboard.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: grafana.integreatly.org/v1beta1 -kind: GrafanaDashboard -metadata: - name: grafana-dashboard-jvm-dependency-builds - labels: - app: appstudio-grafana -spec: - instanceSelector: - matchLabels: - dashboards: "appstudio-grafana" - configMapRef: - name: grafana-dashboard-jvm-dependency-builds - key: grafana-dashboard-jvm-dependency-builds.json diff --git a/components/monitoring/grafana/base/dashboards/jvm-build-service/kustomization.yaml b/components/monitoring/grafana/base/dashboards/jvm-build-service/kustomization.yaml deleted file mode 100644 index fc284c95c32..00000000000 --- a/components/monitoring/grafana/base/dashboards/jvm-build-service/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- https://github.com/redhat-appstudio/jvm-build-service/deploy/monitoring/grafana-dashboards/?ref=cac2c46771e4ce11554e7032b90aab221d928645 -- dashboard.yaml diff --git a/components/monitoring/grafana/base/dashboards/kustomization.yaml b/components/monitoring/grafana/base/dashboards/kustomization.yaml index 0964f6ec17b..4d50eb1a392 100644 --- a/components/monitoring/grafana/base/dashboards/kustomization.yaml +++ b/components/monitoring/grafana/base/dashboards/kustomization.yaml @@ -6,7 +6,6 @@ resources: - image-controller/ - dora-metrics/ - has/ -- jvm-build-service/ - integration/ - migration/ - release/ diff --git a/hack/build/build-via-appstudio.sh b/hack/build/build-via-appstudio.sh index 62625254544..edb3de8b937 100755 --- a/hack/build/build-via-appstudio.sh +++ b/hack/build/build-via-appstudio.sh @@ -29,8 +29,6 @@ function create-component { create-secret if [ -z "$COMPONENT" ]; then - create-component https://github.com/devfile-samples/devfile-sample-java-springboot-basic docker/Dockerfile - create-component https://github.com/devfile-samples/devfile-sample-code-with-quarkus src/main/docker/Dockerfile.jvm.staged create-component https://github.com/devfile-samples/devfile-sample-python-basic docker/Dockerfile else create-component $COMPONENT $PATH_TO_DOCKERFILE diff --git a/hack/preview-template.env b/hack/preview-template.env index 36f48dde341..a6c098d6b9d 100644 --- a/hack/preview-template.env +++ b/hack/preview-template.env @@ -36,13 +36,6 @@ export BUILD_SERVICE_IMAGE_TAG= export BUILD_SERVICE_IMAGE_TAG_EXPIRATION= export BUILD_SERVICE_PR_OWNER= export BUILD_SERVICE_PR_SHA= -### Override JVM Build service image -export JVM_BUILD_SERVICE_IMAGE_REPO= -export JVM_BUILD_SERVICE_IMAGE_TAG= -export JVM_BUILD_SERVICE_PR_OWNER= -export JVM_BUILD_SERVICE_PR_SHA= -export JVM_BUILD_SERVICE_CACHE_IMAGE= -export JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE= ### Override the default Tekton bundle export DEFAULT_BUILD_BUNDLE= diff --git a/hack/preview.sh b/hack/preview.sh index 4e2e3f4d417..c39ceab2daa 100755 --- a/hack/preview.sh +++ b/hack/preview.sh @@ -191,11 +191,6 @@ sed -i.bak "s/rekor-server.enterprise-contract-service.svc/$rekor_server/" $ROOT [ -n "${BUILD_SERVICE_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"quay.io/konflux-ci/build-service\")) |=.newTag=\"${BUILD_SERVICE_IMAGE_TAG}\"" $ROOT/components/build-service/development/kustomization.yaml [ -n "${BUILD_SERVICE_IMAGE_TAG_EXPIRATION}" ] && yq -i e "(.spec.template.spec.containers[].env[] | select(.name==\"IMAGE_TAG_ON_PR_EXPIRATION\") | .value) |= \"${BUILD_SERVICE_IMAGE_TAG_EXPIRATION}\"" $ROOT/components/build-service/development/image-expiration-patch.yaml [[ -n "${BUILD_SERVICE_PR_OWNER}" && "${BUILD_SERVICE_PR_SHA}" ]] && yq -i e "(.resources[] | select(. ==\"*github.com/konflux-ci/build-service*\")) |= \"https://github.com/${BUILD_SERVICE_PR_OWNER}/build-service/config/default?ref=${BUILD_SERVICE_PR_SHA}\"" $ROOT/components/build-service/development/kustomization.yaml -[ -n "${JVM_BUILD_SERVICE_IMAGE_REPO}" ] && yq -i e "(.images.[] | select(.name==\"hacbs-jvm-operator\")) |=.newName=\"${JVM_BUILD_SERVICE_IMAGE_REPO}\"" $ROOT/components/jvm-build-service/base/kustomization.yaml -[ -n "${JVM_BUILD_SERVICE_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"hacbs-jvm-operator\")) |=.newTag=\"${JVM_BUILD_SERVICE_IMAGE_TAG}\"" $ROOT/components/jvm-build-service/base/kustomization.yaml -[[ -n "${JVM_BUILD_SERVICE_PR_OWNER}" && "${JVM_BUILD_SERVICE_PR_SHA}" ]] && sed -i -e "s|\(https://github.com/\)redhat-appstudio\(/jvm-build-service/.*?ref=\)\(.*\)|\1${JVM_BUILD_SERVICE_PR_OWNER}\2${JVM_BUILD_SERVICE_PR_SHA}|" -e "s|\(https://raw.githubusercontent.com/\)redhat-appstudio\(/jvm-build-service/\)[^/]*\(/.*\)|\1${JVM_BUILD_SERVICE_PR_OWNER}\2${JVM_BUILD_SERVICE_PR_SHA}\3|" $ROOT/components/jvm-build-service/base/kustomization.yaml -[[ -n "${JVM_BUILD_SERVICE_CACHE_IMAGE}" && ${JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE} ]] && yq -i e "select(.[].path == \"/spec/template/spec/containers/0/env\") | .[].value |= . + [{\"name\" : \"JVM_BUILD_SERVICE_CACHE_IMAGE\", \"value\": \"${JVM_BUILD_SERVICE_CACHE_IMAGE}\"}, {\"name\": \"JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE\", \"value\": \"${JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE}\"}] | (.[].value[] | select(.name == \"IMAGE_TAG\")) |= .value = \"\"" $ROOT/components/jvm-build-service/base/operator_env_patch.yaml - [ -n "${HAS_IMAGE_REPO}" ] && yq -i e "(.images.[] | select(.name==\"quay.io/redhat-appstudio/application-service\")) |=.newName=\"${HAS_IMAGE_REPO}\"" $ROOT/components/has/base/kustomization.yaml [ -n "${HAS_IMAGE_TAG}" ] && yq -i e "(.images.[] | select(.name==\"quay.io/redhat-appstudio/application-service\")) |=.newTag=\"${HAS_IMAGE_TAG}\"" $ROOT/components/has/base/kustomization.yaml [[ -n "${HAS_PR_OWNER}" && "${HAS_PR_SHA}" ]] && yq -i e "(.resources[] | select(. ==\"*github.com/redhat-appstudio/application-service*\")) |= \"https://github.com/${HAS_PR_OWNER}/application-service/config/default?ref=${HAS_PR_SHA}\"" $ROOT/components/has/base/kustomization.yaml diff --git a/hack/secret-creator/create-image-controller-secret.sh b/hack/secret-creator/create-image-controller-secret.sh index 5383a634fd8..0141e86fb88 100755 --- a/hack/secret-creator/create-image-controller-secret.sh +++ b/hack/secret-creator/create-image-controller-secret.sh @@ -7,10 +7,6 @@ main() { echo "Creating a secret with a token for Image Controller" oc create namespace image-controller --dry-run=client -o yaml | oc apply -f - oc create -n image-controller secret generic quaytoken --from-literal=organization="$organization" --from-literal=quaytoken="$quay_token" --dry-run=client -o yaml | oc apply -f - - - echo "Creating a secret with a token for JVM Build Service" - oc create namespace jvm-build-service --dry-run=client -o yaml | oc apply -f - - oc create -n jvm-build-service secret generic quaytoken --from-literal=organization="$organization" --from-literal=quaytoken="$quay_token" --dry-run=client -o yaml | oc apply -f - } if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then