Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Define OperatorsAuthentication model #950

Merged
merged 1 commit into from
Dec 10, 2024
Merged
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
39 changes: 39 additions & 0 deletions api/redhatopenshift/HcpCluster.Management/hcpCluster-models.tsp
Original file line number Diff line number Diff line change
@@ -323,6 +323,9 @@ model PlatformProfile {
* Is used the https://learn.microsoft.com/en-us/azure/storage/common/customer-managed-keys-overview
*/
etcdEncryptionSetId?: string;

/** The configuration that the operators of the cluster have to authenticate to Azure */
operatorsAuthentication: OperatorsAuthenticationProfile;
}

scalar SubnetResourceId
@@ -338,6 +341,7 @@ scalar NetworkSecurityGroupResourceId
type: "Microsoft.Network/networkSecurityGroups",
}
]>;

/** The outbound routing strategy used to provide your cluster egress to the internet. */
union OutboundType {
string,
@@ -346,6 +350,41 @@ union OutboundType {
loadBalancer: "loadBalancer",
}

/** The configuration that the operators of the cluster have to authenticate to Azure. */
model OperatorsAuthenticationProfile {
/** Represents the information related to Azure User-Assigned managed identities needed
* to perform Operators authentication based on Azure User-Assigned Managed Identities */
userAssignedIdentities: UserAssignedIdentitiesProfile;
}

/** Represents the information related to Azure User-Assigned managed identities needed
* to perform Operators authentication based on Azure User-Assigned Managed Identities */
model UserAssignedIdentitiesProfile {
/** The set of Azure User-Assigned Managed Identities leveraged for the Control Plane
* operators of the cluster. The set of required managed identities is dependent on the
* Cluster's OpenShift version. */
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "operator name to user assigned identity pairings"
controlPlaneOperators: Record<UserAssignedIdentityResourceId>;

/** The set of Azure User-Assigned Managed Identities leveraged for the Data Plane
* operators of the cluster. The set of required managed identities is dependent on the
* Cluster's OpenShift version. */
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "operator name to user assigned identity pairings"
dataPlaneOperators: Record<UserAssignedIdentityResourceId>;

/** Represents the information associated to an Azure User-Assigned Managed Identity whose
* purpose is to perform service level actions. */
@visibility("create", "read")
serviceManagedIdentity: UserAssignedIdentityResourceId;
}

scalar UserAssignedIdentityResourceId
extends Azure.Core.armResourceIdentifier<[
{
type: "Microsoft.ManagedIdentity/userAssignedIdentities",
}
]>;

/*
* =======================================
* End HCP cluster core resources
Original file line number Diff line number Diff line change
@@ -1914,6 +1914,19 @@
"platform"
]
},
"OperatorsAuthenticationProfile": {
"type": "object",
"description": "The configuration that the operators of the cluster have to authenticate to Azure.",
"properties": {
"userAssignedIdentities": {
"$ref": "#/definitions/UserAssignedIdentitiesProfile",
"description": "Represents the information related to Azure User-Assigned managed identities needed\nto perform Operators authentication based on Azure User-Assigned Managed Identities"
}
},
"required": [
"userAssignedIdentities"
]
},
"PlatformProfile": {
"type": "object",
"description": "Azure specific configuration",
@@ -1952,10 +1965,15 @@
"etcdEncryptionSetId": {
"type": "string",
"description": "The id of the disk encryption set to be used for etcd.\nConfigure this when `etcdEncryption` is set to true\nIs used the https://learn.microsoft.com/en-us/azure/storage/common/customer-managed-keys-overview"
},
"operatorsAuthentication": {
"$ref": "#/definitions/OperatorsAuthenticationProfile",
"description": "The configuration that the operators of the cluster have to authenticate to Azure"
}
},
"required": [
"subnetId"
"subnetId",
"operatorsAuthentication"
]
},
"ProvisioningState": {
@@ -2130,6 +2148,51 @@
"ca"
]
},
"UserAssignedIdentitiesProfile": {
"type": "object",
"description": "Represents the information related to Azure User-Assigned managed identities needed\nto perform Operators authentication based on Azure User-Assigned Managed Identities",
"properties": {
"controlPlaneOperators": {
"type": "object",
"description": "The set of Azure User-Assigned Managed Identities leveraged for the Control Plane\noperators of the cluster. The set of required managed identities is dependent on the\nCluster's OpenShift version.",
"additionalProperties": {
"$ref": "#/definitions/UserAssignedIdentityResourceId"
}
},
"dataPlaneOperators": {
"type": "object",
"description": "The set of Azure User-Assigned Managed Identities leveraged for the Data Plane\noperators of the cluster. The set of required managed identities is dependent on the\nCluster's OpenShift version.",
"additionalProperties": {
"$ref": "#/definitions/UserAssignedIdentityResourceId"
}
},
"serviceManagedIdentity": {
"$ref": "#/definitions/UserAssignedIdentityResourceId",
"description": "Represents the information associated to an Azure User-Assigned Managed Identity whose\npurpose is to perform service level actions.",
"x-ms-mutability": [
"read",
"create"
]
}
},
"required": [
"controlPlaneOperators",
"dataPlaneOperators",
"serviceManagedIdentity"
]
},
"UserAssignedIdentityResourceId": {
"type": "string",
"format": "arm-id",
"description": "A type definition that refers the id to an Azure Resource Manager resource.",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities"
}
]
}
},
"VersionProfile": {
"type": "object",
"description": "Versions represents an OpenShift version.",
26 changes: 26 additions & 0 deletions internal/api/v20240610preview/generated/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions internal/api/v20240610preview/generated/models_serde.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.