diff --git a/deploy/base-development.sh b/deploy/base-development.sh index 2a6537264..039bd112d 100755 --- a/deploy/base-development.sh +++ b/deploy/base-development.sh @@ -17,34 +17,37 @@ fi DIR=`dirname $0` kubectl apply -f $DIR/namespace.yaml kubectl config set-context --current --namespace=test-jvm-namespace -kubectl delete --ignore-not-found secret jvm-build-image-secrets jvm-build-git-secrets jvm-build-maven-repo-secrets jvm-build-maven-repo-aws-secrets jvm-build-s3-secrets jvm-build-git-repo-secrets if [ -n "$QUAY_ORG" ] && [ -n "$QUAY_TOKEN" ]; then kubectl delete --ignore-not-found secret -n image-controller quaytoken kubectl create secret generic -n image-controller quaytoken --from-literal "quaytoken=$QUAY_TOKEN" --from-literal "organization=$QUAY_ORG" fi -kubectl create secret generic jvm-build-image-secrets --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson -kubectl create secret generic jvm-build-git-secrets --from-literal .git-credentials=" + +echo -e "\033[0;32mSecrets...\033[0m" +kubectl create --dry-run=client -o=yaml secret generic jvm-build-image-secrets --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson | kubectl apply -f - +kubectl create --dry-run=client -o=yaml secret generic jvm-build-git-secrets --from-literal .git-credentials=" https://$GITHUB_E2E_ORGANIZATION:$GITHUB_TOKEN@github.com https://test:test@gitlab.com -" +" | kubectl apply -f - if [ -n "$GIT_DEPLOY_TOKEN" ]; then - kubectl create secret generic jvm-build-git-repo-secrets --from-literal gitdeploytoken="$GIT_DEPLOY_TOKEN" + kubectl create --dry-run=client -o=yaml secret generic jvm-build-git-repo-secrets --from-literal gitdeploytoken="$GIT_DEPLOY_TOKEN" | kubectl apply -f - fi if [ -n "$MAVEN_PASSWORD" ]; then - kubectl create secret generic jvm-build-maven-repo-secrets --from-literal mavenpassword="$MAVEN_PASSWORD" + kubectl create --dry-run=client -o=yaml secret generic jvm-build-maven-repo-secrets --from-literal mavenpassword="$MAVEN_PASSWORD" | kubectl apply -f - fi if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ]; then if [ -n "$AWS_PROFILE" ]; then PROFILE="--from-literal awsprofile=$AWS_PROFILE" fi - kubectl create secret generic jvm-build-maven-repo-aws-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" $PROFILE - kubectl create secret generic jvm-build-s3-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" --from-literal awsregion=us-east-1 - + kubectl create --dry-run=client -o=yaml secret generic jvm-build-maven-repo-aws-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" $PROFILE | kubectl apply -f - + kubectl create --dry-run=client -o=yaml secret generic jvm-build-s3-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" --from-literal awsregion=us-east-1 | kubectl apply -f - fi + +echo -e "\033[0;32mPatching...\033[0m" JVM_BUILD_SERVICE_IMAGE=quay.io/$QUAY_USERNAME/hacbs-jvm-controller \ JVM_BUILD_SERVICE_CACHE_IMAGE=quay.io/$QUAY_USERNAME/hacbs-jvm-cache \ JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=quay.io/$QUAY_USERNAME/hacbs-jvm-build-request-processor:dev \ JVM_BUILD_SERVICE_CONSOLE_IMAGE=quay.io/$QUAY_USERNAME/jbs-management-console \ $DIR/patch-yaml.sh +echo -e "\033[0;32mRunning kubectl...\033[0m" kubectl apply -k $DIR/overlays/development diff --git a/deploy/operator/config/kustomization.yaml b/deploy/operator/config/kustomization.yaml index 1ea20f59b..9d725508e 100644 --- a/deploy/operator/config/kustomization.yaml +++ b/deploy/operator/config/kustomization.yaml @@ -1,11 +1,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -commonLabels: - app: hacbs-jvm-operator resources: - - system-config.yaml +- system-config.yaml -patchesStrategicMerge: - #note that when updating the ref here you must also update system-config.yaml - - https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service-builder-images/bd8e505b3082a03c030b36868a3753df9db15f97/image-config.yaml +labels: +- includeSelectors: true + pairs: + app: hacbs-jvm-operator + +#note that when updating the ref here you must also update system-config.yaml +patches: +- path: https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service-builder-images/bd8e505b3082a03c030b36868a3753df9db15f97/image-config.yaml diff --git a/deploy/operator/overlays/dev-template/kustomization.yaml b/deploy/operator/overlays/dev-template/kustomization.yaml index cdb4b38ee..7999e7947 100644 --- a/deploy/operator/overlays/dev-template/kustomization.yaml +++ b/deploy/operator/overlays/dev-template/kustomization.yaml @@ -2,32 +2,30 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - servicemonitor.yaml - - servicemonitor_rbac.yaml +- servicemonitor.yaml +- servicemonitor_rbac.yaml +- ../../base -bases: - - "../../base" images: - - name: hacbs-jvm-operator - newName: jvm-build-service-image - newTag: dev +- name: hacbs-jvm-operator + newName: jvm-build-service-image + newTag: dev -patchesStrategicMerge: - - namespace.yaml -patches: - - patch: |- - - op: replace - path: /spec/template/spec/containers/0/imagePullPolicy - value: Always - target: - kind: Deployment - name: hacbs-jvm-operator - - patch: |- - - op: replace - path: /spec/template/spec/volumes/0/secret/optional - value: true - target: - kind: Deployment - name: hacbs-jvm-operator +patches: +- patch: |- + - op: replace + path: /spec/template/spec/containers/0/imagePullPolicy + value: Always + target: + kind: Deployment + name: hacbs-jvm-operator +- patch: |- + - op: replace + path: /spec/template/spec/volumes/0/secret/optional + value: true + target: + kind: Deployment + name: hacbs-jvm-operator +- path: namespace.yaml diff --git a/deploy/overlays/ci-template/kustomization.yaml b/deploy/overlays/ci-template/kustomization.yaml index 43fc85913..ff07132c0 100644 --- a/deploy/overlays/ci-template/kustomization.yaml +++ b/deploy/overlays/ci-template/kustomization.yaml @@ -1,8 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: - - "../../base" -patchesStrategicMerge: - - config.yaml +resources: +- ../../base +patches: +- path: config.yaml diff --git a/deploy/overlays/dev-template/kustomization.yaml b/deploy/overlays/dev-template/kustomization.yaml index fff890d8f..da27ef873 100644 --- a/deploy/overlays/dev-template/kustomization.yaml +++ b/deploy/overlays/dev-template/kustomization.yaml @@ -1,32 +1,36 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: - - "../../crds/base" - - "../../base" - - "../../operator/config" - - "../../operator/overlays/dev-template" -# - "../../console/overlays/dev-template" +resources: +- ../../crds/base +- ../../base +- ../../operator/config +- ../../operator/overlays/dev-template +# - ../../console/overlays/dev-template patches: - - patch: |- - - op: replace - path: /spec/steps/2/image - value: jvm-build-service-reqprocessor-image - target: - kind: Task - name: maven - - patch: |- - - op: add - path: "/spec/template/spec/containers/0/env" - value: - - name: S3_SYNC_ENABLED - value: "true" - target: - kind: Deployment - name: hacbs-jvm-operator - - -patchesStrategicMerge: - - config.yaml - - system-config.yaml +- patch: |- + - op: replace + path: /spec/steps/2/image + value: jvm-build-service-reqprocessor-image + target: + kind: Task + name: maven +- patch: |- + - op: replace + path: /spec/steps/2/image + value: jvm-build-service-reqprocessor-image + target: + kind: Task + name: gradle +- patch: |- + - op: add + path: "/spec/template/spec/containers/0/env" + value: + - name: S3_SYNC_ENABLED + value: "true" + target: + kind: Deployment + name: hacbs-jvm-operator +- path: config.yaml +- path: system-config.yaml diff --git a/deploy/user-namespace-only.sh b/deploy/user-namespace-only.sh deleted file mode 100755 index a671cbe3b..000000000 --- a/deploy/user-namespace-only.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - - -echo "quay username:" -echo ${QUAY_USERNAME} - -DIR=`dirname $0` -find $DIR -name ci-final -exec rm -r {} \; -find $DIR -name ci-template -exec cp -r {} {}/../ci-final \; -find $DIR -path \*ci-final\*.yaml -exec sed -i s/QUAY_USERNAME/${QUAY_USERNAME}/ {} \; -find $DIR -path \*ci-final\*.yaml -exec sed -i s/QUAY_TOKEN/${QUAY_TOKEN}/ {} \; - -oc apply -f $DIR/overlays/ci-final/secret.yaml -oc apply -k $DIR/overlays/ci-final diff --git a/java-components/management-console/src/main/resources/application.properties b/java-components/management-console/src/main/resources/application.properties index 7f028d55f..6f2acf1be 100644 --- a/java-components/management-console/src/main/resources/application.properties +++ b/java-components/management-console/src/main/resources/application.properties @@ -25,6 +25,7 @@ concurrent-builds=20 quarkus.s3.aws.region=us-east-1 quarkus.s3.aws.credentials.type=default quarkus.s3.devservices.enabled=false +quarkus.quinoa.package-manager-install=true quarkus.quinoa.package-manager-install.node-version=18.18.2 quarkus.quinoa.package-manager-install.npm-version=9.8.1 quarkus.quinoa.dev-server.port=9000