Skip to content

Commit

Permalink
Drop operator-less installation and adjust generated manifests
Browse files Browse the repository at this point in the history
Synchronize the manifest templates with the operator codebase and drop
all references to the operator-less installation method.

Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr committed Apr 8, 2020
1 parent 5995d21 commit 19f14a6
Show file tree
Hide file tree
Showing 20 changed files with 75 additions and 1,174 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ vendor/**/*_test.go
**/polarion.xml
tools/manifest-templator/manifest-templator
tools/vms-generator/vms-generator
.coverprofile
.coverprofile*
coverage.html
manifests/**/*.tmp
/bazel-*
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ deploy:
file_glob: true
file:
- _out/cmd/virtctl/virtctl-v*
- _out/manifests/release/kubevirt.yaml
- _out/templates/manifests/release/kubevirt.yaml.j2
- _out/manifests/release/demo-content.yaml
- _out/manifests/release/kubevirt-operator.yaml
- _out/manifests/release/kubevirt-cr.yaml
Expand Down
12 changes: 0 additions & 12 deletions hack/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,9 @@ ${KUBEVIRT_DIR}/tools/openapispec/openapispec --dump-api-spec-path ${KUBEVIRT_DI
rm -f ${KUBEVIRT_DIR}/manifests/generated/*
rm -f ${KUBEVIRT_DIR}/examples/*
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=priorityclass >${KUBEVIRT_DIR}/manifests/generated/kubevirt-priority-class.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=vmi >${KUBEVIRT_DIR}/manifests/generated/vmi-resource.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=vmirs >${KUBEVIRT_DIR}/manifests/generated/vmirs-resource.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=vmipreset >${KUBEVIRT_DIR}/manifests/generated/vmipreset-resource.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=vm >${KUBEVIRT_DIR}/manifests/generated/vm-resource.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=vmim >${KUBEVIRT_DIR}/manifests/generated/vmim-resource.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=kv >${KUBEVIRT_DIR}/manifests/generated/kv-resource.yaml
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=kv-cr --namespace={{.Namespace}} --pullPolicy={{.ImagePullPolicy}} >${KUBEVIRT_DIR}/manifests/generated/kubevirt-cr.yaml.in
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=kubevirt-rbac --namespace={{.Namespace}} >${KUBEVIRT_DIR}/manifests/generated/rbac-kubevirt.authorization.k8s.yaml.in
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=cluster-rbac --namespace={{.Namespace}} >${KUBEVIRT_DIR}/manifests/generated/rbac-cluster.authorization.k8s.yaml.in
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=operator-rbac --namespace={{.Namespace}} >${KUBEVIRT_DIR}/manifests/generated/rbac-operator.authorization.k8s.yaml.in
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=prometheus --namespace={{.Namespace}} >${KUBEVIRT_DIR}/manifests/generated/prometheus.yaml.in

# used for Image fields in manifests
function getVersion() {
Expand Down Expand Up @@ -84,10 +76,6 @@ virtcontroller_rawsha=$(getRawShasum ".VirtControllerSha")
virthandler_rawsha=$(getRawShasum ".VirtHandlerSha")
virtlauncher_rawsha=$(getRawShasum ".VirtLauncherSha")

${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=virt-api --namespace={{.Namespace}} --repository={{.DockerPrefix}} --version="$virtapi_version" --pullPolicy={{.ImagePullPolicy}} --verbosity={{.Verbosity}} >${KUBEVIRT_DIR}/manifests/generated/virt-api.yaml.in
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=virt-controller --namespace={{.Namespace}} --repository={{.DockerPrefix}} --version="$virtcontroller_version" --launcherVersion="$virtlauncher_version" --pullPolicy={{.ImagePullPolicy}} --verbosity={{.Verbosity}} >${KUBEVIRT_DIR}/manifests/generated/virt-controller.yaml.in
${KUBEVIRT_DIR}/tools/resource-generator/resource-generator --type=virt-handler --namespace={{.Namespace}} --repository={{.DockerPrefix}} --version="$virthandler_version" --pullPolicy={{.ImagePullPolicy}} --verbosity={{.Verbosity}} >${KUBEVIRT_DIR}/manifests/generated/virt-handler.yaml.in

# The generation code for CSV requires a valid semver to be used.
# But we're trying to generate a template for a CSV here from code
# rather than an actual usable CSV. To work around this, we set the
Expand Down
1 change: 1 addition & 0 deletions manifests/generated/kubevirt-cr.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ metadata:
name: kubevirt
namespace: {{.Namespace}}
spec:
certificateRotateStrategy: {}
imagePullPolicy: {{.ImagePullPolicy}}
51 changes: 17 additions & 34 deletions manifests/generated/operator-csv.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- get
- update
- apiGroups:
- kubevirt.io
resources:
Expand Down Expand Up @@ -321,23 +329,6 @@ spec:
- list
- watch
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
- mutatingwebhookconfigurations
verbs:
- get
- create
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -397,16 +388,6 @@ spec:
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- delete
- update
- create
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -548,13 +529,6 @@ spec:
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- get
- apiGroups:
- subresources.kubevirt.io
resources:
Expand Down Expand Up @@ -726,13 +700,22 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 10
resources: {}
volumeMounts:
- mountPath: /etc/virt-operator/certificates
name: kubevirt-operator-certs
readOnly: true
priorityClassName: kubevirt-cluster-critical
securityContext:
runAsNonRoot: true
serviceAccountName: kubevirt-operator
tolerations:
- key: CriticalAddonsOnly
operator: Exists
volumes:
- name: kubevirt-operator-certs
secret:
optional: true
secretName: kubevirt-operator-certs
strategy: deployment
installModes:
- supported: true
Expand Down
18 changes: 0 additions & 18 deletions manifests/generated/prometheus.yaml.in

This file was deleted.

144 changes: 0 additions & 144 deletions manifests/generated/rbac-cluster.authorization.k8s.yaml.in

This file was deleted.

Loading

0 comments on commit 19f14a6

Please sign in to comment.