File tree Expand file tree Collapse file tree 3 files changed +67
-0
lines changed
cloud-config-demo/src/main/java/io/dapr/springboot/examples/cloudconfig Expand file tree Collapse file tree 3 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ package io .dapr .springboot .examples .cloudconfig ;
2+
3+ import io .dapr .springboot .examples .cloudconfig .config .SingleConfig ;
4+ import org .springframework .web .bind .annotation .GetMapping ;
5+ import org .springframework .web .bind .annotation .RestController ;
6+
7+ @ RestController
8+ public class DemoController {
9+
10+ private final SingleConfig singleConfig ;
11+
12+ public DemoController (SingleConfig singleConfig ) {
13+ this .singleConfig = singleConfig ;
14+ }
15+
16+ @ GetMapping ("/config" )
17+ public String getConfig () {
18+ return singleConfig .getSingleValueSecret ();
19+ }
20+
21+ }
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ labels :
5+ app : cloud-config-demo
6+ name : cloud-config-demo
7+ spec :
8+ type : NodePort
9+ ports :
10+ - name : " cloud-config-demo"
11+ port : 8080
12+ targetPort : 8080
13+ nodePort : 31002
14+ selector :
15+ app : cloud-config-demo
16+
17+ ---
18+
19+ apiVersion : apps/v1
20+ kind : Deployment
21+ metadata :
22+ labels :
23+ app : cloud-config-demo
24+ name : cloud-config-demo
25+ spec :
26+ replicas : 1
27+ selector :
28+ matchLabels :
29+ app : cloud-config-demo
30+ template :
31+ metadata :
32+ annotations :
33+ dapr.io/app-id : cloud-config-demo
34+ dapr.io/app-port : " 8080"
35+ dapr.io/enabled : " true"
36+ labels :
37+ app : cloud-config-demo
38+ spec :
39+ containers :
40+ - image : localhost:5001/sb-cloud-config-demo
41+ name : cloud-config-demo
42+ imagePullPolicy : Always
43+ ports :
44+ - containerPort : 8080
45+ name : cloud-config
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ metadata:
55spec :
66 type : secretstores.kubernetes
77 version : v1
8+ metadata : []
You can’t perform that action at this time.
0 commit comments