Skip to content

Commit

Permalink
👻 fix a name changing issue and a missing scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed May 16, 2019
1 parent 0e13ffa commit ade3794
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/scaffold/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func (p *V2Project) Scaffold() error {
&managerv2.Kustomization{},
&webhook.Kustomization{},
&webhook.KustomizeConfigWebhook{},
&webhook.Service{},
&webhook.InjectCAPatch{},
&certmanager.CertManager{},
&certmanager.Kustomization{},
Expand Down
2 changes: 1 addition & 1 deletion pkg/scaffold/v2/webhook/kustomization.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (c *Kustomization) GetInput() (input.Input, error) {
}

var KustomizeWebhookTemplate = `resources:
- webhookmanifests.yaml
- manifests.yaml
- service.yaml
configurations:
Expand Down
3 changes: 3 additions & 0 deletions pkg/scaffold/v2/webhook/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ spec:
ports:
- port: 443
targetPort: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
`
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
1 change: 1 addition & 0 deletions testdata/project-v2/config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v2/config/webhook/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resources:
- webhookmanifests.yaml
- manifests.yaml
- service.yaml

configurations:
Expand Down
13 changes: 13 additions & 0 deletions testdata/project-v2/config/webhook/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

apiVersion: v1
kind: Service
metadata:
name: webhook-service
namespace: system
spec:
ports:
- port: 443
targetPort: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"

0 comments on commit ade3794

Please sign in to comment.