File tree 4 files changed +27
-4
lines changed
4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change
1
+ # Service definition for spire-oidc (expose the OIDC socket)
2
+ apiVersion : v1
3
+ kind : Service
4
+ metadata :
5
+ name : hpcs-server
6
+ namespace : hpcs
7
+ spec :
8
+ clusterIP : None
9
+ selector :
10
+ app : hpcs-server
11
+ ports :
12
+ - name : https
13
+ port : 10080
14
+ targetPort : hpcs-server
Original file line number Diff line number Diff line change 22
22
containers :
23
23
- name : hpcs-server
24
24
image : ghcr.io/cscfi/hpcs/server:k8s_plan
25
+ ports :
26
+ - containerPort : 10080
27
+ name : hpcs-server
25
28
command :
26
29
- sleep
27
30
args :
Original file line number Diff line number Diff line change 49
49
"hpcs-server-spiffeid"
50
50
)
51
51
52
+ if configuration ["spire-server" ].get ("socket-path" ):
53
+ spire_interactions .spire_server_socketpath = configuration ["spire-server" ].get (
54
+ "socket-path"
55
+ )
56
+
52
57
if configuration ["spire-server" ].get ("pre-command" ):
53
58
spire_interactions .pre_command = configuration ["spire-server" ]["pre-command" ]
54
59
if configuration ["spire-server" ]["pre-command" ] == '""' :
Original file line number Diff line number Diff line change 10
10
11
11
jwt_workload_api = None
12
12
hpcs_server_spiffeid = "spiffe://hpcs/hpcs-server/workload"
13
+ spire_server_socketpath = "/tmp/spire-server/private/api.sock:"
13
14
14
15
15
16
def token_generate (spiffeID : SpiffeId ) -> subprocess .CompletedProcess :
@@ -23,11 +24,11 @@ def token_generate(spiffeID: SpiffeId) -> subprocess.CompletedProcess:
23
24
"""
24
25
25
26
if pre_command != "" :
26
- command = f"{ pre_command } { spire_server_bin } token generate -spiffeID { str (spiffeID )} " .split (
27
+ command = f"{ pre_command } { spire_server_bin } token generate -socketPath { spire_server_socketpath } - spiffeID { str (spiffeID )} " .split (
27
28
" "
28
29
)
29
30
else :
30
- command = f"{ spire_server_bin } token generate -spiffeID { str (spiffeID )} " .split (
31
+ command = f"{ spire_server_bin } token generate -socketPath { spire_server_socketpath } - spiffeID { str (spiffeID )} " .split (
31
32
" "
32
33
)
33
34
@@ -48,11 +49,11 @@ def entry_create(
48
49
subprocess.CompletedProcess: result of the cli command to create the entry
49
50
"""
50
51
if pre_command != "" :
51
- command = f"{ pre_command } { spire_server_bin } entry create -parentID { str (parentID )} -spiffeID { str (spiffeID )} " .split (
52
+ command = f"{ pre_command } { spire_server_bin } entry create -socketPath { spire_server_socketpath } - parentID { str (parentID )} -spiffeID { str (spiffeID )} " .split (
52
53
" "
53
54
)
54
55
else :
55
- command = f"{ spire_server_bin } entry create -parentID { str (parentID )} -spiffeID { str (spiffeID )} " .split (
56
+ command = f"{ spire_server_bin } entry create -socketPath { spire_server_socketpath } - parentID { str (parentID )} -spiffeID { str (spiffeID )} " .split (
56
57
" "
57
58
)
58
59
You can’t perform that action at this time.
0 commit comments