From c02308e7c9eb6a67c803482165b3f52471c48f7d Mon Sep 17 00:00:00 2001 From: Will Button Date: Fri, 16 Feb 2024 11:36:16 -0700 Subject: [PATCH] DEVOPS-2546 initial k8s deploy --- .github/workflows/agglayer-dev.yml | 49 ++++++++++++++++++++++++++++++ helm-values/dev-values.yaml | 48 +++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 .github/workflows/agglayer-dev.yml create mode 100644 helm-values/dev-values.yaml diff --git a/.github/workflows/agglayer-dev.yml b/.github/workflows/agglayer-dev.yml new file mode 100644 index 0000000..02454ab --- /dev/null +++ b/.github/workflows/agglayer-dev.yml @@ -0,0 +1,49 @@ +name: "Build pipeline for agglayer-dev" +on: + push: + branches: + - DEVOPS-2546/dev-deploy + +env: + PROJECT_ID: "prj-polygonlabs-shared-dev" + GAR_LOCATION: "europe-west2" + + WIF_PROVIDER: "projects/595403903631/locations/global/workloadIdentityPools/build-pipeline-pool/providers/buildpipeline" + WIF_SERVICE_ACCOUNT: "gcp-apps-build-pipeline-sa@prj-polygonlabs-shared-dev.iam.gserviceaccount.com" + + CRITICAL_COUNT: 5 + IMAGE_NAME: "europe-west2-docker.pkg.dev/prj-polygonlabs-shared-dev/polygonlabs-docker-dev/agglayer" + + ATTESTOR_PROJECT_ID: "prj-polygonlabs-shared-dev" + KEY_RING: "gcp-apps-build-pipeline-ring" + KEY: "gcp-apps-build-pipeline-key" + ATTESTOR: "gcp-apps-build-pipeline-attestor" + +jobs: + build-pipeline: + name: "Build pipeline for agglayer-dev" + permissons: + contents: "write" + id-token: "write" + + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - id: custom-action + uses: 0xPolygon/pipelines@v3 + with: + workload_identity_provider: ${{ env.WIF_PROVIDER }} + service_account: ${{ env.WIF_SERVICE_ACCOUNT }} + gar_location: ${{ env.GAR_LOCATION }} + docker_image: ${{ env.IMAGE_NAME }} + dockerfile_name: docker/Dockerfile + dockerfile_path: . + critical_count: ${{ env.CRITICAL_COUNT }} + helm_values_path: 'helm-values/dev-values.yaml' + attestor: ${{ env.ATTESTOR }} + attestor_project: ${{ env.ATTESTOR_PROJECT_ID }} + keyversion_project: ${{ env.ATTESTOR_PROJECT_ID }} + keyversion_location: ${{ env.GAR_LOCATION }} + keyversion_keyring: ${{ env.KEY_RING }} + keyversion_key: ${{ env.KEY }} diff --git a/helm-values/dev-values.yaml b/helm-values/dev-values.yaml new file mode 100644 index 0000000..e518c69 --- /dev/null +++ b/helm-values/dev-values.yaml @@ -0,0 +1,48 @@ +# Default values for AggLayer dev deployment +name: agglayer +commonLabels: + team: agglayer + location: europe-west2 + host: gcp-openapi-gke-dev + env: dev + tag-version: v3 + app: agglayer + p_service: agglayer + +replicaCount: 1 + +podAnnotations: + operator.1password.io/inject: "agglayer" # wtf do I set this? + +strategy: + type: Recreate + +containers: + - name: agglayer + image: europe-west2-docker.pkg.dev/prj-polygonlabs-shared-dev/polygonlabs-docker-dev/agglayer:latest + imagePullPolicy: IfNotPresent + port: 8444 + command: + - "run" + - "--cfg" + - "/config/agglayer.toml" + envFromEnabled: true + onePassword: + InjectorEnvs: + DATA_NODE_FULL_NODE_RPCS_1: op://cdk-dev/agglayer/DATA_NODE_FULLNODERPCS_1 + DATA_NODE_RPC_HOST: op://cdk-dev/agglayer/DATA_NODE_RPC_HOST + DATA_NODE_RPC_PORT: op://cdk-dev/agglayer/DATA_NODE_RPC_PORT + DATA_NODE_DB_USER: op://cdk-dev/agglayer/DATA_NODE_DB_USER + DATA_NODE_DB_PASSWORD: op://cdk-dev/agglayer/DATA_NODE_DB_PASSWORD + DATA_NODE_DB_NAME: op://cdk-dev/agglayer/DATA_NODE_DB_NAME + DATA_NODE_DB_HOST: op://cdk-dev/agglayer/DATA_NODE_DB_HOST + DATA_NODE_ETHTXMANAGER_PRIVATEKEYS_0_PATH: op://cdk-dev/agglayer/DATA_NODE_ETHTXMANAGER_PRIVATEKEYS_0_PATH + DATA_NODE_ETHTXMANAGER_PRIVATEKEYS_0_PASSWORD: op://cdk-dev/agglayer/DATA_NODE_ETHTXMANAGER_PRIVATEKEYS_0_PASSWORD + DATA_NODE_L1_CHAINID: op://cdk-dev/agglayer/DATA_NODE_L1_CHAINID + DATA_NODE_L1_NODEURL: op://cdk-dev/agglayer/DATA_NODE_NODEURL + DATA_NODE_L1_ROLLUPMANAGERCONTRACT: op://cdk-dev/agglayer/DATA_NODE_ROLLUPMANAGERCONTRACT + +service: + type: NodePort + port: 8444 + targetPort: 8444