This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// default way: | |
"instancePoolId": "my-instance-pool-id-123" | |
// referencing key vault secret: | |
"instancePoolId": { | |
"type": "AzureKeyVaultSecret", | |
"store": { | |
"referenceName": "KeyVault_Service", <-- Existing linked service to key vault | |
"type": "LinkedServiceReference" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PostMapping("/HttpTriggerWithOutputs") | |
public InvokeResponse HttpTriggerWithOutputs(){ | |
InvokeResponse resp = new InvokeResponse(); | |
resp.ReturnValue = "return val data here"; | |
Map<String, Object> headers = new HashMap<String, Object>(); | |
headers.put("header1", "header1Val"); | |
headers.put("header2", "header2Val"); | |
Map<String, Object> httpRes = new HashMap<String,Object>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PostMapping("/process-items") | |
public InvokeResponse processItems(@RequestBody InvokeRequest req) { | |
System.out.println("JAVA: Received items and sending... elsewhere..."); | |
// we get a list of items, and do *something* | |
// ... then push them somewhere else... | |
InvokeResponse resp = new InvokeResponse(); | |
resp.Outputs.put("output1", req.Data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bindings": [ | |
{ | |
"name": "items", | |
"type": "queueTrigger", | |
"direction": "in", | |
"queueName": "items", | |
"connection": "storageQueue" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InvokeResponse { | |
public Map<String, Object> Outputs; | |
public ArrayList<String> Logs; | |
public Object ReturnValue; | |
public InvokeResponse(){ | |
Outputs = new HashMap<String,Object>(); | |
Logs = new ArrayList<String>(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// InvokeRequest object | |
public class InvokeRequest { | |
public Map<String, Object> Data; | |
public Map<String, Object> Metadata; | |
public InvokeRequest(){ | |
Data = new HashMap<String, Object>(); | |
Metadata = new HashMap<String, Object>(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: psc-webhook-service | |
namespace: psc-system | |
selfLink: /api/v1/namespaces/psc-system/services/psc-webhook-service | |
spec: | |
clusterIP: 10.98.155.51 | |
ports: | |
- port: 443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Endpoints | |
metadata: | |
name: psc-webhook-service | |
namespace: psc-system | |
subsets: | |
- addresses: | |
- ip: 18.185.254.87 #0.tcp.eu.ngrok.io | |
ports: | |
- port: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy-running-certs: | |
kubectl get secret webhook-server-cert -n psc-system -o json | sed 's/ca.crt/cacrt/; s/tls.crt/tlscrt/; s/tls.key/tlskey/' > secrets.json | |
mkdir -p ./.running-keys | |
jq -r .data.cacrt < secrets.json | base64 --decode > ./.running-keys/ca.crt | |
jq -r .data.tlscrt < secrets.json | base64 --decode > ./.running-keys/tls.crt | |
jq -r .data.tlskey < secrets.json | base64 --decode > ./.running-keys/tls.key | |
mkdir -p /tmp/k8s-webhook-server/serving-certs | |
cp ./.running-keys/* /tmp/k8s-webhook-server/serving-certs/ | |
rm secrets.json | |