File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ {{- if and (eq .Values.backend "opensearch") (.Values.opensearchSecurity.generateAdminPassword | default false) }} 
2+ {{- include "stac-fastapi.configureOpensearchSecurity" . -}} 
3+ {{- $secretName := include "stac-fastapi.opensearchAdminSecretName" . -}} 
4+ {{- $existing := lookup "v1" "Secret" .Release.Namespace $secretName -}} 
5+ {{- $usernameKey := default "username" .Values.opensearchSecurity.usernameKey -}} 
6+ {{- $passwordKey := default "password" .Values.opensearchSecurity.passwordKey -}} 
7+ {{- $username := default "admin" .Values.opensearchSecurity.username -}} 
8+ {{- $passwordLength := int (default 32 .Values.opensearchSecurity.passwordLength) -}} 
9+ {{- $passwordB64 := "" -}} 
10+ {{- if and $existing (hasKey $existing.data $passwordKey) }} 
11+   {{- $passwordB64 = index $existing.data $passwordKey -}} 
12+ {{- else }} 
13+   {{- $passwordB64 = randAlphaNum $passwordLength | b64enc -}} 
14+ {{- end }} 
15+ {{- $usernameB64 := b64enc $username -}} 
16+ apiVersion : v1 
17+ kind : Secret 
18+ metadata :
19+   name : {{ $secretName }} 
20+   labels :
21+     {{- include "stac-fastapi.labels" . | nindent 4 }} 
22+   {{- with .Values.opensearchSecurity.annotations }} 
23+   annotations :
24+     {{- toYaml . | nindent 4 }} 
25+   {{- end }} 
26+ type : Opaque 
27+ data :
28+   {{ $usernameKey }}: {{ $usernameB64 }} 
29+   {{ $passwordKey }}: {{ $passwordB64 }} 
30+ {{- end }} 
Original file line number Diff line number Diff line change 1+ {{- /* 
2+      This template doesn't create resources; it mutates values so the 
3+      OpenSearch subchart receives the generated admin credentials. 
4+ */ -}} 
5+ {{- include "stac-fastapi.configureOpensearchSecurity" . -}} 
6+ {{- if (and (eq .Values.backend "opensearch") (.Values.opensearch.enabled) (.Values.opensearchSecurity.generateAdminPassword | default false)) }} 
7+ #  debug-extraEnvs-count: {{ len (default (list) .Values.opensearch.extraEnvs) }}
8+ {{- range $env := (default (list) .Values.opensearch.extraEnvs) }} 
9+ #  debug-extraEnv: {{ toYaml $env | replace "\n" " " | trim }}
10+ {{- end }} 
11+ {{- end }} 
Original file line number Diff line number Diff line change 6969    ENABLE_DATETIME_INDEX_FILTERING : " true" #  Enable for large datasets
7070    DATETIME_INDEX_MAX_SIZE_GB : " 50" 
7171    STAC_FASTAPI_RATE_LIMIT : " 1000/minute" 
72+     ES_USE_SSL : " true" 
73+     ES_VERIFY_CERTS : " false" 
7274
7375  #  Optional: pull connection credentials from a secret managed by the
7476  #  OpenSearch chart (or provide plain values via username/password).
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments