-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also deploy workflow-gen with bicep template.
Current bicep template does not register or deploys the workflow-gen app. This fixes that. Signed-off-by: Tiago Alves Macambira <[email protected]>
- Loading branch information
Showing
2 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
@secure() | ||
param kubeConfig string | ||
param kubernetesNamespace string | ||
|
||
import '[email protected]' with { | ||
namespace: 'default' | ||
kubeConfig: kubeConfig | ||
} | ||
|
||
resource coreService_workflowGen 'core/Service@v1' = { | ||
metadata: { | ||
name: 'workflow-gen' | ||
labels: { | ||
app: 'workflow-gen' | ||
} | ||
namespace: kubernetesNamespace | ||
} | ||
spec: { | ||
selector: { | ||
app: 'workflow-gen' | ||
} | ||
ports: [ | ||
{ | ||
protocol: 'TCP' | ||
port: 9988 | ||
targetPort: 9988 | ||
} | ||
] | ||
type: 'ClusterIP' | ||
} | ||
} | ||
|
||
resource appsDeployment_workflowGenApp 'apps/Deployment@v1' = { | ||
metadata: { | ||
name: 'workflow-gen-app' | ||
labels: { | ||
app: 'workflow-gen' | ||
} | ||
namespace: kubernetesNamespace | ||
} | ||
spec: { | ||
replicas: 1 | ||
selector: { | ||
matchLabels: { | ||
app: 'workflow-gen' | ||
} | ||
} | ||
template: { | ||
metadata: { | ||
labels: { | ||
app: 'workflow-gen' | ||
} | ||
annotations: { | ||
'dapr.io/enabled': 'true' | ||
'dapr.io/app-id': 'workflow-gen' | ||
'dapr.io/log-as-json': 'true' | ||
'prometheus.io/scrape': 'true' | ||
'prometheus.io/port': '9988' | ||
} | ||
} | ||
spec: { | ||
containers: [ | ||
{ | ||
name: 'workflow-gen' | ||
image: 'daprtests.azurecr.io/workflow-gen:dev' | ||
ports: [ | ||
// This app does NOT expose an HTTP application port (so no 80 or 3000 port mapping here) | ||
// This app exposes a Prometheus metrics endpoint on port 9988 | ||
{ | ||
name: 'prom' | ||
containerPort: 9988 | ||
} | ||
] | ||
imagePullPolicy: 'Always' | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains 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