/// <summary> /// Create a new <see cref="PersistentVolumeClaimV1"/> for the specified database server. /// </summary> /// <param name="server"> /// A <see cref="DatabaseServer"/> representing the target server. /// </param> /// <param name="kubeNamespace"> /// An optional target Kubernetes namespace. /// </param> /// <returns> /// The configured <see cref="PersistentVolumeClaimV1"/>. /// </returns> public PersistentVolumeClaimV1 DataVolumeClaim(DatabaseServer server, string kubeNamespace = null) { if (server == null) { throw new ArgumentNullException(nameof(server)); } return(DataVolumeClaim( name: Names.DataVolumeClaim(server), kubeNamespace: kubeNamespace, spec: Specs.DataVolumeClaim(server), labels: new Dictionary <string, string> { ["k8s-app"] = Names.BaseName(server), ["cloud.dimensiondata.daas.server-id"] = server.Id, ["cloud.dimensiondata.daas.volume-type"] = "data" } )); }