Skip to content

Commit

Permalink
remove keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn-V committed Oct 19, 2023
1 parent fa3c6ce commit 1c69f4f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docker/adapter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ COPY . .
RUN npm install --include-dev

VOLUME ./data
ENV TENANT_ID
ENV CLIENT_ID
ENV CLIENT_SECRET

CMD ["npm","run","trace"]
6 changes: 3 additions & 3 deletions docker/adapter/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs'

const tenant_id = "3209935f-cc7a-42f8-aec8-87e3589716cb"
const client_id = "a0a2f365-ff6b-4aa2-b6dd-99d06e29266b"
const client_secret = "lCO8Q~-iIn_w9kL4ntIB_PQu7.PL5klPd-AlfbDu"
const tenant_id = process.env.TENANT_ID
const client_id = process.env.CLIENT_ID
const client_secret = process.env.CLIENT_SECRET
const AUTHORITY = `https://login.microsoftonline.com/${tenant_id}`
const GRAPH = `https://graph.microsoft.com`
const TOKEN_URL = `${AUTHORITY}/oauth2/v2.0/token`
Expand Down
10 changes: 9 additions & 1 deletion helm/service/templates/adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ spec:
containers:
- name: adapter
image: "{{ .Values.adapter.image }}:{{ .Values.adapter.tag }}"

volumeMounts:
- name: {{ .Values.pvc.mount }}
mountPath: /adapter/data

env:
- name: TENANT_ID
value: {{ .Values.adapter.tenantId }}
- name: CLIENT_ID
value: {{ .Values.adapter.clientId }}
- name: CLIENT_SECRET
value: {{ .Values.adapter.clientSecret }}

volumes:
- name: {{ .Values.pvc.mount }}
Expand Down
3 changes: 3 additions & 0 deletions helm/service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ pvc:
mount: pewpew-adapter-volume
claim: pewpew-adapter-pvc
name: pewpew-adapter-pv
tenantId: "YOUR-TENANT-ID"
clientId: "YOUR-CLIENT-ID"
clientSecret: "YOUR-CLIENT-SECRET"
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h3>About IPew</h3>
loadData: function () {
var self = this
if (this.data.length === 0) {
$.getJSON('data/data.json', function (data) {
$.getJSON(`${window.location.host}/data/data.json`, function (data) {
self.data = data.data
self.getData();
});
Expand Down

0 comments on commit 1c69f4f

Please sign in to comment.