List the available network:
virsh net-list
Name State Autostart Persistent
--------------------------------------------
default active yes yes| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: nginx-data | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: | |
| storage: 5Gi |
# pull the key from the remote key server
$ gpg [--keyserver keyserver.ubuntu.com] --recv-keys <remote_key_id>
# sign the key
$ gpg --sign-key <key_id>
# if there are multiple local keys, use a different local secret key for signing
$ gpg --local-user <local_key_id> --sign-key <remote_key_id>
| apiVersion: image.openshift.io/v1 | |
| kind: ImageStream | |
| metadata: | |
| annotations: | |
| kubectl.kubernetes.io/last-applied-configuration: | | |
| {"apiVersion":"image.openshift.io/v1","kind":"ImageStream","metadata":{"annotations":{},"labels":{"app":"battle-demo","app.kubernetes.io/component":"battle-demo","app.kubernetes.io/instance":"battle-demo"},"name":"battle-demo","namespace":"isim-dev"},"spec":{"lookupPolicy":{"local":false},"tags":[{"annotations":{"openshift.io/imported-from":"quay.io/battlecloud/demo:latest"},"from":{"kind":"DockerImage","name":"quay.io/battlecloud/demo:latest"},"generation":2,"importPolicy":{"importMode":"Legacy"},"name":"latest","referencePolicy":{"type":"Source"}}]}} | |
| openshift.io/image.dockerRepositoryCheck: "2023-10-04T15:55:41Z" | |
| creationTimestamp: "2023-10-04T15:55:39Z" | |
| generation: 2 | |
| labels: |
| apiVersion: oadp.openshift.io/v1alpha1 | |
| kind: DataProtectionApplication | |
| metadata: | |
| name: oadp-velero | |
| namespace: velero-ppdm | |
| spec: | |
| backupImages: false | |
| configuration: | |
| restic: | |
| enable: false |
| apiVersion: v1 | |
| kind: Pod | |
| metadata | |
| name: curl | |
| spec: | |
| containers: | |
| - name: curl | |
| image: curlimages/curl:7.87.0 | |
| command: ["sleep", "infinity"] |
| $ cargo run | |
| Compiling rust-ownership v0.1.0 (/home/isim/rust-ownership) | |
| error[E0382]: borrow of moved value: `svc` | |
| --> src/main.rs:24:28 | |
| | | |
| 12 | let svc = Service { | |
| | --- move occurs because `svc` has type `Service<'_>`, which does not implement the `Copy` trait | |
| ... | |
| 19 | let mut nginx = svc; | |
| | --- value moved here |
| use std::collections::HashMap; | |
| #[derive(Debug)] | |
| struct Service { | |
| name: String, | |
| namespace: String, | |
| endpoints: Vec<String>, | |
| mappings: HashMap<String, String>, | |
| } |
| $ go run main.go | |
| updated: {name:nginx namespace:ingress endpoints:[192.168.0.1 192.168.0.2 192.168.0.40] mappings:map[pod-0:192.168.0.1 pod-1:192.168.0.2 pod-2:192.168.0.40]} | |
| original: {name:nginx namespace:default endpoints:[192.168.0.1 192.168.0.2] mappings:map[pod-0:192.168.0.1 pod-1:192.168.0.2 pod-2:192.168.0.40]} |
| type Service struct { | |
| name string | |
| namespace string | |
| endpoints []string | |
| mappings map[string]string | |
| } | |
| func main() { | |
| svc := Service{ | |
| name: "nginx", |