From 39186f181871a07355dc6c655782fb5aa48e35ef Mon Sep 17 00:00:00 2001 From: Alan Bridgeman Date: Wed, 12 Feb 2025 03:39:58 -0600 Subject: [PATCH] Got rid of extra OAuth variables that are no longer explicitly used (are now derived in other ways etc...) --- src/Deployment.py | 10 ---------- src/OAuth.py | 16 +--------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/Deployment.py b/src/Deployment.py index fccdd12..58e5abc 100644 --- a/src/Deployment.py +++ b/src/Deployment.py @@ -131,16 +131,6 @@ class Deployment (Template): f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'configMapKeyRef:' + '\n') f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'name: {{ .Release.Name }}-oauth-credentials' + '\n') f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'key: dev-port' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + '- name: CLIENT_ID' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + 'valueFrom:' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'configMapKeyRef:' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'name: {{ .Release.Name }}-oauth-credentials' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'key: client-id' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + '- name: CLIENT_SECRET' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + 'valueFrom:' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'secretKeyRef:' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'name: {{ .Release.Name }}-oauth-client-secret' + '\n') - f.write(' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + 'key: client-secret' + '\n') if self.uses_db: f.write(' ' + ' ' + ' ' + ' ' + '# Database credentials' + '\n') diff --git a/src/OAuth.py b/src/OAuth.py index 181f777..33f10c9 100644 --- a/src/OAuth.py +++ b/src/OAuth.py @@ -9,8 +9,6 @@ class OAuth (Template): self.app_name = app_name self.service_name = service_name self.dev_port = dev_port - self.client_id = client_id - self.client_secret = client_secret def write(self): with open('templates/oauth-credentials-config-map.yaml', 'w') as f: @@ -25,16 +23,4 @@ class OAuth (Template): f.write(' ' + 'app-abbreviation: {{ .Values.oauth.appAbbreviation }}' + '\n') f.write(' ' + 'app-name: {{ .Values.oauth.appName }}' + '\n') f.write(' ' + 'service-name: {{ .Values.oauth.serviceName }}' + '\n') - f.write(' ' + 'dev-port: {{ .Values.oauth.devPort | quote }}' + '\n') - f.write(' ' + 'client-id: {{ .Values.oauth.clientId | quote }}' + '\n') - - with open('templates/oauth-client-secret.yaml', 'w') as f: - f.write('apiVersion: v1' + '\n') - f.write('kind: Secret' + '\n') - f.write('metadata:' + '\n') - f.write(' ' + 'name: {{ .Release.Name }}-oauth-client-secret' + '\n') - f.write(' ' + 'labels:' + '\n') - f.write(' ' + ' ' + 'app: {{ .Release.Name }}' + '\n') - f.write('type: Opaque' + '\n') - f.write('data:' + '\n') - f.write(' ' + 'client-secret: {{ .Values.oauth.clientSecret | b64enc }}' + '\n') \ No newline at end of file + f.write(' ' + 'dev-port: {{ .Values.oauth.devPort | quote }}' + '\n') \ No newline at end of file