Browse Source

clientidentifier --> ClientId for threshold

master
forest 1 year ago
parent
commit
c127e34057
  1. 2
      ansible-roles/threshold-client-config-deprecated/files/test.sh
  2. 2
      ansible-roles/threshold-client-config-deprecated/templates/config.j2
  3. 2
      application-modules/servergarden-ingress/threshold/config.json
  4. 6
      automation/ingressController.go

2
ansible-roles/threshold-client-config-deprecated/files/test.sh

@ -9,7 +9,7 @@ curl --cacert "greenhouseusers.com_CA.crt" \
-sS -X PUT -H "Content-Type: application/json" -d '
[
{
"ClientIdentifier": "odroidxu4",
"ClientId": "odroidxu4",
"ListenPort": 80,
"ListenAddress": "0.0.0.0",
"ListenHostnameGlob": "*",

2
ansible-roles/threshold-client-config-deprecated/templates/config.j2

@ -1,6 +1,6 @@
{
"DebugLog": false,
"ClientIdentifier": "{{ clientId }}",
"ClientId": "{{ clientId }}",
"ServerAddr": "{{ domain }}:9056",
"UseTls": true,
"ServiceToLocalAddrMap": {

2
application-modules/servergarden-ingress/threshold/config.json

@ -1,7 +1,7 @@
{
"DebugLog": false,
"AdminUnixSocket": "/threshold/socket/threshold.sock",
"ClientIdentifier": "odroidxu4",
"ClientId": "odroidxu4",
"ServerAddr": "greenhouseusers.com:9056",
"UseTls": true,
"ServiceToLocalAddrMap": {

6
automation/ingressController.go

@ -23,7 +23,7 @@ type ListenerConfig struct {
ListenHostnameGlob string
ListenPort int
BackEndService string
ClientIdentifier string
ClientId string
}
type ThresholdLiveConfig struct {
@ -206,7 +206,7 @@ func IngressConfig(config *configuration.Configuration) error {
ListenHostnameGlob: x.PublicHostnameGlob,
ListenPort: x.PublicPort,
BackEndService: serviceName,
ClientIdentifier: config.Host.Name, // TODO failover stuff
ClientId: config.Host.Name, // TODO failover stuff
})
if _, has := publicProtocols[x.PublicProtocol]; !has {
@ -295,7 +295,7 @@ func IngressConfig(config *configuration.Configuration) error {
if err != nil {
return errors.Wrap(err, "failed to call caddy admin api")
}
if thresholdResponse.StatusCode != http.StatusOK {
if caddyResponse.StatusCode != http.StatusOK {
return fmt.Errorf("caddy admin api returned HTTP %d: %s", caddyResponse.StatusCode, string(caddyResponseBytes))
}

Loading…
Cancel
Save