diff --git a/app/lib/cloud_data/reports_feed.rb b/app/lib/cloud_data/reports_feed.rb index 9821cafad..87bdf4840 100644 --- a/app/lib/cloud_data/reports_feed.rb +++ b/app/lib/cloud_data/reports_feed.rb @@ -1,10 +1,7 @@ module CloudData class ReportsFeed def initialize(bucket_name = ENV['S3_REPORTING_BUCKET_NAME']) - client = Aws::S3::Client.new( - access_key_id: ENV['S3_REPORTING_ACCESS_KEY_ID'], - secret_access_key: ENV['S3_REPORTING_SECRET_ACCESS_KEY'], - ) + client = Aws::S3::Client.new @s3 = Aws::S3::Resource.new(client: client) @bucket = @s3.bucket(bucket_name) end diff --git a/k8s_migrate_job.yml b/k8s_migrate_job.yml deleted file mode 100644 index 8233d1233..000000000 --- a/k8s_migrate_job.yml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: hmpps-book-secure-move-api-migrate-db-__ENV__ - namespace: hmpps-book-secure-move-api-__ENV__ -spec: - template: - metadata: - name: hmpps-book-secure-move-api-migrate-db-__ENV__ - labels: - app: hmpps-book-secure-move-api-web-__ENV__ - job: migrate-db - spec: - restartPolicy: Never - containers: - - name: app - image: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/book-a-secure-move/hmpps-book-secure-move-api:__ENV__.latest - command: ["bundle", "exec", "rake", "db:migrate"] - imagePullPolicy: Always - env: - - name: SECRET_KEY_BASE - valueFrom: - secretKeyRef: - name: hmpps-book-secure-move-api-secrets-__ENV__ - key: secret_key_base_key - - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: rds-instance-hmpps-book-secure-move-api-__ENV__ - key: url - - name: S3_ACCESS_KEY_ID - valueFrom: - secretKeyRef: - name: book-a-secure-move-documents-s3-bucket - key: access_key_id - - name: S3_SECRET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: book-a-secure-move-documents-s3-bucket - key: secret_access_key - - name: S3_BUCKET_NAME - valueFrom: - secretKeyRef: - name: book-a-secure-move-documents-s3-bucket - key: bucket_name diff --git a/lib/tasks/metrics.rake b/lib/tasks/metrics.rake index ff7c4ec3b..2fae8adc7 100644 --- a/lib/tasks/metrics.rake +++ b/lib/tasks/metrics.rake @@ -1,8 +1,6 @@ namespace :metrics do desc 'Exports metrics in all the popular formats to s3' task :export, [:metric_class] => :environment do |_, args| - abort 'Please set S3_METRICS_ACCESS_KEY_ID' if ENV['S3_METRICS_ACCESS_KEY_ID'].blank? - abort 'Please set S3_METRICS_SECRET_ACCESS_KEY' if ENV['S3_METRICS_SECRET_ACCESS_KEY'].blank? abort 'Please set S3_METRICS_REGION' if ENV['S3_METRICS_REGION'].blank? abort 'Please set S3_METRICS_BUCKET_NAME' if ENV['S3_METRICS_BUCKET_NAME'].blank?