Skip to content

Commit

Permalink
Add container app example with secret
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Türken <turkenf@gmail.com>
  • Loading branch information
turkenf committed Nov 18, 2024
1 parent be7fb20 commit 7ae502c
Show file tree
Hide file tree
Showing 2 changed files with 186 additions and 0 deletions.
93 changes: 93 additions & 0 deletions examples/containerapp/v1beta1/containerapp-with-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0

apiVersion: containerapp.azure.upbound.io/v1beta1
kind: ContainerApp
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta1/containerapp
labels:
testing.upbound.io/example-name: example
name: example-capp
spec:
forProvider:
containerAppEnvironmentIdSelector:
matchLabels:
testing.upbound.io/example-name: example
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
revisionMode: Single
template:
- container:
- cpu: 0.25
image: mcr.microsoft.com/azuredocs/containerapps-helloworld:latest
memory: 0.5Gi
name: examplecontainerapp
secret:
- nameSecretRef:
key: name
name: example-secret
namespace: upbound-system
valueSecretRef:
key: value
name: example-secret
namespace: upbound-system
---
apiVersion: v1
kind: Secret
metadata:
name: example-secret
namespace: upbound-system
type: Opaque
stringData:
value: dXBib3VuZHJvY2tz
name: upbtestone
---
apiVersion: containerapp.azure.upbound.io/v1beta1
kind: Environment
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta1/containerapp
labels:
testing.upbound.io/example-name: example
name: example-env
spec:
forProvider:
location: West Europe
logAnalyticsWorkspaceIdSelector:
matchLabels:
testing.upbound.io/example-name: example
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
---
apiVersion: operationalinsights.azure.upbound.io/v1beta1
kind: Workspace
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta1/containerapp
labels:
testing.upbound.io/example-name: example
name: example-wr
spec:
forProvider:
location: West Europe
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
retentionInDays: 30
sku: PerGB2018
---
apiVersion: azure.upbound.io/v1beta1
kind: ResourceGroup
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta1/containerapp
labels:
testing.upbound.io/example-name: example
name: example-rg-capp
spec:
forProvider:
location: West Europe
93 changes: 93 additions & 0 deletions examples/containerapp/v1beta2/containerapp-with-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: Apache-2.0

apiVersion: containerapp.azure.upbound.io/v1beta2
kind: ContainerApp
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta2/containerapp
labels:
testing.upbound.io/example-name: example
name: example-capp-v2
spec:
forProvider:
containerAppEnvironmentIdSelector:
matchLabels:
testing.upbound.io/example-name: example
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
revisionMode: Single
template:
container:
- cpu: 0.25
image: mcr.microsoft.com/azuredocs/containerapps-helloworld:latest
memory: 0.5Gi
name: examplecontainerapp
secret:
- nameSecretRef:
key: name
name: example-secret
namespace: upbound-system
valueSecretRef:
key: value
name: example-secret
namespace: upbound-system
---
apiVersion: v1
kind: Secret
metadata:
name: example-secret
namespace: upbound-system
type: Opaque
stringData:
value: dXBib3VuZHJvY2tz
name: upbtesttwo
---
apiVersion: containerapp.azure.upbound.io/v1beta1
kind: Environment
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta2/containerapp
labels:
testing.upbound.io/example-name: example
name: example-env-v2
spec:
forProvider:
location: West Europe
logAnalyticsWorkspaceIdSelector:
matchLabels:
testing.upbound.io/example-name: example
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
---
apiVersion: operationalinsights.azure.upbound.io/v1beta2
kind: Workspace
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta2/containerapp
labels:
testing.upbound.io/example-name: example
name: example-ws-v2
spec:
forProvider:
location: West Europe
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
retentionInDays: 30
sku: PerGB2018
---
apiVersion: azure.upbound.io/v1beta1
kind: ResourceGroup
metadata:
annotations:
meta.upbound.io/example-id: containerapp/v1beta1/containerapp
labels:
testing.upbound.io/example-name: example
name: example-rg-v2
spec:
forProvider:
location: West Europe

0 comments on commit 7ae502c

Please sign in to comment.