From 5297152b880c870309c9838db4ba9b3ba95fe003 Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Thu, 23 May 2024 14:03:13 -0700 Subject: [PATCH] feat: remove image stream (#73) * fix: result set leak * feat: remove image streams and add artifactory pull through cache --- .../templates/deployment.yaml | 4 +-- charts/nr-oracle-service/templates/is.yaml | 34 ------------------- src/main/resources/application.properties | 2 ++ 3 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 charts/nr-oracle-service/templates/is.yaml diff --git a/charts/nr-oracle-service/templates/deployment.yaml b/charts/nr-oracle-service/templates/deployment.yaml index a2bcc6d..f99bcdf 100644 --- a/charts/nr-oracle-service/templates/deployment.yaml +++ b/charts/nr-oracle-service/templates/deployment.yaml @@ -29,7 +29,7 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: {{ .Chart.Name }}-init - image: "image-registry.openshift-image-registry.svc:5000/{{.Release.Namespace}}/{{ include "component.name" . }}-init:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/nr-oracle-service/nr-oracle-service-init:{{ .Values.image.tag | default .Chart.Version }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} @@ -53,7 +53,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "image-registry.openshift-image-registry.svc:5000/{{.Release.Namespace}}/{{ include "component.name" . }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/nr-oracle-service/nr-oracle-service:{{ .Values.image.tag | default .Chart.Version }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/charts/nr-oracle-service/templates/is.yaml b/charts/nr-oracle-service/templates/is.yaml deleted file mode 100644 index 0d7dd8a..0000000 --- a/charts/nr-oracle-service/templates/is.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: {{ include "component.name" . }} - labels: - {{- include "component.labels" . | nindent 4 }} -spec: - lookupPolicy: - local: false - tags: - - name: "{{ .Values.image.tag | default .Chart.AppVersion }}" - from: - kind: DockerImage - name: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - referencePolicy: - type: Local ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: {{ include "component.name" . }}-init - labels: - {{- include "component.labels" . | nindent 4 }} -spec: - lookupPolicy: - local: false - tags: - - name: "{{ .Values.image.tag | default .Chart.AppVersion }}" - from: - kind: DockerImage - name: "{{ .Values.image.repositoryInit }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - referencePolicy: - type: Local diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index abf2aa1..9b5ca88 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -8,6 +8,8 @@ quarkus.datasource.jdbc.initial-size=${POOL_INITIAL_SIZE:1} quarkus.datasource.jdbc.max-lifetime=${POOL_MAX_LIFETIME:180000} quarkus.datasource.jdbc.idle-removal-interval=${POOL_IDLE_TIMEOUT:60000} quarkus.datasource.jdbc.leak-detection-interval=${POOL_LEAK_DETECTION_INTERVAL:45000} +quarkus.datasource.metrics-enabled=true +quarkus.datasource.jdbc.enable-metrics=true quarkus.http.port=${HTTP_PORT:3000} %dev.quarkus.datasource.jdbc.url=jdbc:oracle:thin:@${DB_HOST}:1521/${DB_NAME} api.key=${API_KEY}