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

kustomize to move webhook & crd resources to global ns #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions spectro/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namePrefix: capv-

commonLabels:
cluster.x-k8s.io/provider: "infrastructure-vsphere"

bases:
- ../../config/default
325 changes: 325 additions & 0 deletions spectro/generated/core-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-leader-election-role
namespace: capv-system
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-manager-role
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
- clusters/status
verbs:
- get
- list
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- machines
- machines/status
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- haproxyloadbalancers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- haproxyloadbalancers/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- vsphereclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- vsphereclusters/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- vspheremachines
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- vspheremachines/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- vspherevms
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- vspherevms/status
verbs:
- get
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-proxy-role
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-leader-election-rolebinding
namespace: capv-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: capv-leader-election-role
subjects:
- kind: ServiceAccount
name: default
namespace: capv-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: capv-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: capv-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: capv-proxy-role
subjects:
- kind: ServiceAccount
name: default
namespace: capv-system
---
apiVersion: v1
kind: Secret
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
name: capv-manager-bootstrap-credentials
namespace: capv-system
stringData:
credentials.yaml: |-
username: ${VSPHERE_USERNAME}
password: ${VSPHERE_PASSWORD}
type: Opaque
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "8443"
prometheus.io/scheme: https
prometheus.io/scrape: "true"
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
control-plane: controller-manager
name: capv-controller-manager-metrics-service
namespace: capv-system
spec:
ports:
- name: https
port: 8443
targetPort: https
selector:
cluster.x-k8s.io/provider: infrastructure-vsphere
control-plane: controller-manager
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
control-plane: controller-manager
name: capv-controller-manager
namespace: capv-system
spec:
replicas: 1
selector:
matchLabels:
cluster.x-k8s.io/provider: infrastructure-vsphere
control-plane: controller-manager
template:
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-vsphere
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
- args:
- --metrics-addr=127.0.0.1:8080
image: gcr.io/cluster-api-provider-vsphere/release/manager:latest
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /healthz
port: healthz
name: manager
ports:
- containerPort: 9440
name: healthz
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: healthz
volumeMounts:
- mountPath: /etc/capv
name: manager-bootstrap-credentials
readOnly: true
terminationGracePeriodSeconds: 10
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
volumes:
- name: manager-bootstrap-credentials
secret:
secretName: capv-manager-bootstrap-credentials
Loading