Skip to content

Commit

Permalink
Merge pull request #76 from portefaix/feat/aso-v2
Browse files Browse the repository at this point in the history
Azure Service Operator v2 resources
  • Loading branch information
nlamirault committed Apr 17, 2023
2 parents 2a573f1 + 7cd7a19 commit 38424e4
Show file tree
Hide file tree
Showing 11 changed files with 286 additions and 6 deletions.
29 changes: 29 additions & 0 deletions krm/aso/infra/containerregistry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: containerregistry.azure.com/v1api20210901
kind: Registry
metadata:
name: portefaix-krm-charts
spec:
location: westcentralus
owner:
name: portefaix-krm-aso
publicNetworkAccess: Enabled
sku:
name: Basic
zoneRedundancy: Disabled
39 changes: 39 additions & 0 deletions krm/aso/infra/containerservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: containerservice.azure.com/v1api20230201
kind: ManagedCluster
metadata:
name: portefaix-krm-aso
spec:
location: westus3
owner:
name: portefaix-krm-aso
dnsPrefix: aso
agentPoolProfiles:
- name: core
count: 3
vmSize: Standard_DS2_v2
osType: Linux
mode: System
- name: ops
count: 2
vmSize: Standard_DS2_v2
osType: Linux
mode: System
identity:
type: SystemAssigned
69 changes: 69 additions & 0 deletions krm/aso/infra/eventhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: eventhub.azure.com/v1api20211101
kind: Namespace
metadata:
name: portefaix-krm-aso
spec:
location: westcentralus
owner:
name: portefaix-krm-aso
sku:
name: Standard
tier: Standard
---
apiVersion: eventhub.azure.com/v1api20211101
kind: NamespacesEventhub
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso
messageRetentionInDays: 7
partitionCount: 1
---
apiVersion: eventhub.azure.com/v1api20211101
kind: NamespacesAuthorizationRule
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso
rights:
- Listen
- Send
---
apiVersion: eventhub.azure.com/v1api20211101
kind: NamespacesEventhubsAuthorizationRule
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso
rights:
- Listen
- Send
---
apiVersion: eventhub.azure.com/v1api20211101
kind: NamespacesEventhubsConsumerGroup
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso
userMetadata: Portefaix
2 changes: 1 addition & 1 deletion krm/aso/infra/ip_address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: network.azure.com/v1beta20201101
apiVersion: network.azure.com/v1api20201101
kind: PublicIPAddress
metadata:
name: portefaix-krm-aso-gw
Expand Down
4 changes: 4 additions & 0 deletions krm/aso/infra/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ resources:
- ./subnets.yaml
- ./sg.yaml
- ./ip_address.yaml
- ./containerregistry.yaml
- ./containerservice.yaml
- ./eventhub.yaml
- ./servicebus.yaml
2 changes: 1 addition & 1 deletion krm/aso/infra/rg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: resources.azure.com/v1beta20200601
apiVersion: resources.azure.com/v1api20200601
kind: ResourceGroup
metadata:
name: portefaix-krm-aso
Expand Down
70 changes: 70 additions & 0 deletions krm/aso/infra/servicebus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: servicebus.azure.com/v1api20210101preview
kind: Namespace
metadata:
name: aso-namespace
spec:
location: westcentralus
owner:
name: portefaix-krm-aso # resource group
sku:
name: Standard
zoneRedundant: false
---
apiVersion: servicebus.azure.com/v1api20210101preview
kind: NamespacesQueue
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso # resource group
---
apiVersion: servicebus.azure.com/v1api20210101preview
kind: NamespacesTopic
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso # resource group
---
apiVersion: servicebus.azure.com/v1api20210101preview
kind: NamespacesTopicsSubscription
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso # topic
---
# apiVersion: servicebus.azure.com/v1api20210101preview
# kind: NamespacesTopicsSubscriptionsRule
# metadata:
# name: portefaix-krm-aso
# namespace: default
# spec:
# owner:
# name: portefaix-krm-aso # subscription
# action:
# sqlExpression: "SET myproperty=myvalue"
# requiresPreprocessing: false
# compatibilityLevel: 20
# correlationFilter:
# contentType: text
# filterType: SqlFilter
# sqlFilter:
# sqlExpression: "StoreId IN ('Store1','Store2','Store3')"
4 changes: 2 additions & 2 deletions krm/aso/infra/sg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: network.azure.com/v1beta20201101
apiVersion: network.azure.com/v1api20201101
kind: NetworkSecurityGroup
metadata:
name: portefaix-krm-aso
Expand All @@ -24,7 +24,7 @@ spec:
owner:
name: portefaix-krm-aso
---
apiVersion: network.azure.com/v1beta20201101
apiVersion: network.azure.com/v1api20201101
kind: NetworkSecurityGroupsSecurityRule
metadata:
name: portefaix-krm-aso-ssh
Expand Down
69 changes: 69 additions & 0 deletions krm/aso/infra/storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: storage.azure.com/v1api20210401
kind: StorageAccount
metadata:
name: portefaix-krm-aso
spec:
location: westcentralus
kind: BlobStorage
sku:
name: Standard_LRS
owner:
name: portefaix-krm-aso
accessTier: Hot
# supportsHttpsTrafficOnly: true
---
apiVersion: storage.azure.com/v1api20210401
kind: StorageAccountsBlobService
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso
---
apiVersion: storage.azure.com/v1api20210401
kind: StorageAccountsBlobServicesContainer
metadata:
name: portefaix-krm-aso-container
spec:
owner:
name: portefaix-krm-aso
---
apiVersion: storage.azure.com/v1api20210401
kind: StorageAccountsManagementPolicy
metadata:
name: portefaix-krm-aso
spec:
owner:
name: portefaix-krm-aso
policy:
rules:
- name: cleanup
definition:
actions:
version:
delete:
daysAfterCreationGreaterThan: 30
filters:
blobTypes:
- blockBlob
prefixMatch:
- portefaix-krm-aso-container/blob1
enabled: true
type: Lifecycle
2 changes: 1 addition & 1 deletion krm/aso/infra/subnets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: network.azure.com/v1beta20201101
apiVersion: network.azure.com/v1api20201101
kind: VirtualNetworksSubnet
metadata:
name: portefaix-krm-aso
Expand Down
2 changes: 1 addition & 1 deletion krm/aso/infra/vpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: network.azure.com/v1beta20201101
apiVersion: network.azure.com/v1api20201101
kind: VirtualNetwork
metadata:
name: portefaix-krm-aso
Expand Down

0 comments on commit 38424e4

Please sign in to comment.