File tree Expand file tree Collapse file tree 5 files changed +38
-5
lines changed Expand file tree Collapse file tree 5 files changed +38
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type: application
1515#  This is the chart version. This version number should be incremented each time you make changes
1616#  to the chart and its templates, including the app version.
1717#  Versions are expected to follow Semantic Versioning (https://semver.org/)
18- version : 0.2.0  
18+ version : 0.2.1  
1919
2020#  This is the version number of the application being deployed. This version number should be
2121#  incremented each time you make changes to the application. Versions are not expected to
Original file line number Diff line number Diff line change @@ -122,3 +122,27 @@ Expand the name of the default pod spec config map.
122122{ {- end } 
123123{ {- join "  " $startupParameters   } 
124124{ {- end } 
125+ 
126+ { {/*
127+ The name of the secret containing the endpoint URL. 
128+ By default , this is the secret created by the chart. 
129+ */}  }
130+ { {- define " controller.endpoint.secretName" } 
131+ { {- if  ne  .Values.endpointSecret.name " " } 
132+ { {- .Values.endpointSecret.name } 
133+ { {- else  } 
134+ { {- include  " controller.fullname" } 
135+ { {- end } 
136+ { {- end } 
137+ 
138+ { {/*
139+ The key of the secret containing the endpoint URL. 
140+ By default , this is " endpoint"  
141+ */}  }
142+ { {- define " controller.endpoint.secretKey" } 
143+ { {- if  ne  .Values.endpointSecret.name " " } 
144+ { {- .Values.endpointSecret.key } 
145+ { {- else  } 
146+ { {- " endpoint" } 
147+ { {- end } 
148+ { {- end } 
Original file line number Diff line number Diff line change 3333            - name : SEMAPHORE_ENDPOINT 
3434              valueFrom :
3535                secretKeyRef :
36-                   name : {{ include "controller.fullname " . }} 
37-                   key : endpoint 
36+                   name : {{ include "controller.endpoint.secretName " . }} 
37+                   key : {{ include "controller. endpoint.secretKey" . }} 
3838            - name : SEMAPHORE_AGENT_IMAGE 
3939              value : " {{ .Values.agent.image }}:{{ .Values.agent.version }}" 
4040            - name : SEMAPHORE_AGENT_STARTUP_PARAMETERS 
Original file line number Diff line number Diff line change 1- {{- $endpoint := .Values.endpoint | required ".Values.endpoint is required." -}} 
1+ {{- if and (eq .Values.endpointSecret.name "") (eq .Values.endpoint "") }} 
2+   {{- fail "Either .Values.endpoint or .Values.endpointSecret.name must be set" }} 
3+ {{- end }} 
24
35apiVersion : v1 
46kind : Secret 
@@ -7,7 +9,9 @@ metadata:
79  labels :
810    {{- include "controller.labels" . | nindent 4 }} 
911stringData :
10-   endpoint : {{ $endpoint }} 
12+ {{- if ne .Values.endpoint "" }} 
13+   endpoint : {{ .Values.endpoint }} 
14+ {{- end }} 
1115{{- if and .Values.agent.defaultPodSpec.preJobHook.enabled .Values.agent.defaultPodSpec.preJobHook.customScript }} 
1216  pre-job-hook : | 
1317{{ .Values.agent.defaultPodSpec.preJobHook.customScript | b64dec | indent 4 }} 
Original file line number Diff line number Diff line change 44
55#  The Semaphore endpoint used by the controller to look into the job queue.
66#  This is the only required value for this chart.
7+ #  It can be specified as a raw value with .Values.endpoint,
8+ #  or as a secret with .Values.endpointSecret.name and .Values.endpointSecret.key
79endpoint : " " 
10+ endpointSecret :
11+   name : " " 
12+   key : " endpoint" 
813
914image : semaphoreci/controller 
1015imageTag : " " 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments