Skip to content

Commit

Permalink
feat: add splunk configmap & tls container
Browse files Browse the repository at this point in the history
  • Loading branch information
trev-dev committed Jul 31, 2024
1 parent 2ae85ed commit 5e5af6c
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-backend-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ jobs:
${{ secrets.SOAM_CLIENT_ID }} \
${{ secrets.SOAM_CLIENT_SECRET }} \
${{ secrets.SOAM_IDP_HINT_BCEID }} \
${{ secrets.SOAM_IDP_HINT_IDIR }}
${{ secrets.SOAM_IDP_HINT_IDIR }} \
${{ secrets.SPLUNK_TOKEN }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ jobs:
${{ secrets.SOAM_CLIENT_ID }} \
${{ secrets.SOAM_CLIENT_SECRET }} \
${{ secrets.SOAM_IDP_HINT_BCEID }} \
${{ secrets.SOAM_IDP_HINT_IDIR }}
${{ secrets.SOAM_IDP_HINT_IDIR }} \
${{ secrets.SPLUNK_TOKEN }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-backend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ jobs:
${{ secrets.SOAM_CLIENT_ID }} \
${{ secrets.SOAM_CLIENT_SECRET }} \
${{ secrets.SOAM_IDP_HINT_BCEID }} \
${{ secrets.SOAM_IDP_HINT_IDIR }}
${{ secrets.SOAM_IDP_HINT_IDIR }} \
${{ secrets.SPLUNK_TOKEN }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-openshift-backend-uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ jobs:
${{ secrets.SOAM_CLIENT_ID }} \
${{ secrets.SOAM_CLIENT_SECRET }} \
${{ secrets.SOAM_IDP_HINT_BCEID }} \
${{ secrets.SOAM_IDP_HINT_IDIR }}
${{ secrets.SOAM_IDP_HINT_IDIR }} \
${{ secrets.SPLUNK_TOKEN }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
Expand Down
1 change: 1 addition & 0 deletions tools/config/update-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ readonly SOAM_CLIENT_ID=$8
readonly SOAM_CLIENT_SECRET=$9
readonly SOAM_IDP_HINT_BCEID=${10}
readonly SOAM_IDP_HINT_IDIR=${11}
readonly SPLUNK_TOKEN=${12}
readonly SOAM_KC_REALM_ID="childcare-applications"
readonly D365_API_ENDPOINT="http://$D365_API_PREFIX-$ENV_VAL:5091"

Expand Down
41 changes: 41 additions & 0 deletions tools/openshift/backend-tls.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,50 @@ objects:
limits:
cpu: '${MAX_CPU}'
memory: '${MAX_MEM}'
- image: artifacts.developer.gov.bc.ca/docker-remote/fluent/fluent-bit:1.5.7
name: "${APP_NAME}-${BRANCH}-fluent-bit-sidecar"
imagePullPolicy: Always
imagePullSecrets:
- name: artifactory-creds
volumeMounts:
- name: log-storage
mountPath: /mnt/log
- name: flb-sc-config-volume
mountPath: /fluent-bit/etc/
readinessProbe:
tcpSocket:
port: 2020
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
livenessProbe:
httpGet:
path: /
port: 2020
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
ports:
- containerPort: 2020
protocol: TCP
name: metrics
resources:
requests:
cpu: "5m"
memory: "25Mi"
limits:
cpu: "10m"
memory: "50Mi"
volumes:
- name: log-storage
emptyDir: {}
- name: flb-sc-config-volume
configMap:
name: ${APP_NAME}-flb-sc-config-map
- name: tls-certs
secret:
secretName: ofm-backend-cert
Expand Down
3 changes: 0 additions & 3 deletions tools/openshift/backend.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ objects:
- name: flb-sc-config-volume
configMap:
name: ${APP_NAME}-flb-sc-config-map
# - name: tls-certs
# secret:
# secretName: ofm-backend-cert
test: false
triggers:
- type: ConfigChange
Expand Down

0 comments on commit 5e5af6c

Please sign in to comment.