Skip to content

Commit

Permalink
Develop/v3 (#27)
Browse files Browse the repository at this point in the history
Prepare release.
  • Loading branch information
mnlipp authored Jun 9, 2024
1 parent 659463b commit 65a5cfd
Show file tree
Hide file tree
Showing 39 changed files with 500 additions and 132 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install podman
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[![Java CI with Gradle](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml/badge.svg)](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml)
[![Java CI with Gradle](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml/badge.svg)](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2277842dac894de4b663c6aa2779077e)](https://app.codacy.com/gh/mnlipp/VM-Operator/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
![Latest Manager](https://img.shields.io/github/v/tag/mnlipp/vm-operator?filter=manager*&label=latest)
![Latest Runner](https://img.shields.io/github/v/tag/mnlipp/vm-operator?filter=runner-qemu*&label=latest)

# Run Qemu in Kubernetes Pods

The goal of this project is to provide the means for running Qemu
based VMs in Kubernetes pods.
based VMs in Kubernetes pods.

See the [project's home page](https://mnlipp.github.io/VM-Operator/)
for details.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
*/

plugins {
// Apply the common versioning conventions.
// Put this at the start, because accessing project.version before
// this is applied makes things fail.
id 'org.jdrupes.vmoperator.versioning-conventions'

// Apply the java Plugin to add support for Java.
id 'java'

Expand All @@ -13,9 +18,6 @@ plugins {

// Access to git information
id 'org.ajoberstar.grgit'

// Apply the common versioning conventions.
id 'org.jdrupes.vmoperator.versioning-conventions'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ scmVersion {
}
var p = shortened.replace('.', '-') + "-"
if (grgit.branch.current.name != "main"
&& !grgit.branch.current.name.startsWith("release")) {
&& grgit.branch.current.name != "HEAD"
&& !grgit.branch.current.name.startsWith("release")
&& !grgit.branch.current.name.startsWith("develop")) {
p = p + grgit.branch.current.name.replace('/', '-') + "-"
}
prefix = p
}
}
version = scmVersion.version
project.version = scmVersion.version
ext.isSnapshot = version.endsWith('-SNAPSHOT')
7 changes: 6 additions & 1 deletion deploy/crds/vms-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,12 @@ spec:
type: array
items:
type: string
enum: ["start", "stop", "accessConsole", "*"]
enum:
- start
- stop
- reset
- accessConsole
- "*"
default: []
vm:
type: object
Expand Down
8 changes: 4 additions & 4 deletions dev-example/Readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Example setup for development

The CRD must be deployed independently. Apart from that, the
The CRD must be deployed independently. Apart from that, the
`kustomize.yaml`

* creates a small cdrom image repository and

* deploys the operator in namespace `vmop-dev` with a replica of 0.

This allows you to run the manager in your IDE.

The `kustomize.yaml` also changes the container image repository for
the operator to a private repository for development. You have to
the operator to a private repository for development. You have to
adapt this to your own repository if you also want to test your
development version in a container.

Expand Down
8 changes: 4 additions & 4 deletions example/local-path/Readme.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Example setup

The CRD must be deployed independently.
The CRD must be deployed independently.

```sh
kubectl apply -f https://github.com/mnlipp/VM-Operator/raw/main/deploy/crds/vms-crd.yaml
```

Apart from that, the `kustomize.yaml` defines a namespace for the manager
Apart from that, the `kustomize.yaml` defines a namespace for the manager
(and the VMs managed by it) and patches the repository PVC to create
a small volume using local-path.

A second patch provides a new configuration file for the manager
that makes it use the local-path storage class when creating the
A second patch provides a new configuration file for the manager
that makes it use the local-path storage class when creating the
small volume for a runner's data.

The `kustomize.yaml` does not include the test VM. Before creating
Expand Down
4 changes: 2 additions & 2 deletions example/rook-ceph/Readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Example setup

The CRD must be deployed independently.
The CRD must be deployed independently.

```sh
kubectl apply -f https://github.com/mnlipp/VM-Operator/raw/main/deploy/crds/vms-crd.yaml
```

Apart from that, the `kustomize.yaml` defines a namespace for the manager
Apart from that, the `kustomize.yaml` defines a namespace for the manager
(and the VMs managed by it) and applies patches to use `rook-cephfs` as
storage class (instead of the default storage class).

Expand Down
62 changes: 27 additions & 35 deletions misc/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
body {
background-color:#ffffff;
color:#353833;
font: normal 16px/1.5 "DejaVu Serif", serif;
font: normal 16px/1.5 "DejaVu Sans", Arial, Helvetica, sans-serif;
margin:0;
padding:0;
height:100%;
Expand All @@ -71,37 +71,33 @@ a[name] {
color:#353833;
}
pre {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
}
h1 {
font-family: "DejaVu Sans", sans;
font-size:20px;
}
h2 {
font-family: "DejaVu Sans", sans;
font-size:18px;
}
h3 {
font-family: "DejaVu Sans", sans;
font-size:16px;
font-size:17px;
}
h4 {
font-family: "DejaVu Sans", sans;
font-size:15px;
font-size:16px;
margin-top: 1rem;
margin-bottom: 1rem;
}
h5 {
font-family: "DejaVu Sans", sans;
font-size:14px;
}
h6 {
font-family: "DejaVu Sans", sans;
font-size:13px;
}
ul {
list-style-type:disc;
}
code, tt {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
}
:not(h1, h2, h3, h4, h5, h6) > code,
:not(h1, h2, h3, h4, h5, h6) > tt {
Expand All @@ -111,20 +107,22 @@ code, tt {
line-height:1.4em;
}
dt code {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
padding-top:4px;
}
.summary-table dt code {
font-family: "DejaVu Sans Mono", monospace;
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
vertical-align:top;
padding-top:4px;
}
sup {
font-size:8px;
}

button {
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
}
/*
* Styles for HTML generated by javadoc.
*
Expand Down Expand Up @@ -185,15 +183,13 @@ sup {
min-height:2.8em;
padding-top:10px;
overflow:hidden;
font-family: "DejaVu Sans", sans;
font-size:80%;
}
.sub-nav {
background-color:#dee3e9;
float:left;
width:100%;
overflow:hidden;
font-family: "DejaVu Sans", sans;
font-size:80%;
}
.sub-nav div {
Expand Down Expand Up @@ -311,13 +307,16 @@ main {
position:relative;
}
dl.notes > dt {
font-family: "DejaVu Sans", sans;
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
/* font-size:12px; */
font-weight:bold;
margin:10px 0 0 0;
color:#4E4E4E;
}
dl.notes > dd {
margin:5px 10px 10px 0;
margin:5px 10px 0 0;
/* font-size:14px; */
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
}
dl.name-value > dt {
margin-left:1px;
Expand Down Expand Up @@ -389,6 +388,11 @@ ul.see-list-long li:not(:last-child):after {
border-bottom:1px solid #EEE;
padding:0;
}

.summary-table .col-first {
font-family: "DejaVu Sans Mono", monospace;
}

.caption {
position:relative;
text-align:left;
Expand All @@ -402,7 +406,6 @@ ul.see-list-long li:not(:last-child):after {
padding-left:1px;
margin:0;
white-space:pre;
font-family: 'DejaVu Sans';
}
.caption a:link, .caption a:visited {
color:#1f389c;
Expand Down Expand Up @@ -450,9 +453,6 @@ div.table-tabs > button.table-tab {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto);
}
#method-summary-table .three-column-summary {
grid-template-columns: minmax(10%, 20%) minmax(15%, max-content) minmax(15%, auto);
}
.four-column-summary {
display: grid;
grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto);
Expand Down Expand Up @@ -490,7 +490,6 @@ div.table-tabs > button.table-tab {
}
.table-header {
background:#dee3e9;
font-family: 'DejaVu Sans';
font-weight: bold;
}
/*
Expand All @@ -508,7 +507,6 @@ div.table-tabs > button.table-tab {
.col-last {
white-space:normal;
}
/*
.col-first a:link, .col-first a:visited,
.col-second a:link, .col-second a:visited,
.col-first a:link, .col-first a:visited,
Expand All @@ -520,7 +518,6 @@ div.table-tabs > button.table-tab {
.all-packages-container a:link, .all-packages-container a:visited {
font-weight:bold;
}
*/
.table-sub-heading-color {
background-color:#EEEEFF;
}
Expand All @@ -537,12 +534,9 @@ div.table-tabs > button.table-tab {
margin:0;
padding:10px 0;
}
/*
div.block {
font-size:14px;
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
}
*/
.col-last div {
padding-top:0;
}
Expand All @@ -553,8 +547,7 @@ div.block {
.package-signature,
.type-signature,
.member-signature {
font-family: "DejaVu Sans Mono", monospace;
/* font-size:14px; */
font-family:'DejaVu Sans Mono', monospace;
margin:14px 0;
white-space: pre-wrap;
}
Expand Down Expand Up @@ -593,13 +586,8 @@ h1.hidden {
.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link,
.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type,
.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label {
font-family: "DejaVu Sans", sans;
font-weight:bold;
}
.sub-title, .inheritance, .all-packages-table-tab1.col-first,
.summary-table .col-first {
font-family: "DejaVu Sans", sans;
}
.deprecation-comment, .help-footnote, .preview-comment {
font-style:italic;
}
Expand Down Expand Up @@ -658,6 +646,7 @@ main, nav, header, footer, section {
ul.ui-autocomplete {
position:fixed;
z-index:999999;
background-color: #FFFFFF;
}
ul.ui-autocomplete li {
float:left;
Expand All @@ -667,6 +656,9 @@ ul.ui-autocomplete li {
.result-highlight {
font-weight:bold;
}
.ui-autocomplete .result-item {
font-size: inherit;
}
#search-input {
background-image:url('resources/glass.png');
background-size:13px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public class VmDefinitionModel extends K8sDynamicModel {
* Permissions for accessing and manipulating the VM.
*/
public enum Permission {
START("start"), STOP("stop"), ACCESS_CONSOLE("accessConsole");
START("start"), STOP("stop"), RESET("reset"),
ACCESS_CONSOLE("accessConsole");

@SuppressWarnings("PMD.UseConcurrentHashMap")
private static Map<String, Permission> reprs = new HashMap<>();
Expand Down
Loading

0 comments on commit 65a5cfd

Please sign in to comment.