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

Edit VM instead of VMI when exposing service objects #698

Open
aburdenthehand opened this issue Jul 10, 2023 · 14 comments · May be fixed by #839
Open

Edit VM instead of VMI when exposing service objects #698

aburdenthehand opened this issue Jul 10, 2023 · 14 comments · May be fixed by #839
Assignees
Labels
good-first-issue Identifies an issue that has been specifically created or selected for first-time contributors. hacktoberfest Categorizes as a Hacktoberfest contribution

Comments

@aburdenthehand
Copy link
Member

The service objects doc currently specify users edit the VMI object, however it seems as though this should be done on the VM (and restart if running).

This was raised on this thread: https://kubernetes.slack.com/archives/C8ED7RKFE/p1688475040764709

If this is the case, we should update this doc:
https://github.com/kubevirt/user-guide/blame/main/docs/virtual_machines/service_objects.md

@aburdenthehand aburdenthehand added the good-first-issue Identifies an issue that has been specifically created or selected for first-time contributors. label Jul 10, 2023
@drssdinblck
Copy link

To be even more specific: It seems like one must specify the label on the VM and on the VMI object (inside the template section of the VM resource). When specifying the VM as follows, I was able to expose VM ports via NodePort service objects:

yaml
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  labels:
    kubevirt.io/os: linux
    vmName: "__VM_NAME__"
  name: "__VM_NAME__"
spec:
  running: true
  template:
    metadata:
      creationTimestamp: null
      labels:
        kubevirt.io/domain: "__VM_NAME__"
        vmName: "__VM_NAME__"
    spec:
      domain:
        cpu:
          cores: __VM_CORES__
          model: host-passthrough
        devices:
          disks:
            - disk:
                bus: virtio
              name: disk0
            - cdrom:
                bus: sata
                readonly: true
              name: cloudinitdisk
          # see https://github.com/kubevirt/user-guide/pull/262/files
          rng: {}
        machine:
          type: q35
        resources:
          requests:
            memory: "__VM_MEMORY__"
      volumes:
        - name: disk0
          persistentVolumeClaim:
            claimName: "__VM_NAME__"
        - cloudInitNoCloud:
            userData: |
              #cloud-config
              hostname: __VM_NAME__
              ssh_pwauth: True
              disable_root: false
              ssh_authorized_keys:
              - __VM_SSH_PUBLIC_KEY__
          name: cloudinitdisk

@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 12, 2023
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 11, 2023
@aburdenthehand aburdenthehand removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Nov 14, 2023
@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 12, 2024
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 13, 2024
@dhiller
Copy link
Contributor

dhiller commented Mar 19, 2024

/remove-lifecycle rotten

@kubevirt-bot kubevirt-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 19, 2024
@chuot803
Copy link

chuot803 commented May 4, 2024

Hi! I was wondering if this method of exposing the VM ports has been confirmed. If so, should this VM specification @drssdinblck commented be added to the doc?

@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 2, 2024
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 1, 2024
@kubevirt-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

@kubevirt-bot
Copy link
Contributor

@kubevirt-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@aburdenthehand aburdenthehand reopened this Oct 3, 2024
@aburdenthehand aburdenthehand added the hacktoberfest Categorizes as a Hacktoberfest contribution label Oct 3, 2024
@aburdenthehand
Copy link
Member Author

/remove-lifecycle rotten

@kubevirt-bot kubevirt-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 3, 2024
@anishbista60
Copy link

/assign

@anishbista60 anishbista60 linked a pull request Oct 9, 2024 that will close this issue
8 tasks
@anishbista60
Copy link

@aburdenthehand please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Identifies an issue that has been specifically created or selected for first-time contributors. hacktoberfest Categorizes as a Hacktoberfest contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants