Skip to content

Commit

Permalink
Adding v1 version for gmsacredentialspec CRDs
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Rossetti <[email protected]>
  • Loading branch information
marosset committed Aug 12, 2021
1 parent 85e30b7 commit 91609f2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
45 changes: 45 additions & 0 deletions admission-webhook/deploy/gmsa-crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,49 @@ spec:
group: windows.k8s.io
versions:
- name: v1alpha1
served: true
storage: false
deprecated: true
schema:
openAPIV3Schema:
type: object
properties:
credspec:
description: GMSA Credential Spec
type: object
properties:
ActiveDirectoryConfig:
type: object
properties:
GroupManagedServiceAccounts:
type: array
items:
type: object
properties:
Name:
type: string
Scope:
type: string
CmsPlugins:
type: array
items:
type: string
DomainJoinConfig:
type: object
properties:
DnsName:
type: string
DnsTreeName:
type: string
Guid:
type: string
MachineAccountName:
type: string
NetBiosName:
type: string
Sid:
type: string
- name: v1
served: true
storage: true
schema:
Expand Down Expand Up @@ -49,6 +92,8 @@ spec:
type: string
Sid:
type: string
conversion:
strategy: None
names:
kind: GMSACredentialSpec
plural: gmsacredentialspecs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# a sample cred spec

apiVersion: windows.k8s.io/v1alpha1
apiVersion: windows.k8s.io/v1
kind: GMSACredentialSpec
metadata:
name: {{ index .CredSpecNames 0 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# a sample cred spec

apiVersion: windows.k8s.io/v1alpha1
apiVersion: windows.k8s.io/v1
kind: GMSACredentialSpec
metadata:
name: {{ index .CredSpecNames 2 }}
Expand Down
2 changes: 1 addition & 1 deletion admission-webhook/kube_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
const (
// these 3 constants are the coordinates of the Custom Resource Definition
crdAPIGroup = "windows.k8s.io"
crdAPIVersion = "v1alpha1"
crdAPIVersion = "v1"
crdResourceName = "gmsacredentialspecs"

// crdContentsField is the single field that's expected to be defined in a GMSA CRD,
Expand Down
2 changes: 1 addition & 1 deletion scripts/GenerateCredentialSpecResource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Remove-Item $dockerCredSpecPath

# generate the k8s resource
$resource = [ordered]@{
"apiVersion" = "windows.k8s.io/v1alpha1";
"apiVersion" = "windows.k8s.io/v1";
"kind" = 'GMSACredentialSpec';
"metadata" = @{
"name" = $ResourceName
Expand Down

0 comments on commit 91609f2

Please sign in to comment.