Skip to content

Commit

Permalink
add k8s components
Browse files Browse the repository at this point in the history
  • Loading branch information
filintod committed Nov 12, 2024
1 parent 9e9cb5e commit 1307139
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 0 deletions.
14 changes: 14 additions & 0 deletions actors/resources-k8s/statestore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: redisPassword
value: ""
- name: actorStateStore
value: "true"
10 changes: 10 additions & 0 deletions pub_sub/components-k8s/observability.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: daprConfig
namespace: default
spec:
tracing:
samplingRate: "1"
zipkin:
endpointAddress: "http://localhost:9411/api/v2/spans"
14 changes: 14 additions & 0 deletions pub_sub/components-k8s/pubsub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: orderpubsub
spec:
type: pubsub.redis
version: v1
metadata:
- name: redisHost
value: dapr-dev-redis-master:6379
- name: redisPassword
secretKeyRef:
name: dapr-dev-redis
key: redis-password
27 changes: 27 additions & 0 deletions state_management/resources-k8s/resiliency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: dapr.io/v1alpha1
kind: Resiliency
metadata:
name: myresiliency
scopes:
- order-processor

spec:
policies:
retries:
retryForever:
policy: constant
duration: 5s
maxRetries: -1

circuitBreakers:
simpleCB:
maxRequests: 1
timeout: 5s
trip: consecutiveFailures >= 5

targets:
components:
statestore:
outbound:
retry: retryForever
circuitBreaker: simpleCB
16 changes: 16 additions & 0 deletions state_management/resources-k8s/statestore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: dapr-dev-redis-master:6379
- name: redisPassword
secretKeyRef:
name: dapr-dev-redis
key: redis-password
- name: actorStateStore
value: "true"
17 changes: 17 additions & 0 deletions workflows/components-k8s/state_redis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.redis
version: v1
initTimeout: 1m
metadata:
- name: redisHost
value: dapr-dev-redis-master:6379
- name: redisPassword
secretKeyRef:
name: dapr-dev-redis
key: redis-password
- name: actorStateStore
value: "true"

0 comments on commit 1307139

Please sign in to comment.