From b9e614cbd7909a3c80be13d16009af86e307db2a Mon Sep 17 00:00:00 2001 From: Umberto Coppola Bottazzi Date: Fri, 22 Nov 2024 11:51:40 +0100 Subject: [PATCH] chore: Remove useless files (#164) remove useless files --- .devops/deploy-pipelines.yml | 201 ----------------------------------- helm/.helmignore | 23 ---- helm/Chart.lock | 6 -- helm/Chart.yaml | 10 -- helm/values-dev.yaml | 41 ------- helm/values-prod.yaml | 41 ------- helm/values-uat.yaml | 41 ------- helm/values.yaml | 97 ----------------- 8 files changed, 460 deletions(-) delete mode 100644 .devops/deploy-pipelines.yml delete mode 100644 helm/.helmignore delete mode 100644 helm/Chart.lock delete mode 100644 helm/Chart.yaml delete mode 100644 helm/values-dev.yaml delete mode 100644 helm/values-prod.yaml delete mode 100644 helm/values-uat.yaml delete mode 100644 helm/values.yaml diff --git a/.devops/deploy-pipelines.yml b/.devops/deploy-pipelines.yml deleted file mode 100644 index aa1850b8..00000000 --- a/.devops/deploy-pipelines.yml +++ /dev/null @@ -1,201 +0,0 @@ -# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service -# https://docs.microsoft.com/azure/devops/pipelines/languages/docker - -parameters: - - name: 'executeBuild' - displayName: 'Launch docker build' - type: boolean - default: true - -trigger: - branches: - include: - - develop - - uat - - main - paths: - include: - - src/* - - build.gradle.kts - - helm/* - - Dockerfile - - settings.gradle.kts - -pr: none - -resources: - - repo: self - -variables: - - # vmImageNameDefault: 'ubuntu-latest' - vmImageNameDefault: ubuntu-22.04 - - imageRepository: '$(K8S_IMAGE_REPOSITORY_NAME)' - deployNamespace: '$(DEPLOY_NAMESPACE)' - helmReleaseName : '$(HELM_RELEASE_NAME)' - canDeploy: true - - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/uat') }}: - environment: 'UAT' - dockerRegistryName: '$(UAT_CONTAINER_REGISTRY_NAME)' - dockerRegistryServiceConnection: '$(UAT_CONTAINER_REGISTRY_SERVICE_CONN)' - kubernetesServiceConnection: '$(UAT_KUBERNETES_SERVICE_CONN)' - containerRegistry: '$(UAT_CONTAINER_REGISTRY_NAME)' - selfHostedAgentPool: $(UAT_AGENT_POOL) - postmanEnvFile: arc_UAT.postman_environment.json - clientId: '$(UAT_WORK_IDENTITY_CLIENT_ID)' - - ${{ elseif eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: - environment: 'PROD' - dockerRegistryName: '$(PROD_CONTAINER_REGISTRY_NAME)' - dockerRegistryServiceConnection: '$(PROD_CONTAINER_REGISTRY_SERVICE_CONN)' - kubernetesServiceConnection: '$(PROD_KUBERNETES_SERVICE_CONN)' - containerRegistry: '$(PROD_CONTAINER_REGISTRY_NAME)' - selfHostedAgentPool: $(PROD_AGENT_POOL) - clientId: '$(PROD_WORK_IDENTITY_CLIENT_ID)' - - ${{ else }}: - environment: 'DEV' - dockerRegistryName: '$(DEV_CONTAINER_REGISTRY_NAME)' - dockerRegistryServiceConnection: '$(DEV_CONTAINER_REGISTRY_SERVICE_CONN)' - kubernetesServiceConnection: '$(DEV_KUBERNETES_SERVICE_CONN)' - containerRegistry: '$(DEV_CONTAINER_REGISTRY_NAME)' - selfHostedAgentPool: $(DEV_AGENT_POOL) - postmanEnvFile: arc_DEV.postman_environment.json - clientId: '$(DEV_WORK_IDENTITY_CLIENT_ID)' - - DOCKER_BUILDKIT: 1 - -stages: - - stage: 'stage_build' - condition: eq(variables.canDeploy, true) - displayName: 'Build and publish image to ${{ variables.environment }} registry' - jobs: - - job: job_build - displayName: Build - pool: - vmImage: $(vmImageNameDefault) - steps: - - task: Bash@3 - displayName: Get app version - name: getAppVersion - condition: and(succeeded(), eq(variables.canDeploy, true)) - inputs: - targetType: 'inline' - script: | - version=$(cat build.gradle.kts | grep "version = '.*'" | cut -d"'" -f2) - echo "Building $version version" - echo "##vso[task.setvariable variable=appVersion;isOutput=true]$version" - failOnStderr: true - - - task: Docker@2 - condition: and(succeeded(), ${{ parameters.executeBuild }}) - displayName: 'Build and publish $(imageRepository) image' - inputs: - containerRegistry: '$(dockerRegistryServiceConnection)' - repository: '$(imageRepository)' - command: 'buildAndPush' - tags: | - latest - $(Build.SourceVersion) - $(getAppVersion.appVersion) - - - task: PublishPipelineArtifact@1 - displayName: 'Publish manifests into pipeline artifacts' - condition: succeeded() - inputs: - targetPath: '$(Build.Repository.LocalPath)/helm' - artifact: 'helm' - publishLocation: 'pipeline' - - - stage: stage_deploy - displayName: 'Deploy to ${{ variables.environment }} K8S' - dependsOn: ['stage_build'] - variables: - appVersion: $[ stageDependencies.stage_build.job_build.outputs['getAppVersion.appVersion'] ] - condition: and(succeeded(), eq(variables.canDeploy, true)) - jobs: - - deployment: job_deploy - displayName: 'Deploy' - pool: - name: $(selfHostedAgentPool) - environment: '$(environment)' - strategy: - runOnce: - deploy: - steps: - - download: none - - task: DownloadPipelineArtifact@2 - inputs: - buildType: 'current' - artifactName: 'helm' - targetPath: '$(Pipeline.Workspace)/helm' - - task: KubectlInstaller@0 - - task: Bash@3 - name: helm_dependency_build - displayName: Helm dependency build - inputs: - workingDirectory: '$(Pipeline.Workspace)/helm' - targetType: 'inline' - script: | - helm repo add pagopa-microservice https://pagopa.github.io/aks-microservice-chart-blueprint - helm dep build - failOnStderr: true - - bash: | - echo 'microservice-chart: - podAnnotations: - "build/buildNumber": "$(Build.BuildNumber)" - "build/appVersion": "$(appVersion)" - "build/sourceVersion": "$(Build.SourceVersion)"' > buildMetadata.yaml - displayName: Writing build metadata - - - task: HelmDeploy@0 - displayName: Helm upgrade - inputs: - kubernetesServiceEndpoint: ${{ variables.kubernetesServiceConnection }} - namespace: '$(deployNamespace)' - command: upgrade - chartType: filepath - chartPath: $(Pipeline.Workspace)/helm - chartName: ${{ variables.helmReleaseName }} - releaseName: ${{ variables.helmReleaseName }} - valueFile: "$(Pipeline.Workspace)/helm/values-${{ lower(variables.environment) }}.yaml" - install: true - waitForExecution: true - arguments: --timeout 5m0s - --values buildMetadata.yaml - --set microservice-chart.azure.workloadIdentityClientId=$(clientId) - - stage: Test_e2e - displayName: 'Test_e2e_on_${{ variables.environment }}' - condition: or(eq(variables.environment, 'DEV'), eq(variables.environment, 'UAT')) - jobs: - - job: 'Run_Postman_collection_on_${{ variables.environment }}' - displayName: 'Run Postman collection on ${{ variables.environment }}' - pool: - name: $(selfHostedAgentPool) - steps: - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - - task: Npm@1.238.1 - displayName: Install newman - inputs: - command: custom - customCommand: install -g newman - - task: DownloadSecureFile@1 - displayName: 'download postman environment' - name: postman_env - inputs: - secureFile: $(postmanEnvFile) - - task: CmdLine@2 - displayName: Run newman - continueOnError: true # Useful to avoid the skipping of result publishing task - inputs: - script: newman run postman/pagopa-arc-E2E.postman_collection.json -e $(postman_env.secureFilePath) --reporters cli,junit --reporter-junit-export result/test-result.xml - - task: PublishTestResults@2 - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: '**/test-*.xml' - searchFolder: '$(System.DefaultWorkingDirectory)/result/' - testRunTitle: 'Publish Newman Test Results' diff --git a/helm/.helmignore b/helm/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/helm/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm/Chart.lock b/helm/Chart.lock deleted file mode 100644 index a3669258..00000000 --- a/helm/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: microservice-chart - repository: https://pagopa.github.io/aks-microservice-chart-blueprint - version: 7.1.1 -digest: sha256:97960b99659508b685798d0a6496ca36eb9c015559b95551b33e7af096aadef2 -generated: "2024-09-25T12:17:35.7119149+02:00" diff --git a/helm/Chart.yaml b/helm/Chart.yaml deleted file mode 100644 index 53aca622..00000000 --- a/helm/Chart.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v2 -name: pagopa-arc-be -description: pagopa-arc-be -type: application -version: 1.0.0 -appVersion: 1.0.0 -dependencies: - - name: microservice-chart - version: 7.1.1 - repository: "https://pagopa.github.io/aks-microservice-chart-blueprint" diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml deleted file mode 100644 index 2fb70678..00000000 --- a/helm/values-dev.yaml +++ /dev/null @@ -1,41 +0,0 @@ -microservice-chart: - image: - repository: arcditncorecommonacr.azurecr.io/arcbe - tag: latest - pullPolicy: Always - - ingress: - host: "citizen.internal.dev.cittadini.pagopa.it" - - resources: - requests: - memory: "256Mi" - cpu: "40m" - limits: - memory: "4Gi" - cpu: "300m" - - autoscaling: - enable: false - # minReplica: 1 - # maxReplica: 1 - # pollingInterval: 30 # seconds - # cooldownPeriod: 300 # seconds - # triggers: - # - type: cpu - # metadata: - # type: Utilization # Allowed types are 'Utilization' or 'AverageValue' - # value: "70" - - envConfig: - ENV: "DEV" - JAVA_TOOL_OPTIONS: "-Xms128m -Xmx4g -Djava.util.concurrent.ForkJoinPool.common.parallelism=7 -javaagent:/app/applicationinsights-agent.jar -Dapplicationinsights.configuration.file=/mnt/file-config-external/appinsights-config/applicationinsights.json -agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=3002 -Dcom.sun.management.jmxremote.rmi.port=3003 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" - AUTH_CLIENT_REDIRECT_URI: https://dev.cittadini.pagopa.it/pagamenti/auth-callback - AUTH_ISSUER_URI: https://dev.oneid.pagopa.it - AUTH_CLIENT_AUTHORIZATION_URI: https://dev.oneid.pagopa.it/login - AUTH_CLIENT_TOKEN_URI: https://dev.oneid.pagopa.it/oidc/token - AUTH_CLIENT_JWK_URI: https://dev.oneid.pagopa.it/oidc/keys - - keyvault: - name: "arc-d-itn-cittadini-kv" - tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml deleted file mode 100644 index 0aa15108..00000000 --- a/helm/values-prod.yaml +++ /dev/null @@ -1,41 +0,0 @@ -microservice-chart: - image: - repository: arcpitncorecommonacr.azurecr.io/arcbe - tag: latest - pullPolicy: Always - - ingress: - host: "citizen.internal.cittadini.pagopa.it" - - resources: - requests: - memory: "256Mi" - cpu: "40m" - limits: - memory: "4Gi" - cpu: "300m" - - autoscaling: - enable: false - # minReplica: 1 - # maxReplica: 1 - # pollingInterval: 30 # seconds - # cooldownPeriod: 300 # seconds - # triggers: - # - type: cpu - # metadata: - # type: Utilization # Allowed types are 'Utilization' or 'AverageValue' - # value: "70" - - envConfig: - ENV: "PROD" - JAVA_TOOL_OPTIONS: "-Xms128m -Xmx4g -Djava.util.concurrent.ForkJoinPool.common.parallelism=7 -javaagent:/app/applicationinsights-agent.jar -Dapplicationinsights.configuration.file=/mnt/file-config-external/appinsights-config/applicationinsights.json -agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=3002 -Dcom.sun.management.jmxremote.rmi.port=3003 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" - AUTH_CLIENT_REDIRECT_URI: TBD - AUTH_ISSUER_URI: TBD - AUTH_CLIENT_AUTHORIZATION_URI: TBD - AUTH_CLIENT_TOKEN_URI: TBD - AUTH_CLIENT_JWK_URI: TBD - - keyvault: - name: "arc-p-itn-cittadini-kv" - tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml deleted file mode 100644 index f5417903..00000000 --- a/helm/values-uat.yaml +++ /dev/null @@ -1,41 +0,0 @@ -microservice-chart: - image: - repository: arcuitncorecommonacr.azurecr.io/arcbe - tag: latest - pullPolicy: Always - - ingress: - host: "citizen.internal.uat.cittadini.pagopa.it" - - resources: - requests: - memory: "256Mi" - cpu: "40m" - limits: - memory: "4Gi" - cpu: "300m" - - autoscaling: - enable: false - # minReplica: 1 - # maxReplica: 1 - # pollingInterval: 30 # seconds - # cooldownPeriod: 300 # seconds - # triggers: - # - type: cpu - # metadata: - # type: Utilization # Allowed types are 'Utilization' or 'AverageValue' - # value: "70" - - envConfig: - ENV: "UAT" - JAVA_TOOL_OPTIONS: "-Xms128m -Xmx4g -Djava.util.concurrent.ForkJoinPool.common.parallelism=7 -javaagent:/app/applicationinsights-agent.jar -Dapplicationinsights.configuration.file=/mnt/file-config-external/appinsights-config/applicationinsights.json -agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=3002 -Dcom.sun.management.jmxremote.rmi.port=3003 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" - AUTH_CLIENT_REDIRECT_URI: https://uat.cittadini.pagopa.it/pagamenti/auth-callback - AUTH_ISSUER_URI: https://uat.oneid.pagopa.it - AUTH_CLIENT_AUTHORIZATION_URI: https://uat.oneid.pagopa.it/login - AUTH_CLIENT_TOKEN_URI: https://uat.oneid.pagopa.it/oidc/token - AUTH_CLIENT_JWK_URI: https://uat.oneid.pagopa.it/oidc/keys - - keyvault: - name: "arc-u-itn-cittadini-kv" - tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" diff --git a/helm/values.yaml b/helm/values.yaml deleted file mode 100644 index 32b537d3..00000000 --- a/helm/values.yaml +++ /dev/null @@ -1,97 +0,0 @@ -microservice-chart: - namespace: "cittadini" - nameOverride: "" - fullnameOverride: "" - - livenessProbe: - httpGet: - path: /actuator/health/liveness - port: 8080 - initialDelaySeconds: 120 - failureThreshold: 15 - periodSeconds: 10 - - readinessProbe: - httpGet: - path: /actuator/health/readiness - port: 8080 - initialDelaySeconds: 120 - failureThreshold: 15 - periodSeconds: 10 - - deployment: - create: true - - service: - create: true - type: ClusterIP - port: 8080 - - ingress: - create: true - path: /arcbe/(.*) - - azure: - # -- Azure Workload Identity Client ID - workloadIdentityClientId: WORK_IDENTITY_CLIENT_ID - - serviceAccount: - create: false - annotations: {} - name: "cittadini-workload-identity" - - podAnnotations: {} - - podSecurityContext: - seccompProfile: - type: RuntimeDefault - - securityContext: - allowPrivilegeEscalation: false - runAsNonRoot: true - runAsUser: 65534 - runAsGroup: 65534 - - externalConfigMapFiles: - create: true - configMaps: - - name: appinsights-config - key: applicationinsights.json - - envConfig: - APPLICATIONINSIGHTS_ROLE_NAME: "pagopaarcbe" - APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL: "OFF" - APPLICATIONINSIGHTS_INSTRUMENTATION_MICROMETER_ENABLED: "false" - APPLICATIONINSIGHTS_PREVIEW_PROFILER_ENABLED: "false" - ENABLE_AUDIT_APPENDER: "TRUE" - JWT_TOKEN_EXPIRATION_SECONDS: "28800" - REDIS_PORT: "6380" - REDIS_SSL_ENABLED: "true" - - externalConfigMapValues: - rest-client: - BIZ_EVENTS_PAID_NOTICE_BASE_URL: bizevents-paids-base-url - PULL_PAYMENT_BASE_URL: pullpayment-base-url - assistance: - ASSISTANCE_ZENDESK_PRODUCT_ID: assistance-arc-zendesk-product-id - ASSISTANCE_ZENDESK_ORGANIZATION: assistance-arc-zendesk-organization - HELP_CENTER_URL: arc-help-center-url - ZENDESK_ACTION_URL: zendesk-action-url - - envSecret: - APPLICATIONINSIGHTS_CONNECTION_STRING: appinsights-connection-string - BIZ_EVENTS_PAID_NOTICE_SERVICE_API_KEY: pagopa-bizevents-paids-trx-apimv1-subscription-key - PULL_PAYMENT_SERVICE_API_KEY: pagopa-pullpayment-apimv1-subscription-key - AUTH_CLIENT_ID: oneidentity-client-id - AUTH_CLIENT_SECRET: oneidentity-client-secret - JWT_TOKEN_PRIVATE_KEY: jwt-private-key - JWT_TOKEN_PUBLIC_KEY: jwt-public-key - JWT_TOKEN_ASSISTANCE_ZENDESK_PRIVATE_KEY: jwt-assistance-zendesk-private-key - WHITE_LIST_USERS: cf-whitelist - REDIS_HOST: cache-standalone-host - REDIS_PASSWORD: cache-password - # nodeSelector: {} - - # tolerations: [] - - # affinity: {}