V1Secret CreateSecret(ImagePullSecret imagePullSecret, IDictionary <string, string> labels) => new V1Secret { Data = new Dictionary <string, byte[]> { [KubernetesConstants.K8sPullSecretData] = Encoding.UTF8.GetBytes(imagePullSecret.GenerateSecret()) }, Type = KubernetesConstants.K8sPullSecretType, Metadata = new V1ObjectMeta { Name = imagePullSecret.Name, NamespaceProperty = this.deviceNamespace, OwnerReferences = this.moduleOwner.ToOwnerReferences(), Labels = labels } };