Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pipelines/e2e-with-billing-all-regions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ stages:
- germanywestcentral
- northeurope
- norwayeast
- norwaywest
- switzerlandnorth
- switzerlandwest
- westeurope
Expand Down
2 changes: 1 addition & 1 deletion .sha256sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
d2e11a7924d0cbb70672fb0dd6b1a387ccaec8b97a6968adf5a1516d325374eb swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json
a83c955fd67f013344cbe72b6350256156bada8fbac9e72e2d21ecac4fef822c swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
87f91bafd1bbebd4e348bb754e197bd0bdf4c0b06debdb47c78e46eb8ddede5f swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ questions or comments.
vm type, vm image, disk size, three master nodes exist, and the number of worker nodes
match the desired worker replicas

* machineset: Ensures that a minimum of two worker replicas are met.

* monitoring: Ensures that the OpenShift monitoring configuration in the `openshift-monitoring` namespace is consistent and immutable.

* node: Force deletes pods when a node fails to drain for 1 hour. It should clear up any pods that refuse to be evicted on a drain due to violating a pod disruption budget.
Expand Down
6 changes: 6 additions & 0 deletions cmd/aro/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/Azure/ARO-RP/pkg/operator/controllers/dnsmasq"
"github.com/Azure/ARO-RP/pkg/operator/controllers/genevalogging"
"github.com/Azure/ARO-RP/pkg/operator/controllers/machine"
"github.com/Azure/ARO-RP/pkg/operator/controllers/machineset"
"github.com/Azure/ARO-RP/pkg/operator/controllers/monitoring"
"github.com/Azure/ARO-RP/pkg/operator/controllers/node"
"github.com/Azure/ARO-RP/pkg/operator/controllers/pullsecret"
Expand Down Expand Up @@ -169,6 +170,11 @@ func operator(ctx context.Context, log *logrus.Entry) error {
arocli, maocli, isLocalDevelopmentMode, role)).SetupWithManager(mgr); err != nil {
return fmt.Errorf("unable to create controller Machine: %v", err)
}
if err = (machineset.NewReconciler(
log.WithField("controller", controllers.MachineSetControllerName),
arocli, maocli)).SetupWithManager(mgr); err != nil {
return fmt.Errorf("unable to create controller MachineSet: %v", err)
}
}

if err = (checker.NewReconciler(
Expand Down
16 changes: 8 additions & 8 deletions deploy/databases-development.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"id": "[parameters('databaseName')]"
},
"options": {
"throughput": "500"
"throughput": 500
}
},
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'))]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01"
"apiVersion": "2021-01-15"
},
{
"properties": {
Expand All @@ -41,7 +41,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'), '/AsyncOperations')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('databaseName'))]"
]
Expand All @@ -62,7 +62,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'), '/Billing')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('databaseName'))]"
]
Expand All @@ -84,7 +84,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'), '/Monitors')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('databaseName'))]"
]
Expand Down Expand Up @@ -124,7 +124,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'), '/OpenShiftClusters')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('databaseName'))]"
]
Expand All @@ -146,7 +146,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'), '/Portal')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('databaseName'))]"
]
Expand All @@ -167,7 +167,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', parameters('databaseName'), '/Subscriptions')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('databaseName'))]"
]
Expand Down
14 changes: 12 additions & 2 deletions deploy/rp-development.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"fpServicePrincipalId": {
"type": "string"
},
"ipRules": {
"type": "array"
},
"rpServicePrincipalId": {
"type": "string"
}
Expand Down Expand Up @@ -123,15 +126,22 @@
"locationName": "[resourceGroup().location]"
}
],
"databaseAccountOfferType": "Standard"
"databaseAccountOfferType": "Standard",
"backupPolicy": {
"periodicModeProperties": {
"backupIntervalInMinutes": 240,
"backupRetentionIntervalInHours": 720
},
"type": "Periodic"
}
},
"name": "[parameters('databaseAccountName')]",
"type": "Microsoft.DocumentDB/databaseAccounts",
"location": "[resourceGroup().location]",
"tags": {
"defaultExperience": "Core (SQL)"
},
"apiVersion": "2019-08-01"
"apiVersion": "2021-01-15"
},
{
"name": "[guid(resourceGroup().id, parameters('rpServicePrincipalId'), 'RP / Reader')]",
Expand Down
6 changes: 3 additions & 3 deletions deploy/rp-production-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
"disableCosmosDBFirewall": {
"value": false
},
"extraCosmosDBIPs": {
"value": ""
},
"fpClientId": {
"value": ""
},
"fpServicePrincipalId": {
"value": ""
},
"ipRules": {
"value": ""
},
"keyvaultDNSSuffix": {
"value": ""
},
Expand Down
38 changes: 22 additions & 16 deletions deploy/rp-production.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@
"type": "bool",
"defaultValue": false
},
"extraCosmosDBIPs": {
"type": "string",
"defaultValue": ""
},
"fpClientId": {
"type": "string"
},
"fpServicePrincipalId": {
"type": "string"
},
"ipRules": {
"type": "array"
},
"keyvaultDNSSuffix": {
"type": "string"
},
Expand Down Expand Up @@ -736,18 +735,25 @@
}
],
"databaseAccountOfferType": "Standard",
"ipRangeFilter": "[if(parameters('disableCosmosDBFirewall'), '', concat('104.42.195.92,40.76.54.131,52.176.6.30,52.169.50.45,52.187.184.26', if(equals(parameters('extraCosmosDBIPs'), ''), '', ','), parameters('extraCosmosDBIPs')))]",
"ipRules": "[if(parameters('disableCosmosDBFirewall'), createArray(), concat(parameters('ipRules'),createArray(createObject('ipAddressOrRange', '104.42.195.92'),createObject('ipAddressOrRange','40.76.54.131'),createObject('ipAddressOrRange','52.176.6.30'),createObject('ipAddressOrRange','52.169.50.45'),createObject('ipAddressOrRange','52.187.184.26'))))]",
"isVirtualNetworkFilterEnabled": "[not(parameters('disableCosmosDBFirewall'))]",
"virtualNetworkRules": "[if(parameters('disableCosmosDBFirewall'), createArray(), createArray(createObject('id', resourceId('Microsoft.Network/virtualNetworks/subnets', 'rp-vnet', 'rp-subnet'))))]",
"disableKeyBasedMetadataWriteAccess": true
"disableKeyBasedMetadataWriteAccess": true,
"backupPolicy": {
"periodicModeProperties": {
"backupIntervalInMinutes": 240,
"backupRetentionIntervalInHours": 720
},
"type": "Periodic"
}
},
"name": "[parameters('databaseAccountName')]",
"type": "Microsoft.DocumentDB/databaseAccounts",
"location": "[resourceGroup().location]",
"tags": {
"defaultExperience": "Core (SQL)"
},
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', 'rp-vnet')]"
]
Expand All @@ -758,13 +764,13 @@
"id": "['ARO']"
},
"options": {
"throughput": "500"
"throughput": 500
}
},
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
]
Expand All @@ -786,7 +792,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO', '/AsyncOperations')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), 'ARO')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
Expand All @@ -808,7 +814,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO', '/Billing')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), 'ARO')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
Expand All @@ -831,7 +837,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO', '/Monitors')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), 'ARO')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
Expand Down Expand Up @@ -872,7 +878,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO', '/OpenShiftClusters')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), 'ARO')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
Expand All @@ -891,13 +897,13 @@
"defaultTtl": -1
},
"options": {
"throughput": "400"
"throughput": 400
}
},
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO', '/Portal')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), 'ARO')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
Expand All @@ -919,7 +925,7 @@
"name": "[concat(parameters('databaseAccountName'), '/', 'ARO', '/Subscriptions')]",
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
"location": "[resourceGroup().location]",
"apiVersion": "2019-08-01",
"apiVersion": "2021-01-15",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), 'ARO')]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName'))]"
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo
github.com/Azure/azure-sdk-for-go v48.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v54.3.0+incompatible h1:aJ/WT32eVP8YmWpuSHLgnFJWjZzUFmhR3wBxxszo4PE=
github.com/Azure/azure-sdk-for-go v54.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v55.3.0+incompatible h1:rLKCdFMMCAXt/QZ96skZJUArYS3UDo9Qm1ZWzoDtC9E=
github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
Expand Down
31 changes: 20 additions & 11 deletions pkg/api/admin/openshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,21 @@ type NetworkProfile struct {
APIServerPrivateEndpointIP string `json:"privateEndpointIp,omitempty"`
}

// EncryptionAtHost represents encryption at host state
type EncryptionAtHost string

// EncryptionAtHost constants
const (
EncryptionAtHostEnabled EncryptionAtHost = "Enabled"
EncryptionAtHostDisabled EncryptionAtHost = "Disabled"
)

// MasterProfile represents a master profile.
type MasterProfile struct {
VMSize VMSize `json:"vmSize,omitempty"`
SubnetID string `json:"subnetId,omitempty"`
EncryptionAtHost bool `json:"encryptionAtHost,omitempty"`
DiskEncryptionSetID string `json:"diskEncryptionSetId,omitempty"`
VMSize VMSize `json:"vmSize,omitempty"`
SubnetID string `json:"subnetId,omitempty"`
EncryptionAtHost EncryptionAtHost `json:"encryptionAtHost,omitempty"`
DiskEncryptionSetID string `json:"diskEncryptionSetId,omitempty"`
}

// VMSize represents a VM size.
Expand Down Expand Up @@ -146,13 +155,13 @@ const (

// WorkerProfile represents a worker profile.
type WorkerProfile struct {
Name string `json:"name,omitempty"`
VMSize VMSize `json:"vmSize,omitempty"`
DiskSizeGB int `json:"diskSizeGB,omitempty"`
SubnetID string `json:"subnetId,omitempty"`
Count int `json:"count,omitempty"`
EncryptionAtHost bool `json:"encryptionAtHost,omitempty"`
DiskEncryptionSetID string `json:"diskEncryptionSetId,omitempty"`
Name string `json:"name,omitempty"`
VMSize VMSize `json:"vmSize,omitempty"`
DiskSizeGB int `json:"diskSizeGB,omitempty"`
SubnetID string `json:"subnetId,omitempty"`
Count int `json:"count,omitempty"`
EncryptionAtHost EncryptionAtHost `json:"encryptionAtHost,omitempty"`
DiskEncryptionSetID string `json:"diskEncryptionSetId,omitempty"`
}

// APIServerProfile represents an API server profile.
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/admin/openshiftcluster_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *openShiftClusterConverter) ToExternal(oc *api.OpenShiftCluster) interfa
MasterProfile: MasterProfile{
VMSize: VMSize(oc.Properties.MasterProfile.VMSize),
SubnetID: oc.Properties.MasterProfile.SubnetID,
EncryptionAtHost: oc.Properties.MasterProfile.EncryptionAtHost,
EncryptionAtHost: EncryptionAtHost(oc.Properties.MasterProfile.EncryptionAtHost),
DiskEncryptionSetID: oc.Properties.MasterProfile.DiskEncryptionSetID,
},
APIServerProfile: APIServerProfile{
Expand All @@ -72,7 +72,7 @@ func (c *openShiftClusterConverter) ToExternal(oc *api.OpenShiftCluster) interfa
DiskSizeGB: p.DiskSizeGB,
SubnetID: p.SubnetID,
Count: p.Count,
EncryptionAtHost: p.EncryptionAtHost,
EncryptionAtHost: EncryptionAtHost(p.EncryptionAtHost),
DiskEncryptionSetID: p.DiskEncryptionSetID,
})
}
Expand Down Expand Up @@ -176,7 +176,7 @@ func (c *openShiftClusterConverter) ToInternal(_oc interface{}, out *api.OpenShi
out.Properties.NetworkProfile.APIServerPrivateEndpointIP = oc.Properties.NetworkProfile.APIServerPrivateEndpointIP
out.Properties.MasterProfile.VMSize = api.VMSize(oc.Properties.MasterProfile.VMSize)
out.Properties.MasterProfile.SubnetID = oc.Properties.MasterProfile.SubnetID
out.Properties.MasterProfile.EncryptionAtHost = oc.Properties.MasterProfile.EncryptionAtHost
out.Properties.MasterProfile.EncryptionAtHost = api.EncryptionAtHost(oc.Properties.MasterProfile.EncryptionAtHost)
out.Properties.MasterProfile.DiskEncryptionSetID = oc.Properties.MasterProfile.DiskEncryptionSetID
out.Properties.StorageSuffix = oc.Properties.StorageSuffix
out.Properties.WorkerProfiles = nil
Expand All @@ -188,7 +188,7 @@ func (c *openShiftClusterConverter) ToInternal(_oc interface{}, out *api.OpenShi
out.Properties.WorkerProfiles[i].DiskSizeGB = oc.Properties.WorkerProfiles[i].DiskSizeGB
out.Properties.WorkerProfiles[i].SubnetID = oc.Properties.WorkerProfiles[i].SubnetID
out.Properties.WorkerProfiles[i].Count = oc.Properties.WorkerProfiles[i].Count
out.Properties.WorkerProfiles[i].EncryptionAtHost = oc.Properties.WorkerProfiles[i].EncryptionAtHost
out.Properties.WorkerProfiles[i].EncryptionAtHost = api.EncryptionAtHost(oc.Properties.WorkerProfiles[i].EncryptionAtHost)
out.Properties.WorkerProfiles[i].DiskEncryptionSetID = oc.Properties.WorkerProfiles[i].DiskEncryptionSetID
}
}
Expand Down
Loading