-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Google Default Credentials Model #1
Comments
Hi all, i got it working using env variable ---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana-permission-sync
labels:
app: grafana-permission-snyc
spec:
replicas: 1
selector:
matchLabels:
app: grafana-permission-sync
template:
metadata:
labels:
app: grafana-permission-sync
spec:
containers:
- name: grafana-permission-sync
image: quay.io/google-cloud-tools/grafana-permission-sync:v1.0.9
args:
- --configPath=/app/config/config.yaml
env:
- name: GRAFANA_PASS
valueFrom:
secretKeyRef:
name: grafana-permission-sync-grafana-admin
key: GRAFANA_PASS
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /app/credentials/credentials.json
volumeMounts:
- mountPath: /app/config
name: config
- mountPath: /app/credentials
name: google-credentials
readOnly: true
volumes:
- name: config
configMap:
name: grafana-permission-sync
- name: google-credentials
secret:
secretName: grafana-permission-sync-google-credentials
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-permission-sync
data:
config.yaml: |
grafana:
url: http://grafana.example.com
user: admin
google:
credentialsPath: /app/credentials/credentials.json
adminEmail: [email protected]
domain: example.com
rules:
- groups:
- [email protected]
orgs:
- "Example Org. "
role: Admin
- groups:
- [email protected]
orgs:
- "Example Org."
role: Viewer
---
apiVersion: v1
data:
GRAFANA_PASS: ...
kind: Secret
metadata:
name: grafana-permission-sync-grafana-admin
---
apiVersion: v1
data:
credentials.json: ...
kind: Secret
metadata:
name: grafana-permission-sync-google-credentials |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe The problem
Generally when using Google Cloud Credentials Model if you set
GOOGLE_APPLICATION_CREDENTIALS
then the application will look for the credentials at that specified path, this allow for voluming in docker containers to be smoother as when you volume in something like Kubernetes the volume will overwrite any files in the volume directory, hence if you attempted to do something like this:This will overwrite the binary found in
/app
, however this is the directory that the application looks for thecredentials.json
Proposed Solution
If you used the
GOOGLE_APPLICATION_CREDENTIALS
way you could do something like this:Which would look for the credentials in the folder
/app/credentials
specifically. I'm not sure if this is possible currently but just not documented but when I try the above I get the following error:The text was updated successfully, but these errors were encountered: