diff --git a/ATTRIBUTION-HELPER-DEPS b/ATTRIBUTION-HELPER-DEPS new file mode 100644 index 0000000..ecfc94b --- /dev/null +++ b/ATTRIBUTION-HELPER-DEPS @@ -0,0 +1,71 @@ +================== + +Dependencies: +----------------------- + +github.com/ + PuerkitoBio/purell v1.1.1 + PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 + beorn7/perks v1.0.1 + blang/semver/v4 v4.0.0 + cespare/xxhash/v2 v2.1.2 + container-storage-interface/spec v1.6.0 + davecgh/go-spew v1.1.1 + emicklei/go-restful/v3 v3.8.0 + go-logr/logr v1.2.3 + go-openapi/jsonpointer v0.19.5 + go-openapi/jsonreference v0.19.5 + go-openapi/swag v0.19.14 + gogo/protobuf v1.3.2 + golang/groupcache v0.0.0-20210331224755-41bb18bfe9da + golang/protobuf v1.5.2 + google/gnostic v0.5.7-v3refs + google/go-cmp v0.5.8 + google/gofuzz v1.1.0 + josharian/intern v1.0.0 + json-iterator/go v1.1.12 + kubernetes-csi/csi-lib-iscsi v0.0.0-20240129182017-28f091c08ef7 + kubernetes-csi/csi-lib-utils v0.11.0 + mailru/easyjson v0.7.6 + matttproud/golang_protobuf_extensions v1.0.1 + modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd + modern-go/reflect2 v1.0.2 + munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 + opencontainers/selinux v1.10.0 + prometheus/client_golang v1.12.1 + prometheus/client_model v0.2.0 + prometheus/common v0.32.1 + prometheus/procfs v0.7.3 + spf13/pflag v1.0.5 +golang.org/ + x/net v0.7.0 + x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + x/sys v0.5.0 + x/term v0.5.0 + x/text v0.7.0 + x/time v0.0.0-20220210224613-90d013bbcef8 +google.golang.org/ + genproto v0.0.0-20220502173005-c8bf987b8c21 + grpc v1.47.0 + protobuf v1.28.0 +gopkg.in/ + inf.v0 v0.9.1 + yaml.v2 v2.4.0 + yaml.v3 v3.0.1 +k8s.io/ + api v0.25.7 + apimachinery v0.25.9 + apiserver v0.25.7 + client-go v0.25.7 + cloud-provider v0.25.7 + component-base v0.25.7 + component-helpers v0.25.7 + klog/v2 v2.90.1 + kube-openapi v0.0.0-20220803162953-67bda5d908f1 + kubernetes v1.25.7 + mount-utils v0.25.9 + utils v0.0.0-20220728103510-ee6ede2d64ed +sigs.k8s.io/ + json v0.0.0-20220713155537-f223a00ba0e2 + structured-merge-diff/v4 v4.2.3 + yaml v1.2.0 diff --git a/INSTALLATION.md b/INSTALLATION.md index 20c4604..ea97c14 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -53,26 +53,26 @@ Ensure the following information and requirements can be met prior to installati Container Runtime will likely try to pull them. If your Container Runtime cannot access the images you will have to pull them manually before deployment. The required images are: - * node-driver-registar v2.0.0+. - * external-attacher v3.0.2+. - * external-provisioner v2.0.5+. - * external-resizer v1.1.0+. - * external-snapshotter v3.0.3+. + * node-driver-registar v2.9.0+. + * external-attacher v4.4.0+. + * external-provisioner v3.6.0+. + * external-resizer v1.9.0+. + * external-snapshotter v6.3.0+. + * livenessprobe v2.11.0 + * snapshot-controller v6.3.0 - The common container images for those images are: - - * k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.0 - * k8s.gcr.io/sig-storage/csi-attacher:v3.0.2 - * k8s.gcr.io/sig-storage/csi-provisioner:v2.0.5 - * k8s.gcr.io/sig-storage/csi-resizer:v1.1.0 - * k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3 + The current deployment uses the sidecar images built by Oracle and available + from the Oracle Container Registry (container-registry.oracle.com/olcne/). + Refer to the [current deployment for more information](deploy/helm/k8s-1.25/values.yaml). + + Sidecars are also available from [the Kubernetes team](https://kubernetes-csi.github.io/docs/sidecar-containers.html). * Plugin image You can pull the plugin image from a registry that you know hosts it or you can generate it and store it in one of your registries. In any case, as for the sidecar images, the Container Runtime must have access to that registry. If not you will have to pull it manually before deployment. If you choose to generate the plugin yourself use - version 1.13.8 or above of the Go compiler. + version 1.21.0 or above of the Go compiler. ## Setup @@ -150,18 +150,16 @@ Ensure that: ``` * All worker nodes are running the daemon `rpc.statd` -### Enabling Kubernetes Volume Snapshot Feature (Only for Kubernetes v1.17 - v1.19) +### Kubernetes Volume Snapshot Feature -The Kubernetes Volume Snapshot feature became GA in Kubernetes v1.20. In order to use -this feature in Kubernetes pre-v1.20, it MUST be enabled prior to deploying ZS CSI Driver. -To enable the feature on Kubernetes pre-v1.20, deploy API extensions, associated configurations, -and a snapshot controller by running the following command in deploy directory: +The Kubernetes Volume Snapshot feature became GA in Kubernetes v1.20. -```text -kubectl apply -R -f k8s-1.17/snapshot-controller -``` +When installing from the [example helm charts](./deploy/helm/k8s-1.25), the snapshot +controller, required RBAC roles and CRDs, will be deployed simultaneously with the +driver. If your Kubernetes deployment already contains a snapshot deployment, +modify the helm example deployment as needed. -This command will report creation of resources and configuratios as follows: +After deployment there are resources applied that relate to snapshots, such as: ```text customresourcedefinition.apiextensions.k8s.io/volumesnapshotclasses.snapshot.storage.k8s.io created @@ -175,9 +173,7 @@ rolebinding.rbac.authorization.k8s.io/snapshot-controller-leaderelection created statefulset.apps/snapshot-controller created ``` -The details of them can be viewed using kubectl get command. Note that the command -above deploys a snapshot-controler in the default namespace by default. The command -`kubectl get all` should present something similar to this: +The details of them can be viewed using kubectl get command: ```text NAME READY STATUS RESTARTS AGE @@ -244,6 +240,9 @@ the values to your own values. ``` For development only, other mechanisms can be used to create and share the secret with the container. + The driver uses a YAML parser for the parsing of this file. Because passwords should contain a variety + of 'special characters', enclose the password in double quotes + *Warning* Do not store your credentials in source code control (such as this project). For production environments use a secure secret store that encrypts at rest and can provide credentials through role based access controls (refer to Kubernetes documentation). Do not use root user in production environments, diff --git a/LICENSE.txt b/LICENSE.txt index bbf4015..913b6e9 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2021 Oracle. +Copyright (c) 2021, 2024 Oracle. The Universal Permissive License (UPL), Version 1.0 diff --git a/README.md b/README.md index 8667e32..e987ace 100644 --- a/README.md +++ b/README.md @@ -4,24 +4,26 @@ This plugin supports Oracle ZFS Storage Appliance as a backend for block storage (iSCSI volumes) and file storage (NFS). | CSI Plugin Version | Supported CSI Versions | Supported Kubernetes Versions | Persistence | Supported Access Modes | Dynamic Provisioning | Raw Block Support | -| --- | --- | --- | --- | --- | --- | --- | -| v1.0.0 | v1.0+ | v1.17.X+ | Persistent | Read/Write Once (for Block), ReadWriteMany (for File) | Yes | Yes | +|--------------------|------------------------|-------------------------------| --- | --- | --- | --- | +| v1.0.0 | v1.0+ | v1.17.X+ | Persistent | Read/Write Once (for Block), ReadWriteMany (for File) | Yes | Yes | +| v1.1.0 | v1.6.0 | v1.27.3+ | Persistent | Read/Write Once (for Block), ReadWriteMany (for File) | Yes | Yes | + ## Requirements -* Kubernetes v1.17 or above. -* A Container runtime implementing the Kubernetes Container Runtime Interface. This plugin was tested with CRI-O v1.17. +* Kubernetes v1.27 or above (version may work on prior Kubernetes versions) +* A Container runtime implementing the Kubernetes Container Runtime Interface. * An Oracle ZFS Storage Appliance running Appliance Kit Version 8.8 or above. This plugin may work with previous versions but it is not tested with them. It is possible to use this - driver with the [Oracle ZFS Storage Simulator](https://www.oracle.com/downloads/server-storage/sun-unified-storage-sun-simulator-downloads.html) + driver with the [Oracle ZFS Storage Marketplace Image on OCI](https://cloudmarketplace.oracle.com/marketplace/en_US/listing/122033460) * Access to both a management path and a data path for the target Oracle - ZFS Storage Appiance (or simulator). The management and data path -can be the same address. + ZFS Storage Appliance (or simulator). The management and data path + can be the same address. * A suitable container image build environment (podman or docker are accounted for in the makefile) ## Unsupported Functionality -ZFS Storage Appliance CSI driver does not support the following functionality: +Oracle ZFS Storage Constainer Storage Interface (CSI) driver does not support the following functionality: * Volume Cloning ## Building diff --git a/TEST.md b/TEST.md index f6df9a7..da7a234 100644 --- a/TEST.md +++ b/TEST.md @@ -109,7 +109,7 @@ Test the driver to Create a file system To run the unit tests, you must have compiled csi-sanity from the [csi-test project](https://github.com/kubernetes-csi/csi-test). Once compiled, scp the file to the node that is functioning as a controller -in a Kubernetes Cluster with the ZFSSA CSI Driver deployed and running. +in a Kubernetes Cluster with the Oracle ZFS Storage CSI Driver deployed and running. There is documentation on the test process available at the Kubernetes [testing of CSI drivers page](https://kubernetes.io/blog/2020/01/08/testing-of-csi-drivers/). @@ -122,11 +122,18 @@ Create a test parameters file that makes sense in your environment, like this: volumeType: thin targetGroup: csi-data-path-target blockSize: "8192" -pool: h1-pool1 -project: pmonday -targetPortal: "10.80.44.65:3260" -nfsServer: "10.80.44.65" +pool: +project: +targetPortal: ":3260" +nfsServer: "" ``` + +Replace the variables above +* - the name of the pool to use on the target Oracle ZFS Storage Appliance +* - the name of the project to use on the target Oracle ZFS Storage Appliance +* - the IP address of the iSCSI target portal on the Oracle ZFS Storage Appliance +* - the IP address of the NFS server on the Oracle ZFS Storage Appliance used to mount filesystems + Then run the tests ``` ./csi-sanity --csi.endpoint=/var/lib/kubelet/plugins/com.oracle.zfssabs/csi.sock -csi.testvolumeparameters=./test-volume-parameters.yaml @@ -137,3 +144,11 @@ on the Oracle ZFS Storage Appliance, it looks like this: ``` [Fail] Controller Service [Controller Server] CreateVolume [It] should not fail when creating volume with maximum-length name ``` + +A few additional notes on options for csi-sanity: + +* -csi.mountdir needs be a location on a node that is accessible by zfssa-csi-nodeplugin (but not created yet) +* --ginkgo.focus and --ginkgo.skip can be used to specify the test cases to be executed or skipped. Eg, --ginkgo.focus NodeUnpublish or --ginkgo.skip '[Ss]napshot'. +* --ginkgo.fail-fast: stop running after a failure occurs. +* --ginkgo.v: verbose output +* --ginkgo.seed 1: do not randomize the execution of test suite. diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 0deb23f..108f34a 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -1,1356 +1,1325 @@ +=== Public License Template === +------------------------------ Top-Level License ------------------------------- +SPDX:UPL-1.0 + +---------------------------------- Copyright ----------------------------------- +Copyright (c) 2021 Oracle and/or its affiliates. +Copyright (c) 2021, 2022, Oracle. +Copyright (c) 2021, 2023, Oracle and/or its affiliates. +Copyright (c) 2021, 2024 Oracle. +Copyright (c) 2021, 2024, Oracle and/or its affiliates. +Copyright (c) 2021, 2024, Oracle. +Copyright (c) 2021, Oracle and/or its affiliates. +Copyright (c) 2023, Oracle and/or its affiliates. + +-------------------------- Fourth Party Dependencies --------------------------- + +----------------------------------- Licenses ----------------------------------- +- Apache-2.0 +- BSD-3-Clause +- BSD-3-Clause--modified-by-Google +- ISC +- MIT +- UPL-1.0 + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/PuerkitoBio/purell + +== License Type +=== BSD-3-Clause-fb8b3949 +Copyright (c) 2012, Martin Angers +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +== Copyright +Copyright (c) 2012, Martin Angers + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/PuerkitoBio/urlesc + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/beorn7/perks + +== License Type +SPDX:MIT + +== Copyright +Copyright (C) 2013 Blake Mizerany + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/blang/semver/v4 + +== License Type +SPDX:MIT + +== Copyright +Copyright (c) 2014 Benedikt Lang + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/cespare/xxhash/v2 + +== License Type +SPDX:MIT + +== Copyright +Copyright (c) 2016 Caleb Spare + +--------------------------------- (separator) ---------------------------------- + +== Dependency github.com/container-storage-interface/spec -version: v1.2.0 -COPYRIGHT and LICENSE: Apache License 2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- -github.com/golang/groupcache -version: 5b532d6fd5ef -COPYRIGHT and LICENSE: Apache License 2.0 -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- -github.com/golang/protobuf -version: v1.4.0 -COPYRIGHT and LICENSE: BSD 3-Clause "New" or "Revised" License + +== License Type +SPDX:Apache-2.0 + +== Copyright +(no copyright notices found) + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/davecgh/go-spew + +== License Type +=== ISC-c06795ed +ISC License + +Copyright (c) 2012-2016 Dave Collins + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +== Copyright +Copyright (c) 2012-2016 Dave Collins +Copyright (c) 2013 Dave Collins +Copyright (c) 2013-2016 Dave Collins +Copyright (c) 2015-2016 Dave Collins + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/emicklei/go-restful/v3 + +== License Type +SPDX:MIT + +== Copyright +Copyright (c) 2012,2013 Ernest Micklei +Copyright 2013 Ernest Micklei. All rights reserved. +Copyright 2014 Ernest Micklei. All rights reserved. +Copyright 2015 Ernest Micklei. All rights reserved. +Copyright 2018 Ernest Micklei. All rights reserved. +Copyright 2021 Ernest Micklei. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/go-logr/logr + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2019 The logr Authors. +Copyright 2020 The logr Authors. +Copyright 2021 The logr Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/go-openapi/jsonpointer + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/go-openapi/jsonreference + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/go-openapi/swag + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2015 go-swagger maintainers + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/gogo/protobuf + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2013, The GoGo Authors. All rights reserved. +Copyright (c) 2015, The GoGo Authors. rights reserved. +Copyright (c) 2015, The GoGo Authors. All rights reserved. +Copyright (c) 2016, The GoGo Authors. All rights reserved. +Copyright (c) 2017, The GoGo Authors. All rights reserved. +Copyright (c) 2018, The GoGo Authors. All rights reserved. +Copyright (c) 2019, The GoGo Authors. All rights reserved. +Copyright 2010 The Go Authors. Copyright 2010 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2012 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2014 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2017 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +--------------------------------- (separator) ---------------------------------- - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +== Dependency +github.com/golang/groupcache -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +== License Type +SPDX:Apache-2.0 +== Copyright +Copyright 2012 Google Inc. +Copyright 2013 Google Inc. ---------------------------------------------------------------------------------- +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/golang/protobuf + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2014 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2017 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2020 The Go Authors. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/google/gnostic + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2017 Google LLC. All Rights Reserved. +Copyright 2017-2020, Google LLC. +Copyright 2018 Google LLC. All Rights Reserved. +Copyright 2019 Google LLC. All Rights Reserved. +Copyright 2020 Google LLC. All Rights Reserved. +Copyright 2020 Google LLC. All Rights Reserved.\n" + + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/google/go-cmp + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2017 The Go Authors. All rights reserved. +Copyright 2017, The Go Authors. All rights reserved. +Copyright 2018, The Go Authors. All rights reserved. +Copyright 2019, The Go Authors. All rights reserved. +Copyright 2020, The Go Authors. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/google/gofuzz + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2014 Google Inc. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/josharian/intern + +== License Type +SPDX:MIT + +== Copyright +Copyright (c) 2019 Josh Bleecher Snyder + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/json-iterator/go + +== License Type +SPDX:MIT + +== Copyright +Copyright (c) 2016 json-iterator + +--------------------------------- (separator) ---------------------------------- + +== Dependency github.com/kubernetes-csi/csi-lib-iscsi -version: c545557492f4 -COPYRIGHT and LICENSE: Apache License 2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +== License Type +SPDX:Apache-2.0 - 1. Definitions. +== Copyright +(no copyright notices found) - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +--------------------------------- (separator) ---------------------------------- - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- +== Dependency github.com/kubernetes-csi/csi-lib-utils -version: v0.6.1 -COPYRIGHT and LICENSE: Apache License 2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +== License Type +SPDX:Apache-2.0 - 1. Definitions. +== Copyright +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +--------------------------------- (separator) ---------------------------------- - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +== Dependency +github.com/mailru/easyjson - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +== License Type +SPDX:MIT - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright (c) 2016 Mail.Ru Group - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +--------------------------------- (separator) ---------------------------------- - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +== Dependency +github.com/matttproud/golang_protobuf_extensions - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +== License Type +SPDX:Apache-2.0 - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +== Copyright +Copyright 2012 Matt T. Proud (matt.proud@gmail.com) +Copyright 2013 Matt T. Proud +Copyright 2016 Matt T. Proud - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +== Notices +Copyright 2012 Matt T. Proud (matt.proud@gmail.com) - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +--------------------------------- (separator) ---------------------------------- - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +== Dependency +github.com/modern-go/concurrent - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +== License Type +SPDX:Apache-2.0 - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +== Copyright +(no copyright notices found) - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +--------------------------------- (separator) ---------------------------------- - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +== Dependency +github.com/modern-go/reflect2 - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +== License Type +SPDX:Apache-2.0 - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +== Copyright +(no copyright notices found) - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +--------------------------------- (separator) ---------------------------------- - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +== Dependency +github.com/munnerz/goautoneg - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +== License Type +=== BSD-3-Clause-0c241922 +Copyright (c) 2011, Open Knowledge Foundation Ltd. +All rights reserved. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. - END OF TERMS AND CONDITIONS + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. - APPENDIX: How to apply the Apache License to your work. + Neither the name of the Open Knowledge Foundation Ltd. nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - Copyright {yyyy} {name of copyright owner} - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 +== Copyright +Copyright (c) 2011, Open Knowledge Foundation Ltd. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +--------------------------------- (separator) ---------------------------------- ---------------------------------------------------------------------------------- -github.com/onsi/gomega -version: v1.9.0 -COPYRIGHT and LICENSE: MIT License -Copyright (c) 2013-2014 Onsi Fakhouri +== Dependency +github.com/opencontainers/selinux -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +== License Type +SPDX:Apache-2.0 -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +== Copyright +(no copyright notices found) -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +--------------------------------- (separator) ---------------------------------- ---------------------------------------------------------------------------------- +== Dependency github.com/prometheus/client_golang -version: v1.2.1 -COPYRIGHT and LICENSE: Apache License 2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +== License Type +SPDX:Apache-2.0 - 1. Definitions. +== Copyright +Copyright (c) 2013, The Prometheus Authors +Copyright 2010 The Go Authors +Copyright 2012-2015 The Prometheus Authors +Copyright 2013 Matt T. Proud +Copyright 2013-2015 Blake Mizerany, Björn Rabenstein +Copyright 2014 The Prometheus Authors +Copyright 2015 The Prometheus Authors +Copyright 2016 The Prometheus Authors +Copyright 2017 The Prometheus Authors +Copyright 2018 The Prometheus Authors +Copyright 2019 The Prometheus Authors +Copyright 2020 The Prometheus Authors +Copyright 2021 The Prometheus Authors +Copyright 2022 The Prometheus Authors - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +== Notices +Prometheus instrumentation library for Go applications +Copyright 2012-2015 The Prometheus Authors - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +The following components are included in this product: - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +perks - a fork of https://github.com/bmizerany/perks +https://github.com/beorn7/perks +Copyright 2013-2015 Blake Mizerany, Björn Rabenstein +See https://github.com/beorn7/perks/blob/master/README.md for license details. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +Go support for Protocol Buffers - Google's data interchange format +http://github.com/golang/protobuf/ +Copyright 2010 The Go Authors +See source code for license details. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +Support for streaming Protocol Buffer messages for the Go language (golang). +https://github.com/matttproud/golang_protobuf_extensions +Copyright 2013 Matt T. Proud +Licensed under the Apache License, Version 2.0 - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +--------------------------------- (separator) ---------------------------------- - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +== Dependency +github.com/prometheus/client_model - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +== License Type +SPDX:Apache-2.0 - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +== Copyright +Copyright 2012-2015 The Prometheus Authors +Copyright 2013 Prometheus Team - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +== Notices +Data model artifacts for Prometheus. +Copyright 2012-2015 The Prometheus Authors - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +--------------------------------- (separator) ---------------------------------- - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +== Dependency +github.com/prometheus/common - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +== License Type +SPDX:Apache-2.0 - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +== Copyright +Copyright (c) 2011, Open Knowledge Foundation Ltd. +Copyright 2013 The Prometheus Authors +Copyright 2014 The Prometheus Authors +Copyright 2015 The Prometheus Authors +Copyright 2016 The Prometheus Authors +Copyright 2017 The Prometheus Authors +Copyright 2018 The Prometheus Authors +Copyright 2019 The Prometheus Authors +Copyright 2020 The Prometheus Authors +Copyright 2021 The Prometheus Authors - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +== Notices +Common libraries shared by Prometheus Go components. +Copyright 2015 The Prometheus Authors - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +--------------------------------- (separator) ---------------------------------- - END OF TERMS AND CONDITIONS +== Dependency +github.com/prometheus/procfs - APPENDIX: How to apply the Apache License to your work. +== License Type +SPDX:Apache-2.0 - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +== Copyright +Copyright 2014 Prometheus Team +Copyright 2014-2015 The Prometheus Authors +Copyright 2017 Prometheus Team +Copyright 2017 The Prometheus Authors +Copyright 2018 The Prometheus Authors +Copyright 2019 The Prometheus Authors +Copyright 2020 The Prometheus Authors +Copyright 2021 The Prometheus Authors - Copyright [yyyy] [name of copyright owner] +== Notices +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Copyright 2014-2015 The Prometheus Authors - http://www.apache.org/licenses/LICENSE-2.0 +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---------------------------------------------------------------------------------- +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/spf13/pflag + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2012 The Go Authors. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency golang.org/x/net -version: 0deb6923b6d9 -COPYRIGHT and LICENSE: BSD-3-Clause + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2012 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2014 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2017 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2020 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. +Copyright 2022 The Go Authors. All rights reserved. +Copyright 2023 The Go Authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +== Patents +Additional IP Rights Grant (Patents) - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. ---------------------------------------------------------------------------------- + +--------------------------------- (separator) ---------------------------------- + +== Dependency +golang.org/x/oauth2 + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2014 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2015 The oauth2 Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2017 The Go Authors. All rights reserved. +Copyright 2017 The oauth2 Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2018 The oauth2 Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2020 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency golang.org/x/sys -version: d5e6a3e2c0ae -COPYRIGHT and LICENSE: BSD-3-Clause + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2009,2010 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2012 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2014 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2017 The Go Authors. All right reserved. +Copyright 2017 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2020 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. +Copyright 2022 The Go Authors. All rights reserved. +Copyright 2023 The Go Authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +== Patents +Additional IP Rights Grant (Patents) - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. ---------------------------------------------------------------------------------- + +--------------------------------- (separator) ---------------------------------- + +== Dependency +golang.org/x/term + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. + +== Patents +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +--------------------------------- (separator) ---------------------------------- + +== Dependency +golang.org/x/text + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2012 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2014 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2017 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. + +== Patents +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +--------------------------------- (separator) ---------------------------------- + +== Dependency +golang.org/x/time + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2015 The Go Authors. All rights reserved. + +== Patents +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. + + +--------------------------------- (separator) ---------------------------------- + +== Dependency +google.golang.org/genproto + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (c) 2015, Google Inc. +Copyright 2015 Google LLC +Copyright 2016 Google Inc. +Copyright 2016 Google LLC +Copyright 2017 Google Inc. +Copyright 2018 Google Inc. +Copyright 2018 Google LLC +Copyright 2018 The Grafeas Authors. All rights reserved. +Copyright 2019 Google LLC. +Copyright 2019 The Grafeas Authors. All rights reserved. +Copyright 2020 Google LLC +Copyright 2020 Google LLC. +Copyright 2021 Google LLC +Copyright 2021 Google LLC. +Copyright 2021 The Grafeas Authors. All rights reserved. +Copyright 2022 Google LLC + +--------------------------------- (separator) ---------------------------------- + +== Dependency google.golang.org/grpc -version: v1.23.1 -COPYRIGHT and LICENSE: Apache License 2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +== License Type +SPDX:Apache-2.0 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +== Copyright +Copyright 2014 gRPC authors. +Copyright 2015 The gRPC Authors +Copyright 2015 gRPC authors. +Copyright 2015-2016 gRPC authors. +Copyright 2016 The gRPC Authors +Copyright 2016 gRPC authors. +Copyright 2017 gRPC authors. +Copyright 2018 The gRPC Authors +Copyright 2018 gRPC authors. +Copyright 2019 gRPC authors. +Copyright 2020 The gRPC Authors +Copyright 2020 gRPC authors. +Copyright 2021 gRPC authors. +Copyright 2022 gRPC authors. - 1. Definitions. +== Notices +Copyright 2014 gRPC authors. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + http://www.apache.org/licenses/LICENSE-2.0 - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +--------------------------------- (separator) ---------------------------------- - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +== Dependency +google.golang.org/protobuf - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +== License Type +SPDX:BSD-3-Clause--modified-by-Google - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +== Copyright +Copyright (c) 2018 The Go Authors. All rights reserved. +Copyright 2008 Google Inc. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved.", +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved.", +Copyright 2020 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +== Patents +Additional IP Rights Grant (Patents) - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +--------------------------------- (separator) ---------------------------------- - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +== Dependency +gopkg.in/inf.v0 - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +== License Type +SPDX:BSD-3-Clause--modified-by-Google - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +== Copyright +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +--------------------------------- (separator) ---------------------------------- - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- +== Dependency gopkg.in/yaml.v2 -version: v2.2.8 -COPYRIGHT and LICENSE: Apache-2.0 + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (c) 2006 Kirill Simonov +Copyright 2011-2016 Canonical Ltd. + +== Notices +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +--------------------------------- (separator) ---------------------------------- + +== Dependency +gopkg.in/yaml.v3 + +== License Type +=== MIT-3c91c172 +=== Apache-2.0 + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + +== Copyright +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov +Copyright (c) 2011-2019 Canonical Ltd +Copyright 2011-2016 Canonical Ltd. + +== Notices +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/api + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/apimachinery + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/apiserver + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/client-go + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/cloud-provider + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/component-base + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/component-helpers + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/klog/v2 + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2013 Google Inc. All Rights Reserved. +Copyright 2014 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 Intel Coporation. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/kube-openapi + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (C) MongoDB, Inc. 2017-present. +Copyright 2015 go-swagger maintainers +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2017 go-swagger maintainers +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/kubernetes + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright (c) 2015-2016 Manfred Touron +Copyright (c) Microsoft Corporation. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 Microsoft Corporation +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/mount-utils + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +k8s.io/utils + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2013 Google Inc. +Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +sigs.k8s.io/json + +== License Type +=== BSD-3-Clause--modified-by-Google-545d3f23 +=== Apache-2.0 +Files other than internal/golang/* licensed under: + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -1553,1027 +1522,358 @@ COPYRIGHT and LICENSE: Apache-2.0 See the License for the specific language governing permissions and limitations under the License. ---------------------------------------------------------------------------------- -k8s.io/apimachinery -version: v0.17.11 -COPYRIGHT and LICENSE: Apache License 2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- -k8s.io/client-go -version: v0.18.2 -COPYRIGHT and LICENSE: Apache License 2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- -k8s.io/klog -version: v1.0.0 -COPYRIGHT and LICENSE: Apache License 2.0 + +------------------ + +internal/golang/* files licensed under: + + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +== Copyright +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. +Copyright 2011 The Go Authors. All rights reserved. +Copyright 2013 The Go Authors. All rights reserved. +Copyright 2016 The Go Authors. All rights reserved. +Copyright 2018 The Go Authors. All rights reserved. +Copyright 2019 The Go Authors. All rights reserved. +Copyright 2021 The Go Authors. All rights reserved. +Copyright 2021 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +sigs.k8s.io/structured-merge-diff/v4 + +== License Type +SPDX:Apache-2.0 + +== Copyright +Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. +Copyright 2020 The Kubernetes Authors. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +sigs.k8s.io/yaml + +== License Type +=== MIT-0ceb9ff3 +=== BSD-3-Clause--modified-by-Google +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +== Copyright +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2014 Sam Ghods +Copyright 2013 The Go Authors. All rights reserved. + +----------------------------------- Licenses ----------------------------------- + +--------------------------------- (separator) ---------------------------------- +== SPDX:Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. +1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. +"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. +"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such +entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. "Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. +translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that is +included in or attached to the work (an example is provided in the Appendix +below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. +original work of authorship. For the purposes of this License, Derivative +Works shall not include works that remain separable from, or merely link (or +bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the purposes +of this definition, "submitted" means any form of electronic, verbal, or +written communication sent to the Licensor or its representatives, including +but not limited to communication on electronic mailing lists, source code +control systems, and issue tracking systems that are managed by, or on behalf +of, the Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -3. Grant of Patent License. +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. +(a) You must give any other recipients of the Work or Derivative Works a copy +of this License; and -4. Redistribution. +(b) You must cause any modified files to carry prominent notices stating that +You changed the files; and -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: +(c) You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from the +Source form of the Work, excluding those notices that do not pertain to any +part of the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy of +the attribution notices contained within such NOTICE file, excluding those +notices that do not pertain to any part of the Derivative Works, in at least +one of the following places: within a NOTICE text file distributed as part of +the Derivative Works; within the Source form or documentation, if provided +along with the Derivative Works; or, within a display generated by the +Derivative Works, if and wherever such third-party notices normally appear. +The contents of the NOTICE file are for informational purposes only and do not +modify the License. You may add Your own attribution notices within Derivative +Works that You distribute, alongside or as an addendum to the NOTICE text from +the Work, provided that such additional attribution notices cannot be +construed as modifying the License. -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. +distribution of Your modifications, or for any such Derivative Works as a +whole, provided Your use, reproduction, and distribution of the Work otherwise +complies with the conditions stated in this License. -5. Submission of Contributions. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -6. Trademarks. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS -APPENDIX: How to apply the Apache License to your work +APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be +identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- -k8s.io/kubernetes -version: v1.17.5 -COPYRIGHT and LICENSE: Apache License 2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------------------------------- -k8s.io/utils -version: e782cd3c129f -COPYRIGHT and LICENSE: Apache License 2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +the same "printed page" as the copyright notice for easier identification +within third-party archives. +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + + + +--------------------------------- (separator) ---------------------------------- +== SPDX:BSD-3-Clause--modified-by-Google + +Redistribution and use in source and binary forms, with +or without modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +--------------------------------- (separator) ---------------------------------- +== SPDX:MIT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +--------------------------------- (separator) ---------------------------------- +== SPDX:UPL-1.0 + +The Universal Permissive License (UPL), Version 1.0 + +Copyright (c) + +The Universal Permissive License (UPL), Version 1.0 + +Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both + +(a) the Software, and + +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. + +This license is subject to the following condition: + +The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +=== ATTRIBUTION-HELPER-GENERATED: +=== Attribution helper version: {Major:0 Minor:11 GitVersion: GitCommit: GitTreeState:dirty BuildDate:1970-01-01T00:00:00Z GoVersion:go1.21.4 Compiler:gc Platform:darwin/arm64} +=== License file based on go.mod with md5 sum: 2a50718c192e1163b46460fd9130b5d9 diff --git a/cmd/zfssa-csi-driver/main.go b/cmd/zfssa-csi-driver/main.go index 405671f..b52f27d 100644 --- a/cmd/zfssa-csi-driver/main.go +++ b/cmd/zfssa-csi-driver/main.go @@ -1,21 +1,21 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ -*/ + */ package main import ( - "github.com/oracle/zfssa-csi-driver/pkg/service" "flag" "fmt" + "github.com/oracle/zfssa-csi-driver/pkg/service" "os" ) var ( - driverName = flag.String("drivername", "zfssa-csi-driver", "name of the driver") + driverName = flag.String("drivername", "zfssa-csi-driver", "name of the driver") // Provided by the build process - version = "0.0.0" + version = "1.2.0" ) func main() { diff --git a/deploy/helm/k8s-1.17/Chart.yaml b/deploy/helm/k8s-1.25/Chart.yaml similarity index 86% rename from deploy/helm/k8s-1.17/Chart.yaml rename to deploy/helm/k8s-1.25/Chart.yaml index 4adea21..44a9c12 100644 --- a/deploy/helm/k8s-1.17/Chart.yaml +++ b/deploy/helm/k8s-1.25/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 name: zfssa-csi -version: 1.0.0 +version: 1.2.0 description: Deploys Oracle ZFS Storage Appliance CSI Plugin. diff --git a/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshotclasses.yaml b/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshotclasses.yaml new file mode 100644 index 0000000..98337ca --- /dev/null +++ b/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshotclasses.yaml @@ -0,0 +1,136 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814" + controller-gen.kubebuilder.io/version: v0.12.0 + creationTimestamp: null + name: volumesnapshotclasses.snapshot.storage.k8s.io +spec: + group: snapshot.storage.k8s.io + names: + kind: VolumeSnapshotClass + listKind: VolumeSnapshotClassList + plural: volumesnapshotclasses + shortNames: + - vsclass + - vsclasses + singular: volumesnapshotclass + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .driver + name: Driver + type: string + - description: Determines whether a VolumeSnapshotContent created through the + VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. + jsonPath: .deletionPolicy + name: DeletionPolicy + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: VolumeSnapshotClass specifies parameters that a underlying storage + system uses when creating a volume snapshot. A specific VolumeSnapshotClass + is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses + are non-namespaced + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + deletionPolicy: + description: deletionPolicy determines whether a VolumeSnapshotContent + created through the VolumeSnapshotClass should be deleted when its bound + VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". + "Retain" means that the VolumeSnapshotContent and its physical snapshot + on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent + and its physical snapshot on underlying storage system are deleted. + Required. + enum: + - Delete + - Retain + type: string + driver: + description: driver is the name of the storage driver that handles this + VolumeSnapshotClass. Required. + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + parameters: + additionalProperties: + type: string + description: parameters is a key-value map with storage driver specific + parameters for creating snapshots. These values are opaque to Kubernetes. + type: object + required: + - deletionPolicy + - driver + type: object + served: true + storage: true + subresources: {} + - additionalPrinterColumns: + - jsonPath: .driver + name: Driver + type: string + - description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. + jsonPath: .deletionPolicy + name: DeletionPolicy + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + # This indicates the v1beta1 version of the custom resource is deprecated. + # API requests to this version receive a warning in the server response. + deprecated: true + # This overrides the default warning returned to clients making v1beta1 API requests. + deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotClass" + schema: + openAPIV3Schema: + description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + deletionPolicy: + description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. Required. + enum: + - Delete + - Retain + type: string + driver: + description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required. + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + parameters: + additionalProperties: + type: string + description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes. + type: object + required: + - deletionPolicy + - driver + type: object + served: false + storage: false + subresources: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshotcontents.yaml b/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshotcontents.yaml new file mode 100644 index 0000000..5baf5a3 --- /dev/null +++ b/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshotcontents.yaml @@ -0,0 +1,403 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/955" + controller-gen.kubebuilder.io/version: v0.12.0 + creationTimestamp: null + name: volumesnapshotcontents.snapshot.storage.k8s.io +spec: + group: snapshot.storage.k8s.io + names: + kind: VolumeSnapshotContent + listKind: VolumeSnapshotContentList + plural: volumesnapshotcontents + shortNames: + - vsc + - vscs + singular: volumesnapshotcontent + scope: Cluster + versions: + - additionalPrinterColumns: + - description: Indicates if the snapshot is ready to be used to restore a volume. + jsonPath: .status.readyToUse + name: ReadyToUse + type: boolean + - description: Represents the complete size of the snapshot in bytes + jsonPath: .status.restoreSize + name: RestoreSize + type: integer + - description: Determines whether this VolumeSnapshotContent and its physical + snapshot on the underlying storage system should be deleted when its bound + VolumeSnapshot is deleted. + jsonPath: .spec.deletionPolicy + name: DeletionPolicy + type: string + - description: Name of the CSI driver used to create the physical snapshot on + the underlying storage system. + jsonPath: .spec.driver + name: Driver + type: string + - description: Name of the VolumeSnapshotClass to which this snapshot belongs. + jsonPath: .spec.volumeSnapshotClassName + name: VolumeSnapshotClass + type: string + - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent + object is bound. + jsonPath: .spec.volumeSnapshotRef.name + name: VolumeSnapshot + type: string + - description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. + jsonPath: .spec.volumeSnapshotRef.namespace + name: VolumeSnapshotNamespace + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: VolumeSnapshotContent represents the actual "on-disk" snapshot + object in the underlying storage system + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: spec defines properties of a VolumeSnapshotContent created + by the underlying storage system. Required. + properties: + deletionPolicy: + description: deletionPolicy determines whether this VolumeSnapshotContent + and its physical snapshot on the underlying storage system should + be deleted when its bound VolumeSnapshot is deleted. Supported values + are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent + and its physical snapshot on underlying storage system are kept. + "Delete" means that the VolumeSnapshotContent and its physical snapshot + on underlying storage system are deleted. For dynamically provisioned + snapshots, this field will automatically be filled in by the CSI + snapshotter sidecar with the "DeletionPolicy" field defined in the + corresponding VolumeSnapshotClass. For pre-existing snapshots, users + MUST specify this field when creating the VolumeSnapshotContent + object. Required. + enum: + - Delete + - Retain + type: string + driver: + description: driver is the name of the CSI driver used to create the + physical snapshot on the underlying storage system. This MUST be + the same as the name returned by the CSI GetPluginName() call for + that driver. Required. + type: string + source: + description: source specifies whether the snapshot is (or should be) + dynamically provisioned or already exists, and just requires a Kubernetes + object representation. This field is immutable after creation. Required. + properties: + snapshotHandle: + description: snapshotHandle specifies the CSI "snapshot_id" of + a pre-existing snapshot on the underlying storage system for + which a Kubernetes object representation was (or should be) + created. This field is immutable. + type: string + volumeHandle: + description: volumeHandle specifies the CSI "volume_id" of the + volume from which a snapshot should be dynamically taken from. + This field is immutable. + type: string + type: object + oneOf: + - required: ["snapshotHandle"] + - required: ["volumeHandle"] + sourceVolumeMode: + description: SourceVolumeMode is the mode of the volume whose snapshot + is taken. Can be either “Filesystem” or “Block”. If not specified, + it indicates the source volume's mode is unknown. This field is + immutable. This field is an alpha field. + type: string + volumeSnapshotClassName: + description: name of the VolumeSnapshotClass from which this snapshot + was (or will be) created. Note that after provisioning, the VolumeSnapshotClass + may be deleted or recreated with different set of values, and as + such, should not be referenced post-snapshot creation. + type: string + volumeSnapshotRef: + description: volumeSnapshotRef specifies the VolumeSnapshot object + to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName + field must reference to this VolumeSnapshotContent's name for the + bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent + object, name and namespace of the VolumeSnapshot object MUST be + provided for binding to happen. This field is immutable after creation. + Required. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - deletionPolicy + - driver + - source + - volumeSnapshotRef + type: object + status: + description: status represents the current information of a snapshot. + properties: + creationTime: + description: creationTime is the timestamp when the point-in-time + snapshot is taken by the underlying storage system. In dynamic snapshot + creation case, this field will be filled in by the CSI snapshotter + sidecar with the "creation_time" value returned from CSI "CreateSnapshot" + gRPC call. For a pre-existing snapshot, this field will be filled + with the "creation_time" value returned from the CSI "ListSnapshots" + gRPC call if the driver supports it. If not specified, it indicates + the creation time is unknown. The format of this field is a Unix + nanoseconds time encoded as an int64. On Unix, the command `date + +%s%N` returns the current time in nanoseconds since 1970-01-01 + 00:00:00 UTC. + format: int64 + type: integer + error: + description: error is the last observed error during snapshot creation, + if any. Upon success after retry, this error field will be cleared. + properties: + message: + description: 'message is a string detailing the encountered error + during snapshot creation if specified. NOTE: message may be + logged, and it should not contain sensitive information.' + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: readyToUse indicates if a snapshot is ready to be used + to restore a volume. In dynamic snapshot creation case, this field + will be filled in by the CSI snapshotter sidecar with the "ready_to_use" + value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing + snapshot, this field will be filled with the "ready_to_use" value + returned from the CSI "ListSnapshots" gRPC call if the driver supports + it, otherwise, this field will be set to "True". If not specified, + it means the readiness of a snapshot is unknown. + type: boolean + restoreSize: + description: restoreSize represents the complete size of the snapshot + in bytes. In dynamic snapshot creation case, this field will be + filled in by the CSI snapshotter sidecar with the "size_bytes" value + returned from CSI "CreateSnapshot" gRPC call. For a pre-existing + snapshot, this field will be filled with the "size_bytes" value + returned from the CSI "ListSnapshots" gRPC call if the driver supports + it. When restoring a volume from this snapshot, the size of the + volume MUST NOT be smaller than the restoreSize if it is specified, + otherwise the restoration will fail. If not specified, it indicates + that the size is unknown. + format: int64 + minimum: 0 + type: integer + snapshotHandle: + description: snapshotHandle is the CSI "snapshot_id" of a snapshot + on the underlying storage system. If not specified, it indicates + that dynamic snapshot creation has either failed or it is still + in progress. + type: string + volumeGroupSnapshotHandle: + description: VolumeGroupSnapshotHandle is the CSI "group_snapshot_id" + of a group snapshot on the underlying storage system. + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - description: Indicates if the snapshot is ready to be used to restore a volume. + jsonPath: .status.readyToUse + name: ReadyToUse + type: boolean + - description: Represents the complete size of the snapshot in bytes + jsonPath: .status.restoreSize + name: RestoreSize + type: integer + - description: Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. + jsonPath: .spec.deletionPolicy + name: DeletionPolicy + type: string + - description: Name of the CSI driver used to create the physical snapshot on the underlying storage system. + jsonPath: .spec.driver + name: Driver + type: string + - description: Name of the VolumeSnapshotClass to which this snapshot belongs. + jsonPath: .spec.volumeSnapshotClassName + name: VolumeSnapshotClass + type: string + - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. + jsonPath: .spec.volumeSnapshotRef.name + name: VolumeSnapshot + type: string + - description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. + jsonPath: .spec.volumeSnapshotRef.namespace + name: VolumeSnapshotNamespace + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + # This indicates the v1beta1 version of the custom resource is deprecated. + # API requests to this version receive a warning in the server response. + deprecated: true + # This overrides the default warning returned to clients making v1beta1 API requests. + deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotContent is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotContent" + schema: + openAPIV3Schema: + description: VolumeSnapshotContent represents the actual "on-disk" snapshot object in the underlying storage system + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + spec: + description: spec defines properties of a VolumeSnapshotContent created by the underlying storage system. Required. + properties: + deletionPolicy: + description: deletionPolicy determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. For dynamically provisioned snapshots, this field will automatically be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field defined in the corresponding VolumeSnapshotClass. For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. Required. + enum: + - Delete + - Retain + type: string + driver: + description: driver is the name of the CSI driver used to create the physical snapshot on the underlying storage system. This MUST be the same as the name returned by the CSI GetPluginName() call for that driver. Required. + type: string + source: + description: source specifies whether the snapshot is (or should be) dynamically provisioned or already exists, and just requires a Kubernetes object representation. This field is immutable after creation. Required. + properties: + snapshotHandle: + description: snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on the underlying storage system for which a Kubernetes object representation was (or should be) created. This field is immutable. + type: string + volumeHandle: + description: volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot should be dynamically taken from. This field is immutable. + type: string + type: object + volumeSnapshotClassName: + description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation. + type: string + volumeSnapshotRef: + description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Required. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - deletionPolicy + - driver + - source + - volumeSnapshotRef + type: object + status: + description: status represents the current information of a snapshot. + properties: + creationTime: + description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it indicates the creation time is unknown. The format of this field is a Unix nanoseconds time encoded as an int64. On Unix, the command `date +%s%N` returns the current time in nanoseconds since 1970-01-01 00:00:00 UTC. + format: int64 + type: integer + error: + description: error is the last observed error during snapshot creation, if any. Upon success after retry, this error field will be cleared. + properties: + message: + description: 'message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information.' + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: readyToUse indicates if a snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. + type: boolean + restoreSize: + description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. + format: int64 + minimum: 0 + type: integer + snapshotHandle: + description: snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. If not specified, it indicates that dynamic snapshot creation has either failed or it is still in progress. + type: string + type: object + required: + - spec + type: object + served: false + storage: false + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshots.yaml b/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshots.yaml new file mode 100644 index 0000000..e85fbfb --- /dev/null +++ b/deploy/helm/k8s-1.25/crds/snapshot.storage.k8s.io_volumesnapshots.yaml @@ -0,0 +1,314 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814" + controller-gen.kubebuilder.io/version: v0.12.0 + creationTimestamp: null + name: volumesnapshots.snapshot.storage.k8s.io +spec: + group: snapshot.storage.k8s.io + names: + kind: VolumeSnapshot + listKind: VolumeSnapshotList + plural: volumesnapshots + shortNames: + - vs + singular: volumesnapshot + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Indicates if the snapshot is ready to be used to restore a volume. + jsonPath: .status.readyToUse + name: ReadyToUse + type: boolean + - description: If a new snapshot needs to be created, this contains the name of + the source PVC from which this snapshot was (or will be) created. + jsonPath: .spec.source.persistentVolumeClaimName + name: SourcePVC + type: string + - description: If a snapshot already exists, this contains the name of the existing + VolumeSnapshotContent object representing the existing snapshot. + jsonPath: .spec.source.volumeSnapshotContentName + name: SourceSnapshotContent + type: string + - description: Represents the minimum size of volume required to rehydrate from + this snapshot. + jsonPath: .status.restoreSize + name: RestoreSize + type: string + - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. + jsonPath: .spec.volumeSnapshotClassName + name: SnapshotClass + type: string + - description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot + object intends to bind to. Please note that verification of binding actually + requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure + both are pointing at each other. Binding MUST be verified prior to usage of + this object. + jsonPath: .status.boundVolumeSnapshotContentName + name: SnapshotContent + type: string + - description: Timestamp when the point-in-time snapshot was taken by the underlying + storage system. + jsonPath: .status.creationTime + name: CreationTime + type: date + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: VolumeSnapshot is a user's request for either creating a point-in-time + snapshot of a persistent volume, or binding to a pre-existing snapshot. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: 'spec defines the desired characteristics of a snapshot requested + by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots + Required.' + properties: + source: + description: source specifies where a snapshot will be created from. + This field is immutable after creation. Required. + properties: + persistentVolumeClaimName: + description: persistentVolumeClaimName specifies the name of the + PersistentVolumeClaim object representing the volume from which + a snapshot should be created. This PVC is assumed to be in the + same namespace as the VolumeSnapshot object. This field should + be set if the snapshot does not exists, and needs to be created. + This field is immutable. + type: string + volumeSnapshotContentName: + description: volumeSnapshotContentName specifies the name of a + pre-existing VolumeSnapshotContent object representing an existing + volume snapshot. This field should be set if the snapshot already + exists and only needs a representation in Kubernetes. This field + is immutable. + type: string + type: object + oneOf: + - required: ["persistentVolumeClaimName"] + - required: ["volumeSnapshotContentName"] + volumeSnapshotClassName: + description: 'VolumeSnapshotClassName is the name of the VolumeSnapshotClass + requested by the VolumeSnapshot. VolumeSnapshotClassName may be + left nil to indicate that the default SnapshotClass should be used. + A given cluster may have multiple default Volume SnapshotClasses: + one default per CSI Driver. If a VolumeSnapshot does not specify + a SnapshotClass, VolumeSnapshotSource will be checked to figure + out what the associated CSI Driver is, and the default VolumeSnapshotClass + associated with that CSI Driver will be used. If more than one VolumeSnapshotClass + exist for a given CSI Driver and more than one have been marked + as default, CreateSnapshot will fail and generate an event. Empty + string is not allowed for this field.' + type: string + required: + - source + type: object + status: + description: status represents the current information of a snapshot. + Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent + objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent + point at each other) before using this object. + properties: + boundVolumeSnapshotContentName: + description: 'boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent + object to which this VolumeSnapshot object intends to bind to. If + not specified, it indicates that the VolumeSnapshot object has not + been successfully bound to a VolumeSnapshotContent object yet. NOTE: + To avoid possible security issues, consumers must verify binding + between VolumeSnapshot and VolumeSnapshotContent objects is successful + (by validating that both VolumeSnapshot and VolumeSnapshotContent + point at each other) before using this object.' + type: string + creationTime: + description: creationTime is the timestamp when the point-in-time + snapshot is taken by the underlying storage system. In dynamic snapshot + creation case, this field will be filled in by the snapshot controller + with the "creation_time" value returned from CSI "CreateSnapshot" + gRPC call. For a pre-existing snapshot, this field will be filled + with the "creation_time" value returned from the CSI "ListSnapshots" + gRPC call if the driver supports it. If not specified, it may indicate + that the creation time of the snapshot is unknown. + format: date-time + type: string + error: + description: error is the last observed error during snapshot creation, + if any. This field could be helpful to upper level controllers(i.e., + application controller) to decide whether they should continue on + waiting for the snapshot to be created based on the type of error + reported. The snapshot controller will keep retrying when an error + occurs during the snapshot creation. Upon success, this error field + will be cleared. + properties: + message: + description: 'message is a string detailing the encountered error + during snapshot creation if specified. NOTE: message may be + logged, and it should not contain sensitive information.' + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: readyToUse indicates if the snapshot is ready to be used + to restore a volume. In dynamic snapshot creation case, this field + will be filled in by the snapshot controller with the "ready_to_use" + value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing + snapshot, this field will be filled with the "ready_to_use" value + returned from the CSI "ListSnapshots" gRPC call if the driver supports + it, otherwise, this field will be set to "True". If not specified, + it means the readiness of a snapshot is unknown. + type: boolean + restoreSize: + type: string + description: restoreSize represents the minimum size of volume required + to create a volume from this snapshot. In dynamic snapshot creation + case, this field will be filled in by the snapshot controller with + the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. + For a pre-existing snapshot, this field will be filled with the + "size_bytes" value returned from the CSI "ListSnapshots" gRPC call + if the driver supports it. When restoring a volume from this snapshot, + the size of the volume MUST NOT be smaller than the restoreSize + if it is specified, otherwise the restoration will fail. If not + specified, it indicates that the size is unknown. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + volumeGroupSnapshotName: + description: VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot + of which this VolumeSnapshot is a part of. + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - description: Indicates if the snapshot is ready to be used to restore a volume. + jsonPath: .status.readyToUse + name: ReadyToUse + type: boolean + - description: If a new snapshot needs to be created, this contains the name of the source PVC from which this snapshot was (or will be) created. + jsonPath: .spec.source.persistentVolumeClaimName + name: SourcePVC + type: string + - description: If a snapshot already exists, this contains the name of the existing VolumeSnapshotContent object representing the existing snapshot. + jsonPath: .spec.source.volumeSnapshotContentName + name: SourceSnapshotContent + type: string + - description: Represents the minimum size of volume required to rehydrate from this snapshot. + jsonPath: .status.restoreSize + name: RestoreSize + type: string + - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. + jsonPath: .spec.volumeSnapshotClassName + name: SnapshotClass + type: string + - description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object. + jsonPath: .status.boundVolumeSnapshotContentName + name: SnapshotContent + type: string + - description: Timestamp when the point-in-time snapshot was taken by the underlying storage system. + jsonPath: .status.creationTime + name: CreationTime + type: date + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + # This indicates the v1beta1 version of the custom resource is deprecated. + # API requests to this version receive a warning in the server response. + deprecated: true + # This overrides the default warning returned to clients making v1beta1 API requests. + deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshot is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshot" + schema: + openAPIV3Schema: + description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + spec: + description: 'spec defines the desired characteristics of a snapshot requested by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots Required.' + properties: + source: + description: source specifies where a snapshot will be created from. This field is immutable after creation. Required. + properties: + persistentVolumeClaimName: + description: persistentVolumeClaimName specifies the name of the PersistentVolumeClaim object representing the volume from which a snapshot should be created. This PVC is assumed to be in the same namespace as the VolumeSnapshot object. This field should be set if the snapshot does not exists, and needs to be created. This field is immutable. + type: string + volumeSnapshotContentName: + description: volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent object representing an existing volume snapshot. This field should be set if the snapshot already exists and only needs a representation in Kubernetes. This field is immutable. + type: string + type: object + volumeSnapshotClassName: + description: 'VolumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. VolumeSnapshotClassName may be left nil to indicate that the default SnapshotClass should be used. A given cluster may have multiple default Volume SnapshotClasses: one default per CSI Driver. If a VolumeSnapshot does not specify a SnapshotClass, VolumeSnapshotSource will be checked to figure out what the associated CSI Driver is, and the default VolumeSnapshotClass associated with that CSI Driver will be used. If more than one VolumeSnapshotClass exist for a given CSI Driver and more than one have been marked as default, CreateSnapshot will fail and generate an event. Empty string is not allowed for this field.' + type: string + required: + - source + type: object + status: + description: status represents the current information of a snapshot. Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object. + properties: + boundVolumeSnapshotContentName: + description: 'boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent object to which this VolumeSnapshot object intends to bind to. If not specified, it indicates that the VolumeSnapshot object has not been successfully bound to a VolumeSnapshotContent object yet. NOTE: To avoid possible security issues, consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object.' + type: string + creationTime: + description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it may indicate that the creation time of the snapshot is unknown. + format: date-time + type: string + error: + description: error is the last observed error during snapshot creation, if any. This field could be helpful to upper level controllers(i.e., application controller) to decide whether they should continue on waiting for the snapshot to be created based on the type of error reported. The snapshot controller will keep retrying when an error occurs during the snapshot creation. Upon success, this error field will be cleared. + properties: + message: + description: 'message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information.' + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: readyToUse indicates if the snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. + type: boolean + restoreSize: + type: string + description: restoreSize represents the minimum size of volume required to create a volume from this snapshot. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + required: + - spec + type: object + served: false + storage: false + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/deploy/helm/k8s-1.17/templates/00-zfssa-csi-secret.yaml b/deploy/helm/k8s-1.25/templates/00-zfssa-csi-secret.yaml similarity index 100% rename from deploy/helm/k8s-1.17/templates/00-zfssa-csi-secret.yaml rename to deploy/helm/k8s-1.25/templates/00-zfssa-csi-secret.yaml diff --git a/deploy/helm/k8s-1.17/templates/01-zfssa-csi-certs.yaml b/deploy/helm/k8s-1.25/templates/01-zfssa-csi-certs.yaml similarity index 100% rename from deploy/helm/k8s-1.17/templates/01-zfssa-csi-certs.yaml rename to deploy/helm/k8s-1.25/templates/01-zfssa-csi-certs.yaml diff --git a/deploy/helm/k8s-1.17/templates/02-zfssa-csi-rbac.yaml b/deploy/helm/k8s-1.25/templates/02-zfssa-csi-rbac.yaml similarity index 99% rename from deploy/helm/k8s-1.17/templates/02-zfssa-csi-rbac.yaml rename to deploy/helm/k8s-1.25/templates/02-zfssa-csi-rbac.yaml index 3c4a841..8784db5 100644 --- a/deploy/helm/k8s-1.17/templates/02-zfssa-csi-rbac.yaml +++ b/deploy/helm/k8s-1.25/templates/02-zfssa-csi-rbac.yaml @@ -52,7 +52,7 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] + verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots"] verbs: ["get", "list", "watch", "update"] diff --git a/deploy/helm/k8s-1.17/templates/03-zfssa-csi-driver.yaml b/deploy/helm/k8s-1.25/templates/03-zfssa-csi-driver.yaml similarity index 85% rename from deploy/helm/k8s-1.17/templates/03-zfssa-csi-driver.yaml rename to deploy/helm/k8s-1.25/templates/03-zfssa-csi-driver.yaml index 67ae164..cd93a01 100644 --- a/deploy/helm/k8s-1.17/templates/03-zfssa-csi-driver.yaml +++ b/deploy/helm/k8s-1.25/templates/03-zfssa-csi-driver.yaml @@ -2,7 +2,7 @@ # are needed only because of condition explained in # https://github.com/kubernetes/kubernetes/issues/69608 --- -apiVersion: storage.k8s.io/v1beta1 +apiVersion: storage.k8s.io/v1 kind: CSIDriver metadata: name: zfssa-csi-driver @@ -55,6 +55,15 @@ spec: - name: registration-dir mountPath: /registration + - name: liveness-probe + imagePullPolicy: Always + image: {{ .Values.image.sidecarBase }}{{ .Values.images.csiLivenessProbe.name }}:{{ .Values.images.csiLivenessProbe.tag }} + args: + - --csi-address=/plugin/csi.sock + volumeMounts: + - mountPath: {{ .Values.paths.pluginDir.mountPath }} + name: socket-dir + - name: zfssabs image: {{ .Values.image.zfssaBase }}{{ .Values.images.zfssaCsiDriver.name }}:{{ .Values.images.zfssaCsiDriver.tag }} args: @@ -87,6 +96,18 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: privileged: true + ports: + - containerPort: 9808 + name: healthz + protocol: TCP + livenessProbe: + failureThreshold: 5 + httpGet: + path: /healthz + port: healthz + initialDelaySeconds: 20 + timeoutSeconds: 10 + periodSeconds: 20 volumeMounts: - name: socket-dir mountPath: {{ .Values.paths.pluginDir.mountPath }} diff --git a/deploy/helm/k8s-1.17/templates/04-zfssa-csi-provisioner.yaml b/deploy/helm/k8s-1.25/templates/04-zfssa-csi-provisioner.yaml similarity index 97% rename from deploy/helm/k8s-1.17/templates/04-zfssa-csi-provisioner.yaml rename to deploy/helm/k8s-1.25/templates/04-zfssa-csi-provisioner.yaml index f544543..6578b99 100644 --- a/deploy/helm/k8s-1.17/templates/04-zfssa-csi-provisioner.yaml +++ b/deploy/helm/k8s-1.25/templates/04-zfssa-csi-provisioner.yaml @@ -60,6 +60,9 @@ spec: - --csi-address=/plugin/csi.sock - --timeout=30s - --feature-gates=Topology=true + env: + - name: ADDRESS + value: /plugin/csi.sock imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: # This is necessary only for systems with SELinux, where diff --git a/deploy/k8s-1.17/snapshot-controller/rbac-snapshot-controller.yaml b/deploy/helm/k8s-1.25/templates/05-snapshot-controller-rbac.yaml similarity index 86% rename from deploy/k8s-1.17/snapshot-controller/rbac-snapshot-controller.yaml rename to deploy/helm/k8s-1.25/templates/05-snapshot-controller-rbac.yaml index fee85af..5952d91 100644 --- a/deploy/k8s-1.17/snapshot-controller/rbac-snapshot-controller.yaml +++ b/deploy/helm/k8s-1.25/templates/05-snapshot-controller-rbac.yaml @@ -28,10 +28,10 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] + verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots"] - verbs: ["get", "list", "watch", "update"] + verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots/status"] verbs: ["update"] @@ -41,11 +41,12 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: snapshot-controller-role + namespace: {{ .Values.deployment.namespace }} subjects: - kind: ServiceAccount name: snapshot-controller # replace with non-default namespace name - namespace: default + namespace: {{ .Values.deployment.namespace }} roleRef: kind: ClusterRole # change the name also here if the ClusterRole gets renamed @@ -56,7 +57,7 @@ roleRef: kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: - namespace: default # TODO: replace with the namespace you want for your controller + namespace: {{ .Values.deployment.namespace }} name: snapshot-controller-leaderelection rules: - apiGroups: ["coordination.k8s.io"] @@ -68,11 +69,12 @@ kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: snapshot-controller-leaderelection - namespace: default # TODO: replace with the namespace you want for your controller + namespace: {{ .Values.deployment.namespace }} subjects: - kind: ServiceAccount name: snapshot-controller - namespace: default # TODO: replace with the namespace you want for your controller + namespace: {{ .Values.deployment.namespace }} + roleRef: kind: Role name: snapshot-controller-leaderelection diff --git a/deploy/k8s-1.17/snapshot-controller/setup-snapshot-controller.yaml b/deploy/helm/k8s-1.25/templates/06-snapshot-controller.yaml similarity index 74% rename from deploy/k8s-1.17/snapshot-controller/setup-snapshot-controller.yaml rename to deploy/helm/k8s-1.25/templates/06-snapshot-controller.yaml index f958d2c..1e28c8d 100644 --- a/deploy/k8s-1.17/snapshot-controller/setup-snapshot-controller.yaml +++ b/deploy/helm/k8s-1.25/templates/06-snapshot-controller.yaml @@ -5,6 +5,7 @@ kind: StatefulSet apiVersion: apps/v1 metadata: name: snapshot-controller + namespace: {{ .Values.deployment.namespace }} spec: serviceName: "snapshot-controller" replicas: 1 @@ -19,7 +20,7 @@ spec: serviceAccount: snapshot-controller containers: - name: snapshot-controller - image: quay.io/k8scsi/snapshot-controller:v2.1.1 + image: {{ .Values.image.sidecarBase }}{{ .Values.images.csiSnapshotController.name }}:{{ .Values.images.csiSnapshotController.tag }} args: - "--v=5" - "--leader-election=false" diff --git a/deploy/helm/k8s-1.17/values.yaml b/deploy/helm/k8s-1.25/values.yaml similarity index 73% rename from deploy/helm/k8s-1.17/values.yaml rename to deploy/helm/k8s-1.25/values.yaml index 364f9df..0d5a168 100644 --- a/deploy/helm/k8s-1.17/values.yaml +++ b/deploy/helm/k8s-1.25/values.yaml @@ -1,6 +1,6 @@ # Global docker image setting image: - sidecarBase: k8s.gcr.io/sig-storage/ + sidecarBase: container-registry.oracle.com/olcne/ zfssaBase: iad.ocir.io/zs/store/csi/ pullPolicy: Always @@ -8,22 +8,28 @@ image: images: csiNodeDriverRegistrar: name: csi-node-driver-registrar - tag: "v2.0.0" + tag: "v2.9.0" zfssaCsiDriver: name: zfssa-csi-driver - tag: "v1.0.0" + tag: "v1.2.0" csiProvisioner: name: csi-provisioner - tag: "v2.0.5" + tag: "v3.6.0" csiAttacher: name: csi-attacher - tag: "v3.0.2" + tag: "v4.4.0" csiResizer: name: csi-resizer - tag: "v1.1.0" + tag: "v1.9.0" csiSnapshotter: name: csi-snapshotter - tag: "v3.0.3" + tag: "v6.3.0" + csiLivenessProbe: + name: livenessprobe + tag: "v2.11.0" + csiSnapshotController: + name: snapshot-controller + tag: "v6.3.0" paths: pluginDir: diff --git a/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml b/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml deleted file mode 100644 index 4aa980c..0000000 --- a/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml +++ /dev/null @@ -1,85 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" - creationTimestamp: null - name: volumesnapshotclasses.snapshot.storage.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .driver - name: Driver - type: string - - JSONPath: .deletionPolicy - description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass - should be deleted when its bound VolumeSnapshot is deleted. - name: DeletionPolicy - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - group: snapshot.storage.k8s.io - names: - kind: VolumeSnapshotClass - listKind: VolumeSnapshotClassList - plural: volumesnapshotclasses - singular: volumesnapshotclass - preserveUnknownFields: false - scope: Cluster - subresources: {} - validation: - openAPIV3Schema: - description: VolumeSnapshotClass specifies parameters that a underlying storage - system uses when creating a volume snapshot. A specific VolumeSnapshotClass - is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses - are non-namespaced - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - deletionPolicy: - description: deletionPolicy determines whether a VolumeSnapshotContent created - through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot - is deleted. Supported values are "Retain" and "Delete". "Retain" means - that the VolumeSnapshotContent and its physical snapshot on underlying - storage system are kept. "Delete" means that the VolumeSnapshotContent - and its physical snapshot on underlying storage system are deleted. Required. - enum: - - Delete - - Retain - type: string - driver: - description: driver is the name of the storage driver that handles this - VolumeSnapshotClass. Required. - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - parameters: - additionalProperties: - type: string - description: parameters is a key-value map with storage driver specific - parameters for creating snapshots. These values are opaque to Kubernetes. - type: object - required: - - deletionPolicy - - driver - type: object - version: v1beta1 - versions: - - name: v1beta1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml b/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml deleted file mode 100644 index 34c51ad..0000000 --- a/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml +++ /dev/null @@ -1,233 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" - creationTimestamp: null - name: volumesnapshotcontents.snapshot.storage.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.readyToUse - description: Indicates if a snapshot is ready to be used to restore a volume. - name: ReadyToUse - type: boolean - - JSONPath: .status.restoreSize - description: Represents the complete size of the snapshot in bytes - name: RestoreSize - type: integer - - JSONPath: .spec.deletionPolicy - description: Determines whether this VolumeSnapshotContent and its physical snapshot - on the underlying storage system should be deleted when its bound VolumeSnapshot - is deleted. - name: DeletionPolicy - type: string - - JSONPath: .spec.driver - description: Name of the CSI driver used to create the physical snapshot on the - underlying storage system. - name: Driver - type: string - - JSONPath: .spec.volumeSnapshotClassName - description: Name of the VolumeSnapshotClass to which this snapshot belongs. - name: VolumeSnapshotClass - type: string - - JSONPath: .spec.volumeSnapshotRef.name - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent - object is bound. - name: VolumeSnapshot - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - group: snapshot.storage.k8s.io - names: - kind: VolumeSnapshotContent - listKind: VolumeSnapshotContentList - plural: volumesnapshotcontents - singular: volumesnapshotcontent - preserveUnknownFields: false - scope: Cluster - subresources: - status: {} - validation: - openAPIV3Schema: - description: VolumeSnapshotContent represents the actual "on-disk" snapshot - object in the underlying storage system - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - spec: - description: spec defines properties of a VolumeSnapshotContent created - by the underlying storage system. Required. - properties: - deletionPolicy: - description: deletionPolicy determines whether this VolumeSnapshotContent - and its physical snapshot on the underlying storage system should - be deleted when its bound VolumeSnapshot is deleted. Supported values - are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent - and its physical snapshot on underlying storage system are kept. "Delete" - means that the VolumeSnapshotContent and its physical snapshot on - underlying storage system are deleted. In dynamic snapshot creation - case, this field will be filled in with the "DeletionPolicy" field - defined in the VolumeSnapshotClass the VolumeSnapshot refers to. For - pre-existing snapshots, users MUST specify this field when creating - the VolumeSnapshotContent object. Required. - enum: - - Delete - - Retain - type: string - driver: - description: driver is the name of the CSI driver used to create the - physical snapshot on the underlying storage system. This MUST be the - same as the name returned by the CSI GetPluginName() call for that - driver. Required. - type: string - source: - description: source specifies from where a snapshot will be created. - This field is immutable after creation. Required. - properties: - snapshotHandle: - description: snapshotHandle specifies the CSI "snapshot_id" of a - pre-existing snapshot on the underlying storage system. This field - is immutable. - type: string - volumeHandle: - description: volumeHandle specifies the CSI "volume_id" of the volume - from which a snapshot should be dynamically taken from. This field - is immutable. - type: string - type: object - volumeSnapshotClassName: - description: name of the VolumeSnapshotClass to which this snapshot - belongs. - type: string - volumeSnapshotRef: - description: volumeSnapshotRef specifies the VolumeSnapshot object to - which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName - field must reference to this VolumeSnapshotContent's name for the - bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent - object, name and namespace of the VolumeSnapshot object MUST be provided - for binding to happen. This field is immutable after creation. Required. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an - entire object, this string should contain a valid JSON/Go field - access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen only - to have some well-defined way of referencing a part of an object. - TODO: this design is not final and this field is subject to change - in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is - made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - deletionPolicy - - driver - - source - - volumeSnapshotRef - type: object - status: - description: status represents the current information of a snapshot. - properties: - creationTime: - description: creationTime is the timestamp when the point-in-time snapshot - is taken by the underlying storage system. In dynamic snapshot creation - case, this field will be filled in with the "creation_time" value - returned from CSI "CreateSnapshotRequest" gRPC call. For a pre-existing - snapshot, this field will be filled with the "creation_time" value - returned from the CSI "ListSnapshots" gRPC call if the driver supports - it. If not specified, it indicates the creation time is unknown. The - format of this field is a Unix nanoseconds time encoded as an int64. - On Unix, the command `date +%s%N` returns the current time in nanoseconds - since 1970-01-01 00:00:00 UTC. - format: int64 - type: integer - error: - description: error is the latest observed error during snapshot creation, - if any. - properties: - message: - description: 'message is a string detailing the encountered error - during snapshot creation if specified. NOTE: message may be logged, - and it should not contain sensitive information.' - type: string - time: - description: time is the timestamp when the error was encountered. - format: date-time - type: string - type: object - readyToUse: - description: readyToUse indicates if a snapshot is ready to be used - to restore a volume. In dynamic snapshot creation case, this field - will be filled in with the "ready_to_use" value returned from CSI - "CreateSnapshotRequest" gRPC call. For a pre-existing snapshot, this - field will be filled with the "ready_to_use" value returned from the - CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, - this field will be set to "True". If not specified, it means the readiness - of a snapshot is unknown. - type: boolean - restoreSize: - description: restoreSize represents the complete size of the snapshot - in bytes. In dynamic snapshot creation case, this field will be filled - in with the "size_bytes" value returned from CSI "CreateSnapshotRequest" - gRPC call. For a pre-existing snapshot, this field will be filled - with the "size_bytes" value returned from the CSI "ListSnapshots" - gRPC call if the driver supports it. When restoring a volume from - this snapshot, the size of the volume MUST NOT be smaller than the - restoreSize if it is specified, otherwise the restoration will fail. - If not specified, it indicates that the size is unknown. - format: int64 - minimum: 0 - type: integer - snapshotHandle: - description: snapshotHandle is the CSI "snapshot_id" of a snapshot on - the underlying storage system. If not specified, it indicates that - dynamic snapshot creation has either failed or it is still in progress. - type: string - type: object - required: - - spec - type: object - version: v1beta1 - versions: - - name: v1beta1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshots.yaml b/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshots.yaml deleted file mode 100644 index 483706f..0000000 --- a/deploy/k8s-1.17/snapshot-controller/crd/snapshot.storage.k8s.io_volumesnapshots.yaml +++ /dev/null @@ -1,188 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" - creationTimestamp: null - name: volumesnapshots.snapshot.storage.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.readyToUse - description: Indicates if a snapshot is ready to be used to restore a volume. - name: ReadyToUse - type: boolean - - JSONPath: .spec.source.persistentVolumeClaimName - description: Name of the source PVC from where a dynamically taken snapshot will - be created. - name: SourcePVC - type: string - - JSONPath: .spec.source.volumeSnapshotContentName - description: Name of the VolumeSnapshotContent which represents a pre-provisioned - snapshot. - name: SourceSnapshotContent - type: string - - JSONPath: .status.restoreSize - description: Represents the complete size of the snapshot. - name: RestoreSize - type: string - - JSONPath: .spec.volumeSnapshotClassName - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. - name: SnapshotClass - type: string - - JSONPath: .status.boundVolumeSnapshotContentName - description: The name of the VolumeSnapshotContent to which this VolumeSnapshot - is bound. - name: SnapshotContent - type: string - - JSONPath: .status.creationTime - description: Timestamp when the point-in-time snapshot is taken by the underlying - storage system. - name: CreationTime - type: date - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - group: snapshot.storage.k8s.io - names: - kind: VolumeSnapshot - listKind: VolumeSnapshotList - plural: volumesnapshots - singular: volumesnapshot - preserveUnknownFields: false - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: VolumeSnapshot is a user's request for either creating a point-in-time - snapshot of a persistent volume, or binding to a pre-existing snapshot. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - spec: - description: 'spec defines the desired characteristics of a snapshot requested - by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots - Required.' - properties: - source: - description: source specifies where a snapshot will be created from. - This field is immutable after creation. Required. - properties: - persistentVolumeClaimName: - description: persistentVolumeClaimName specifies the name of the - PersistentVolumeClaim object in the same namespace as the VolumeSnapshot - object where the snapshot should be dynamically taken from. This - field is immutable. - type: string - volumeSnapshotContentName: - description: volumeSnapshotContentName specifies the name of a pre-existing - VolumeSnapshotContent object. This field is immutable. - type: string - type: object - volumeSnapshotClassName: - description: 'volumeSnapshotClassName is the name of the VolumeSnapshotClass - requested by the VolumeSnapshot. If not specified, the default snapshot - class will be used if one exists. If not specified, and there is no - default snapshot class, dynamic snapshot creation will fail. Empty - string is not allowed for this field. TODO(xiangqian): a webhook validation - on empty string. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes' - type: string - required: - - source - type: object - status: - description: 'status represents the current information of a snapshot. NOTE: - status can be modified by sources other than system controllers, and must - not be depended upon for accuracy. Controllers should only use information - from the VolumeSnapshotContent object after verifying that the binding - is accurate and complete.' - properties: - boundVolumeSnapshotContentName: - description: 'boundVolumeSnapshotContentName represents the name of - the VolumeSnapshotContent object to which the VolumeSnapshot object - is bound. If not specified, it indicates that the VolumeSnapshot object - has not been successfully bound to a VolumeSnapshotContent object - yet. NOTE: Specified boundVolumeSnapshotContentName alone does not - mean binding is valid. Controllers MUST always verify bidirectional - binding between VolumeSnapshot and VolumeSnapshotContent to - avoid possible security issues.' - type: string - creationTime: - description: creationTime is the timestamp when the point-in-time snapshot - is taken by the underlying storage system. In dynamic snapshot creation - case, this field will be filled in with the "creation_time" value - returned from CSI "CreateSnapshotRequest" gRPC call. For a pre-existing - snapshot, this field will be filled with the "creation_time" value - returned from the CSI "ListSnapshots" gRPC call if the driver supports - it. If not specified, it indicates that the creation time of the snapshot - is unknown. - format: date-time - type: string - error: - description: error is the last observed error during snapshot creation, - if any. This field could be helpful to upper level controllers(i.e., - application controller) to decide whether they should continue on - waiting for the snapshot to be created based on the type of error - reported. - properties: - message: - description: 'message is a string detailing the encountered error - during snapshot creation if specified. NOTE: message may be logged, - and it should not contain sensitive information.' - type: string - time: - description: time is the timestamp when the error was encountered. - format: date-time - type: string - type: object - readyToUse: - description: readyToUse indicates if a snapshot is ready to be used - to restore a volume. In dynamic snapshot creation case, this field - will be filled in with the "ready_to_use" value returned from CSI - "CreateSnapshotRequest" gRPC call. For a pre-existing snapshot, this - field will be filled with the "ready_to_use" value returned from the - CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, - this field will be set to "True". If not specified, it means the readiness - of a snapshot is unknown. - type: boolean - restoreSize: - anyOf: - - type: integer - - type: string - description: restoreSize represents the complete size of the snapshot - in bytes. In dynamic snapshot creation case, this field will be filled - in with the "size_bytes" value returned from CSI "CreateSnapshotRequest" - gRPC call. For a pre-existing snapshot, this field will be filled - with the "size_bytes" value returned from the CSI "ListSnapshots" - gRPC call if the driver supports it. When restoring a volume from - this snapshot, the size of the volume MUST NOT be smaller than the - restoreSize if it is specified, otherwise the restoration will fail. - If not specified, it indicates that the size is unknown. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - required: - - spec - type: object - version: v1beta1 - versions: - - name: v1beta1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/examples/block-pv/templates/00-storage-class.yaml b/examples/block-pv/templates/00-storage-class.yaml index 70d6865..6def88c 100644 --- a/examples/block-pv/templates/00-storage-class.yaml +++ b/examples/block-pv/templates/00-storage-class.yaml @@ -16,5 +16,5 @@ parameters: rootUser: {{ .Values.appliance.rootUser }} rootGroup: {{ .Values.appliance.rootGroup }} rootPermissions: "777" - shareNFS: "on" + shareNFS: {{ .Values.appliance.shareNFS }} restrictChown: "false" diff --git a/examples/block-pv/templates/03-pod.yaml b/examples/block-pv/templates/03-pod.yaml index 2fd090b..c76f414 100644 --- a/examples/block-pv/templates/03-pod.yaml +++ b/examples/block-pv/templates/03-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/block-pv/values.yaml b/examples/block-pv/values.yaml index 06a3a4a..4398954 100644 --- a/examples/block-pv/values.yaml +++ b/examples/block-pv/values.yaml @@ -5,6 +5,13 @@ pvcExistingName: zfssa-block-existing-pvc podBlockName: zfssa-block-existing-pod applianceName: OVERRIDE +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/block-snapshot/block-snapshot.yaml b/examples/block-snapshot/block-snapshot.yaml deleted file mode 100644 index fa04c54..0000000 --- a/examples/block-snapshot/block-snapshot.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 -kind: VolumeSnapshot -metadata: - name: zfssa-block-vs-snapshot -spec: - volumeSnapshotClassName: zfssa-block-vs-example-vsc - source: - persistentVolumeClaimName: zfssa-block-vs-example-pvc diff --git a/examples/block-vsc/README.md b/examples/block-vsc/README.md index b0859e8..33ed1a1 100644 --- a/examples/block-vsc/README.md +++ b/examples/block-vsc/README.md @@ -21,23 +21,16 @@ customize are: * targetGroup: the target iSCSI group to use on the appliance * volSize: the size of the iSCSI LUN share to create -## Enabling Volume Snapshot Feature (Only for Kubernetes v1.17 - v1.19) - -The Kubernetes Volume Snapshot feature became GA in Kubernetes v1.20. In order to use -this feature in Kubernetes pre-v1.20, it MUST be enabled prior to deploying ZS CSI Driver. -To enable the feature on Kubernetes pre-v1.20, follow the instructions on -[INSTALLATION](../../INSTALLATION.md). - -## Deployment +## Deployment of initial pod and volume This step includes deploying a pod with a block volume attached using a regular storage class and a persistent volume claim. It also deploys a volume snapshot class required to take snapshots of the persistent volume. -Assuming there is a set of values in the local-values directory, deploy using Helm 3: +Assuming there is a set of values in the local-values directory, deploy using Helm: ```text -helm ../install -f local-values/local-values.yaml zfssa-block-vsc ./ +helm install -f local-values/local-values.yaml zfssa-block-vsc ./block-snapshot-creator ``` Once deployed, verify each of the created entities using kubectl: @@ -53,13 +46,13 @@ Once deployed, verify each of the created entities using kubectl: The command `kubectl get pvc` should now return something similar to this: ```text NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE - zfssa-block-vs-example-pvc Bound pvc-477804b4-e592-4039-a77c-a1c99a1e537b 10Gi RWO zfssa-block-vs-example-sc 62s + zfssa-block-example-pvc Bound pvc-477804b4-e592-4039-a77c-a1c99a1e537b 10Gi RWO zfssa-block-vs-example-sc 62s ``` 3. Display the volume snapshot class The command `kubectl get volumesnapshotclass` should now return something similar to this: ```text NAME DRIVER DELETIONPOLICY AGE - zfssa-block-vs-example-vsc zfssa-csi-driver Delete 100s + zfssa-block-example-vsc zfssa-csi-driver Delete 100s ``` 4. Display the pod mounting the volume @@ -67,7 +60,7 @@ Once deployed, verify each of the created entities using kubectl: ```text NAME READY STATUS RESTARTS AGE snapshot-controller-0 1/1 Running 0 14d - zfssa-block-vs-example-pod 1/1 Running 0 2m11s + zfssa-block-example-pod 1/1 Running 0 2m11s zfssa-csi-nodeplugin-7kj5m 2/2 Running 0 3m11s zfssa-csi-nodeplugin-rgfzf 2/2 Running 0 3m11s zfssa-csi-provisioner-0 4/4 Running 0 3m11s @@ -78,7 +71,7 @@ Once deployed, verify each of the created entities using kubectl: Once the pod is deployed, verify the block volume is mounted and can be written. ```text -kubectl exec -it zfssa-block-vs-example-pod -- /bin/sh +kubectl exec -it zfssa-block-example-pod -- /bin/sh / # cd /dev /dev # @@ -93,13 +86,13 @@ Alternatively, `cat /dev/block` followed by `CTRL-C` can be used to view the tim ## Creating snapshot -Use configuration files in examples/block-snapshot directory with proper modifications +Use configuration files in examples/block-vsc/block-snapshot-user directory with proper modifications for the rest of the example steps. Create a snapshot of the volume by running the command below: ```text -kubectl apply -f ../block-snapshot/block-snapshot.yaml +kubectl apply -f block-snapshot-user/block-snapshot.yaml ``` Verify the volume snapshot is created and available by running the following command: @@ -113,8 +106,8 @@ It is important to use the RESTORESIZE value of the volume snapshot just created the storage capacity of a persistent volume claim to provision a persistent volume using this snapshot. For example, the storage capacity in ../block-snapshot/block-pvc-from-snapshot.yaml -Optionally, verify the volume snapshot exists on ZFS Storage Appliance. The snapshot name -on ZFS Storage Appliance should have the volume snapshot UID as the suffix. +Optionally, verify the volume snapshot exists on the Oracle ZFS Storage Appliance. The snapshot name +on Oracle ZFS Storage Appliance should have the volume snapshot UID as the suffix. ## Creating persistent volume claim @@ -124,7 +117,7 @@ is not expandable. Create a new storage class with allowVolumeExpansion: true an specifying the persistent volume claim. ```text -kubectl apply -f ../block-snapshot/block-pvc-from-snapshot.yaml +kubectl apply -f block-snapshot-user/block-pvc-from-snapshot.yaml ``` Verify the persistent volume claim is created and a volume is provisioned by running the following command: @@ -140,11 +133,11 @@ persistentvolume/pvc-477804b4-e592-4039-a77c-a1c99a1e537b 10Gi RWO persistentvolume/pvc-91f949f6-5d77-4183-bab5-adfdb1452a90 10Gi RWO Delete Bound default/zfssa-block-vs-restore-pvc zfssa-block-vs-example-sc 11s NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE -persistentvolumeclaim/zfssa-block-vs-example-pvc Bound pvc-477804b4-e592-4039-a77c-a1c99a1e537b 10Gi RWO zfssa-block-vs-example-sc 13m +persistentvolumeclaim/zfssa-block-example-pvc Bound pvc-477804b4-e592-4039-a77c-a1c99a1e537b 10Gi RWO zfssa-block-vs-example-sc 13m persistentvolumeclaim/zfssa-block-vs-restore-pvc Bound pvc-91f949f6-5d77-4183-bab5-adfdb1452a90 10Gi RWO zfssa-block-vs-example-sc 16s ``` -Optionally, verify the new volume exists on ZFS Storage Appliance. Notice that the new +Optionally, verify the new volume exists on the Oracle ZFS Storage Appliance. Notice that the new volume is a clone off the snapshot taken from the original volume. ## Creating pod using restored volume @@ -152,14 +145,14 @@ volume is a clone off the snapshot taken from the original volume. Create a pod with the persistent volume claim created from the above step by running the command below: ```text -kubectl apply -f ../block-snapshot/block-pod-restored-volume.yaml +kubectl apply -f block-snapshot-user/block-pod-restored-volume.yaml ``` The command `kubectl get pod` should now return something similar to this: ```text NAME READY STATUS RESTARTS AGE snapshot-controller-0 1/1 Running 0 14d -zfssa-block-vs-example-pod 1/1 Running 0 15m +zfssa-block-example-pod 1/1 Running 0 15m zfssa-block-vs-restore-pod 1/1 Running 0 21s zfssa-csi-nodeplugin-7kj5m 2/2 Running 0 16m zfssa-csi-nodeplugin-rgfzf 2/2 Running 0 16m @@ -187,7 +180,12 @@ run the following commands below. Wait until the resources being deleted disappe the list that `kubectl get ...` command displays before running the next command. ```text -kubectl delete -f ../block-snapshot/block-pod-restored-volume.yaml -kubectl delete -f ../block-snapshot/block-pvc-from-snapshot.yaml -kubectl delete -f ../block-snapshot/block-snapshot.yaml +kubectl delete -f block-snapshot-user/block-pod-restored-volume.yaml +kubectl delete -f block-snapshot-user/block-pvc-from-snapshot.yaml +kubectl delete -f block-snapshot-user/block-snapshot.yaml ``` + +Uninstall the helm chart +```text +helm uninstall zfssa-block-vsc +``` \ No newline at end of file diff --git a/examples/block-vsc/Chart.yaml b/examples/block-vsc/block-snapshot-creator/Chart.yaml similarity index 100% rename from examples/block-vsc/Chart.yaml rename to examples/block-vsc/block-snapshot-creator/Chart.yaml diff --git a/examples/block-vsc/templates/00-storage-class.yaml b/examples/block-vsc/block-snapshot-creator/templates/00-storage-class.yaml similarity index 93% rename from examples/block-vsc/templates/00-storage-class.yaml rename to examples/block-vsc/block-snapshot-creator/templates/00-storage-class.yaml index 70d6865..6def88c 100644 --- a/examples/block-vsc/templates/00-storage-class.yaml +++ b/examples/block-vsc/block-snapshot-creator/templates/00-storage-class.yaml @@ -16,5 +16,5 @@ parameters: rootUser: {{ .Values.appliance.rootUser }} rootGroup: {{ .Values.appliance.rootGroup }} rootPermissions: "777" - shareNFS: "on" + shareNFS: {{ .Values.appliance.shareNFS }} restrictChown: "false" diff --git a/examples/block-vsc/templates/01-pvc.yaml b/examples/block-vsc/block-snapshot-creator/templates/01-pvc.yaml similarity index 100% rename from examples/block-vsc/templates/01-pvc.yaml rename to examples/block-vsc/block-snapshot-creator/templates/01-pvc.yaml diff --git a/examples/block-vsc/templates/02-volume-snapshot-class.yaml b/examples/block-vsc/block-snapshot-creator/templates/02-volume-snapshot-class.yaml similarity index 73% rename from examples/block-vsc/templates/02-volume-snapshot-class.yaml rename to examples/block-vsc/block-snapshot-creator/templates/02-volume-snapshot-class.yaml index 65f7840..2101e6e 100644 --- a/examples/block-vsc/templates/02-volume-snapshot-class.yaml +++ b/examples/block-vsc/block-snapshot-creator/templates/02-volume-snapshot-class.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotClass metadata: name: {{ .Values.vscBlockName }} diff --git a/examples/block-vsc/templates/03-pod.yaml b/examples/block-vsc/block-snapshot-creator/templates/03-pod.yaml similarity index 81% rename from examples/block-vsc/templates/03-pod.yaml rename to examples/block-vsc/block-snapshot-creator/templates/03-pod.yaml index 2450b52..c9d4934 100644 --- a/examples/block-vsc/templates/03-pod.yaml +++ b/examples/block-vsc/block-snapshot-creator/templates/03-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/block-vsc/values.yaml b/examples/block-vsc/block-snapshot-creator/values.yaml similarity index 77% rename from examples/block-vsc/values.yaml rename to examples/block-vsc/block-snapshot-creator/values.yaml index e45cb18..4d7df3f 100644 --- a/examples/block-vsc/values.yaml +++ b/examples/block-vsc/block-snapshot-creator/values.yaml @@ -4,6 +4,13 @@ vscBlockName: zfssa-block-example-vsc pvcBlockName: zfssa-block-example-pvc podBlockName: zfssa-block-example-pod +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/block-snapshot/block-pod-restored-volume.yaml b/examples/block-vsc/block-snapshot-user/block-pod-restored-volume.yaml similarity index 100% rename from examples/block-snapshot/block-pod-restored-volume.yaml rename to examples/block-vsc/block-snapshot-user/block-pod-restored-volume.yaml diff --git a/examples/block-snapshot/block-pvc-from-snapshot.yaml b/examples/block-vsc/block-snapshot-user/block-pvc-from-snapshot.yaml similarity index 94% rename from examples/block-snapshot/block-pvc-from-snapshot.yaml rename to examples/block-vsc/block-snapshot-user/block-pvc-from-snapshot.yaml index cea2be9..e29d209 100644 --- a/examples/block-snapshot/block-pvc-from-snapshot.yaml +++ b/examples/block-vsc/block-snapshot-user/block-pvc-from-snapshot.yaml @@ -13,4 +13,4 @@ spec: volumeMode: Block resources: requests: - storage: 68796 + storage: 80Ki diff --git a/examples/block-vsc/block-snapshot-user/block-snapshot.yaml b/examples/block-vsc/block-snapshot-user/block-snapshot.yaml new file mode 100644 index 0000000..f485ac4 --- /dev/null +++ b/examples/block-vsc/block-snapshot-user/block-snapshot.yaml @@ -0,0 +1,8 @@ +apiVersion: snapshot.storage.k8s.io/v1 +kind: VolumeSnapshot +metadata: + name: zfssa-block-vs-snapshot +spec: + volumeSnapshotClassName: zfssa-block-example-vsc + source: + persistentVolumeClaimName: zfssa-block-example-pvc diff --git a/examples/block/templates/00-storage-class.yaml b/examples/block/templates/00-storage-class.yaml index 70d6865..6def88c 100644 --- a/examples/block/templates/00-storage-class.yaml +++ b/examples/block/templates/00-storage-class.yaml @@ -16,5 +16,5 @@ parameters: rootUser: {{ .Values.appliance.rootUser }} rootGroup: {{ .Values.appliance.rootGroup }} rootPermissions: "777" - shareNFS: "on" + shareNFS: {{ .Values.appliance.shareNFS }} restrictChown: "false" diff --git a/examples/block/templates/02-pod.yaml b/examples/block/templates/02-pod.yaml index 2450b52..c9d4934 100644 --- a/examples/block/templates/02-pod.yaml +++ b/examples/block/templates/02-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/block/values.yaml b/examples/block/values.yaml index 93138a2..1281bd3 100644 --- a/examples/block/values.yaml +++ b/examples/block/values.yaml @@ -3,6 +3,13 @@ scBlockName: zfssa-block-example-sc pvcBlockName: zfssa-block-example-pvc podBlockName: zfssa-block-example-pod +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/nfs-exp/templates/02-pod.yaml b/examples/nfs-exp/templates/02-pod.yaml index f2976cc..29f509c 100644 --- a/examples/nfs-exp/templates/02-pod.yaml +++ b/examples/nfs-exp/templates/02-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/nfs-exp/values.yaml b/examples/nfs-exp/values.yaml index 452839c..f613783 100644 --- a/examples/nfs-exp/values.yaml +++ b/examples/nfs-exp/values.yaml @@ -3,6 +3,13 @@ scNfsName: zfssa-nfs-exp-example-sc pvcNfsName: zfssa-nfs-exp-example-pvc podNfsName: zfssa-nfs-exp-example-pod +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/nfs-multi/templates/02-pod.yaml b/examples/nfs-multi/templates/02-pod.yaml index fc91305..3d20350 100644 --- a/examples/nfs-multi/templates/02-pod.yaml +++ b/examples/nfs-multi/templates/02-pod.yaml @@ -10,7 +10,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/nfs-multi/values.yaml b/examples/nfs-multi/values.yaml index 007943c..73d826d 100644 --- a/examples/nfs-multi/values.yaml +++ b/examples/nfs-multi/values.yaml @@ -8,6 +8,13 @@ pvc4: ssp-many podNfsMultiName: zfssa-nfs-multi-example-pod namespace: zfssa-nfs-multi +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/nfs-pv/templates/00-storage-class.yaml b/examples/nfs-pv/templates/00-storage-class.yaml index b6c6482..e180ea2 100644 --- a/examples/nfs-pv/templates/00-storage-class.yaml +++ b/examples/nfs-pv/templates/00-storage-class.yaml @@ -16,5 +16,5 @@ parameters: rootUser: {{ .Values.appliance.rootUser }} rootGroup: {{ .Values.appliance.rootGroup }} rootPermissions: "777" - shareNFS: "on" + shareNFS: {{ .Values.appliance.shareNFS }} restrictChown: "false" diff --git a/examples/nfs-pv/templates/03-pod.yaml b/examples/nfs-pv/templates/03-pod.yaml index fe25201..2922702 100644 --- a/examples/nfs-pv/templates/03-pod.yaml +++ b/examples/nfs-pv/templates/03-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/nfs-pv/values.yaml b/examples/nfs-pv/values.yaml index b9a7971..97f78a5 100644 --- a/examples/nfs-pv/values.yaml +++ b/examples/nfs-pv/values.yaml @@ -5,6 +5,13 @@ pvcExistingFilesystemName: zfssa-fs-existing-pvc podExistingFilesystemName: zfssa-fs-existing-pod applianceName: OVERRIDE +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/nfs-vsc/README.md b/examples/nfs-vsc/README.md index c9eabe5..e9e1974 100644 --- a/examples/nfs-vsc/README.md +++ b/examples/nfs-vsc/README.md @@ -8,6 +8,19 @@ Prior to running this example, the NFS environment must be set up properly on both the Kubernetes worker nodes and the Oracle ZFS Storage Appliance. Refer to the [INSTALLATION](../../INSTALLATION.md) instructions for details. +There is a helm deployment in this example that handles initial setup of a volume +and a snapshot class: +* [Create and use initial volume](./nfs-snapshot-creator) + +Then a set of resources that have to applied in order, outside a helm deployment. +* [Create and use snapshot](./nfs-snapshot-user) + +The values between the deployments have to be coordinated though a local values +file and edited in the resource files. Because the creation and usage of the snapshot +does not use helm, the resource descriptions have to be modified based on +the environment for the example. There are more variables in the example then +in others, read carefully. + ## Configuration Set up a local values files. It must contain the values that customize to the @@ -20,29 +33,19 @@ customize are: * nfsServer: the NFS data path IP address * volSize: the size of the filesystem share to create -## Enabling Volume Snapshot Feature (Only for Kubernetes v1.17 - v1.19) - -The Kubernetes Volume Snapshot feature became GA in Kubernetes v1.20. In order to use -this feature in Kubernetes pre-v1.20, it MUST be enabled prior to deploying ZS CSI Driver. -To enable the feature on Kubernetes pre-v1.20, follow the instructions on -[INSTALLATION](../../INSTALLATION.md). - -## Deployment +## Initial share creation This step includes deploying a pod with an NFS volume attached using a regular storage class and a persistent volume claim. It also deploys a volume snapshot class -required to take snapshots of the persistent volume. +required to take snapshots of the persistent volume in a later section. -Assuming there is a set of values in the local-values directory, deploy using Helm 3. If you plan to exercise creating volume from a snapshot with given yaml files as they are, define the names in the local-values.yaml as follows. You can modify them as per your preference. -```text -scNfsName: zfssa-nfs-vs-example-sc -vscNfsName: zfssa-nfs-vs-example-vsc -pvcNfsName: zfssa-nfs-vs-example-pvc -podNfsName: zfssa-nfs-vs-example-pod -``` +From the nfs-vsc directory, the command to create the initial volume and snapshot +looks similar to the following (depending on your environment). Remember it is +always useful to use 'helm template' prior to installing to ensure the setup will +be correct. ```text -helm ../install -f local-values/local-values.yaml zfssa-nfs-vsc ./ +helm install -f local-values/local-values.yaml zfssa-nfs-vsc ./nfs-snapshot-creator ``` Once deployed, verify each of the created entities using kubectl: @@ -94,13 +97,13 @@ Tue Jan 19 23:13:10 UTC 2021 ## Creating snapshot -Use configuration files in examples/nfs-snapshot directory with proper modifications +Use configuration files in the nfs-snapshot-user directory with proper modifications for the rest of the example steps. Create a snapshot of the volume by running the command below: ```text -kubectl apply -f ../nfs-snapshot/nfs-snapshot.yaml +kubectl apply -f nfs-snapshot-user/nfs-snapshot.yaml ``` Verify the volume snapshot is created and available by running the following command: @@ -112,10 +115,10 @@ kubectl get volumesnapshot Wait until the READYTOUSE of the snapshot becomes true before moving on to the next steps. It is important to use the RESTORESIZE value of the volume snapshot just created when specifying the storage capacity of a persistent volume claim to provision a persistent volume using this -snapshot. For example, the storage capacity in ../nfs-snapshot/nfs-pvc-from-snapshot.yaml +snapshot. For example, the storage capacity in nfs-snapshot-user/nfs-pvc-from-snapshot.yaml. -Optionally, verify the volume snapshot exists on ZFS Storage Appliance. The snapshot name -on ZFS Storage Appliance should have the volume snapshot UID as the suffix. +Optionally, verify the volume snapshot exists on the Oracle ZFS Storage Appliance. The snapshot name +on the Oracle ZFS Storage Appliance should have the volume snapshot UID as the suffix. ## Creating persistent volume claim @@ -124,9 +127,8 @@ the command below. Be aware that the persistent volume provisioned by this persi is not expandable. Create a new storage class with allowVolumeExpansion: true and use it when specifying the persistent volume claim. - ```text -kubectl apply -f ../nfs-snapshot/nfs-pvc-from-snapshot.yaml +kubectl apply -f nfs-snapshot-user/nfs-pvc-from-snapshot.yaml ``` Verify the persistent volume claim is created and a volume is provisioned by running the following command: @@ -146,7 +148,7 @@ persistentvolumeclaim/zfssa-nfs-vs-example-pvc Bound pvc-0c1e5351-dc1b-45a4 persistentvolumeclaim/zfssa-nfs-vs-restore-pvc Bound pvc-59d8d447-302d-4438-a751-7271fbbe8238 10Gi RWO zfssa-nfs-vs-example-sc 116s ``` -Optionally, verify the new volume exists on ZFS Storage Appliance. Notice that the new +Optionally, verify the new volume exists on the Oracle ZFS Storage Appliance. Notice that the new volume is a clone off the snapshot taken from the original volume. ## Creating pod using restored volume @@ -154,7 +156,7 @@ volume is a clone off the snapshot taken from the original volume. Create a pod with the persistent volume claim created from the above step by running the command below: ```text -kubectl apply -f ../nfs-snapshot/nfs-pod-restored-volume.yaml +kubectl apply -f nfs-snapshot-user/nfs-pod-restored-volume.yaml ``` The command `kubectl get pod` should now return something similar to this: @@ -187,7 +189,12 @@ run the following commands below. Wait until the resources being deleted disappe the list that `kubectl get ...` command displays before running the next command. ```text -kubectl delete -f ../nfs-snapshot/nfs-pod-restored-volume.yaml -kubectl delete -f ../nfs-snapshot/nfs-pvc-from-snapshot.yaml -kubectl delete -f ../nfs-snapshot/nfs-snapshot.yaml +kubectl delete -f nfs-snapshot-user/nfs-pod-restored-volume.yaml +kubectl delete -f nfs-snapshot-user/nfs-pvc-from-snapshot.yaml +kubectl delete -f nfs-snapshot-user/nfs-snapshot.yaml +``` + +Once the clones and snapshots are deleted, uninstall the initial helm deployment: +```text +helm uninstall zfssa-nfs-vsc ``` diff --git a/examples/nfs-vsc/Chart.yaml b/examples/nfs-vsc/nfs-snapshot-creator/Chart.yaml similarity index 100% rename from examples/nfs-vsc/Chart.yaml rename to examples/nfs-vsc/nfs-snapshot-creator/Chart.yaml diff --git a/examples/nfs-vsc/templates/00-storage-class.yaml b/examples/nfs-vsc/nfs-snapshot-creator/templates/00-storage-class.yaml similarity index 100% rename from examples/nfs-vsc/templates/00-storage-class.yaml rename to examples/nfs-vsc/nfs-snapshot-creator/templates/00-storage-class.yaml diff --git a/examples/nfs-vsc/templates/01-pvc.yaml b/examples/nfs-vsc/nfs-snapshot-creator/templates/01-pvc.yaml similarity index 100% rename from examples/nfs-vsc/templates/01-pvc.yaml rename to examples/nfs-vsc/nfs-snapshot-creator/templates/01-pvc.yaml diff --git a/examples/nfs-vsc/templates/02-volume-snapshot-class.yaml b/examples/nfs-vsc/nfs-snapshot-creator/templates/02-volume-snapshot-class.yaml similarity index 72% rename from examples/nfs-vsc/templates/02-volume-snapshot-class.yaml rename to examples/nfs-vsc/nfs-snapshot-creator/templates/02-volume-snapshot-class.yaml index 8cecd2b..ca66845 100644 --- a/examples/nfs-vsc/templates/02-volume-snapshot-class.yaml +++ b/examples/nfs-vsc/nfs-snapshot-creator/templates/02-volume-snapshot-class.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotClass metadata: name: {{ .Values.vscNfsName }} diff --git a/examples/nfs-vsc/templates/03-pod.yaml b/examples/nfs-vsc/nfs-snapshot-creator/templates/03-pod.yaml similarity index 82% rename from examples/nfs-vsc/templates/03-pod.yaml rename to examples/nfs-vsc/nfs-snapshot-creator/templates/03-pod.yaml index f2976cc..29f509c 100644 --- a/examples/nfs-vsc/templates/03-pod.yaml +++ b/examples/nfs-vsc/nfs-snapshot-creator/templates/03-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/nfs-vsc/values.yaml b/examples/nfs-vsc/nfs-snapshot-creator/values.yaml similarity index 77% rename from examples/nfs-vsc/values.yaml rename to examples/nfs-vsc/nfs-snapshot-creator/values.yaml index d2bd0fe..aa70ce6 100644 --- a/examples/nfs-vsc/values.yaml +++ b/examples/nfs-vsc/nfs-snapshot-creator/values.yaml @@ -4,6 +4,13 @@ vscNfsName: zfssa-nfs-vs-example-vsc pvcNfsName: zfssa-nfs-vs-example-pvc podNfsName: zfssa-nfs-vs-example-pod +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin diff --git a/examples/nfs-snapshot/nfs-pod-restored-volume.yaml b/examples/nfs-vsc/nfs-snapshot-user/nfs-pod-restored-volume.yaml similarity index 100% rename from examples/nfs-snapshot/nfs-pod-restored-volume.yaml rename to examples/nfs-vsc/nfs-snapshot-user/nfs-pod-restored-volume.yaml diff --git a/examples/nfs-snapshot/nfs-pvc-from-snapshot.yaml b/examples/nfs-vsc/nfs-snapshot-user/nfs-pvc-from-snapshot.yaml similarity index 100% rename from examples/nfs-snapshot/nfs-pvc-from-snapshot.yaml rename to examples/nfs-vsc/nfs-snapshot-user/nfs-pvc-from-snapshot.yaml diff --git a/examples/nfs-snapshot/nfs-snapshot.yaml b/examples/nfs-vsc/nfs-snapshot-user/nfs-snapshot.yaml similarity index 80% rename from examples/nfs-snapshot/nfs-snapshot.yaml rename to examples/nfs-vsc/nfs-snapshot-user/nfs-snapshot.yaml index 747f98a..67d2e31 100644 --- a/examples/nfs-snapshot/nfs-snapshot.yaml +++ b/examples/nfs-vsc/nfs-snapshot-user/nfs-snapshot.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: zfssa-nfs-vs-snapshot diff --git a/examples/nfs/README.md b/examples/nfs/README.md index 964f522..9a9e370 100644 --- a/examples/nfs/README.md +++ b/examples/nfs/README.md @@ -23,14 +23,14 @@ customize are: Check out the parameters section of the storage class configuration file (storage-class.yaml) to see all supporting properties. Refer to NFS Protocol page of Oracle ZFS Storage Appliance -Administration Guide how to defind the values properly. +Administration Guide how to define the values properly. ## Deployment Assuming there is a set of values in the local-values directory, deploy using Helm 3: ``` -helm install -f local-values/local-values.yaml zfssa-nfs ./nfs +helm install -f local-values/local-values.yaml zfssa-nfs ./nfs ``` Once deployed, verify each of the created entities using kubectl: @@ -71,7 +71,7 @@ Once deployed, verify each of the created entities using kubectl: Once the pod is deployed, for demo, start the following analytics in a worksheet on the Oracle ZFS Storage Appliance that is hosting the target filesystems: -Exec into the pod and write some data to the block volume: +Exec into the pod and write some data to the volume: ```yaml kubectl exec -it zfssa-nfs-example-pod -- /bin/sh / # cd /mnt diff --git a/examples/nfs/templates/02-pod.yaml b/examples/nfs/templates/02-pod.yaml index f2976cc..29f509c 100644 --- a/examples/nfs/templates/02-pod.yaml +++ b/examples/nfs/templates/02-pod.yaml @@ -7,7 +7,7 @@ metadata: spec: restartPolicy: Always containers: - - image: container-registry.oracle.com/os/oraclelinux:7-slim + - image: {{ .Values.imageBase }}{{ .Values.images.os.name }}:{{ .Values.images.os.tag }} command: ["/bin/sh", "-c"] args: [ "tail -f /dev/null" ] name: ol7slim diff --git a/examples/nfs/values.yaml b/examples/nfs/values.yaml index b7e182d..b20ce41 100644 --- a/examples/nfs/values.yaml +++ b/examples/nfs/values.yaml @@ -3,6 +3,13 @@ scNfsName: zfssa-nfs-example-sc pvcNfsName: zfssa-nfs-example-pvc podNfsName: zfssa-nfs-example-pod +# Location for images used +imageBase: container-registry.oracle.com/os/ +images: + os: + name: oraclelinux + tag: "7-slim" + # Settings for target appliance appliance: volumeType: thin @@ -13,7 +20,7 @@ appliance: nfsServer: OVERRIDE rootUser: root rootGroup: other - shareNFS: "on" + shareNFS: '"on"' # Settings for volume volSize: OVERRIDE diff --git a/go.mod b/go.mod index 2bd0b5b..bee7ce2 100644 --- a/go.mod +++ b/go.mod @@ -1,53 +1,111 @@ module github.com/oracle/zfssa-csi-driver -go 1.13 +go 1.21 require ( - github.com/container-storage-interface/spec v1.2.0 - github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect - github.com/golang/protobuf v1.4.0 - github.com/kubernetes-csi/csi-lib-iscsi v0.0.0-20190415173011-c545557492f4 - github.com/kubernetes-csi/csi-lib-utils v0.6.1 - github.com/onsi/gomega v1.9.0 // indirect - github.com/prometheus/client_golang v1.2.1 // indirect - golang.org/x/net v0.0.0-20191101175033-0deb6923b6d9 - golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect - google.golang.org/grpc v1.23.1 - gopkg.in/yaml.v2 v2.2.8 - k8s.io/apimachinery v0.17.11 - k8s.io/client-go v0.18.2 - k8s.io/klog v1.0.0 - k8s.io/kubernetes v1.17.5 - k8s.io/utils v0.0.0-20191114184206-e782cd3c129f + github.com/container-storage-interface/spec v1.6.0 + github.com/golang/protobuf v1.5.2 + github.com/kubernetes-csi/csi-lib-iscsi v0.0.0-20240129182017-28f091c08ef7 + github.com/kubernetes-csi/csi-lib-utils v0.11.0 + golang.org/x/net v0.7.0 + google.golang.org/grpc v1.47.0 + gopkg.in/yaml.v3 v3.0.1 + k8s.io/apimachinery v0.25.7 + k8s.io/client-go v0.25.7 + k8s.io/klog/v2 v2.90.1 + k8s.io/kubernetes v1.25.7 + k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed +) + +require ( + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.14 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/moby/sys/mountinfo v0.6.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/opencontainers/selinux v1.10.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + k8s.io/api v0.25.7 // indirect + k8s.io/apiserver v0.25.7 // indirect + k8s.io/cloud-provider v0.0.0 // indirect + k8s.io/component-base v0.25.7 // indirect + k8s.io/component-helpers v0.25.7 // indirect + k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect + k8s.io/mount-utils v0.0.0 // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect ) replace ( - k8s.io/api => k8s.io/api v0.17.5 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.5 - k8s.io/apimachinery => k8s.io/apimachinery v0.17.6-beta.0 - k8s.io/apiserver => k8s.io/apiserver v0.17.5 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.17.5 - k8s.io/client-go => k8s.io/client-go v0.17.5 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.17.5 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.17.5 - k8s.io/code-generator => k8s.io/code-generator v0.17.6-beta.0 - k8s.io/component-base => k8s.io/component-base v0.17.5 - k8s.io/cri-api => k8s.io/cri-api v0.17.13-rc.0 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.17.5 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.17.5 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.17.5 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.17.5 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.17.5 - k8s.io/kubelet => k8s.io/kubelet v0.17.5 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.17.5 - k8s.io/metrics => k8s.io/metrics v0.17.5 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.17.5 + k8s.io/api => k8s.io/api v0.25.7 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.7 + k8s.io/apimachinery => k8s.io/apimachinery v0.25.9 + k8s.io/apiserver => k8s.io/apiserver v0.25.7 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.7 + k8s.io/client-go => k8s.io/client-go v0.25.7 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.25.7 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.25.7 + k8s.io/code-generator => k8s.io/code-generator v0.25.9 + k8s.io/component-base => k8s.io/component-base v0.25.7 + k8s.io/cri-api => k8s.io/cri-api v0.25.9 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.25.7 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.25.7 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.25.7 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.25.7 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.25.7 + k8s.io/kubelet => k8s.io/kubelet v0.25.7 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.25.7 + k8s.io/metrics => k8s.io/metrics v0.25.7 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.25.7 ) -replace k8s.io/kubectl => k8s.io/kubectl v0.17.5 +replace k8s.io/kubectl => k8s.io/kubectl v0.25.7 replace k8s.io/node-api => k8s.io/node-api v0.17.5 -replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.17.5 +replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.25.7 -replace k8s.io/sample-controller => k8s.io/sample-controller v0.17.5 +replace k8s.io/sample-controller => k8s.io/sample-controller v0.25.7 + +replace k8s.io/component-helpers => k8s.io/component-helpers v0.25.7 + +replace k8s.io/controller-manager => k8s.io/controller-manager v0.25.7 + +replace k8s.io/mount-utils => k8s.io/mount-utils v0.25.9 + +replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.25.7 diff --git a/pkg/service/cluster.go b/pkg/service/cluster.go index d7d47e3..b8f77e5 100644 --- a/pkg/service/cluster.go +++ b/pkg/service/cluster.go @@ -1,11 +1,12 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ package service import ( + "context" "errors" "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -14,12 +15,11 @@ import ( ) var ( - clusterConfig *rest.Config - clientset *kubernetes.Clientset + clusterConfig *rest.Config + clientset *kubernetes.Clientset ) // Initializes the cluster interface. -// func InitClusterInterface() error { var err error @@ -37,10 +37,9 @@ func InitClusterInterface() error { } // Returns the node name based on the passed in node ID. -// -func GetNodeName(nodeID string) (string, error) { - nodeInfo, err := clientset.CoreV1().Nodes().Get(nodeID, metav1.GetOptions{ - TypeMeta: metav1.TypeMeta{ +func GetNodeName(ctx context.Context, nodeID string) (string, error) { + nodeInfo, err := clientset.CoreV1().Nodes().Get(ctx, nodeID, metav1.GetOptions{ + TypeMeta: metav1.TypeMeta{ Kind: "", APIVersion: "", }, @@ -55,11 +54,10 @@ func GetNodeName(nodeID string) (string, error) { } // Returns the list of nodes in the form of a slice containing their name. -// -func GetNodeList() ([]string, error) { +func GetNodeList(ctx context.Context) ([]string, error) { - nodeList, err := clientset.CoreV1().Nodes().List(metav1.ListOptions{ - TypeMeta: metav1.TypeMeta{ + nodeList, err := clientset.CoreV1().Nodes().List(ctx, metav1.ListOptions{ + TypeMeta: metav1.TypeMeta{ Kind: "", APIVersion: "", }, @@ -70,8 +68,8 @@ func GetNodeList() ([]string, error) { return nil, err } - var nodeNameList []string - for _, node:= range nodeList.Items { + var nodeNameList []string + for _, node := range nodeList.Items { nodeNameList = append(nodeNameList, node.Name) } diff --git a/pkg/service/controller.go b/pkg/service/controller.go index 3b0e012..c0a4560 100644 --- a/pkg/service/controller.go +++ b/pkg/service/controller.go @@ -1,15 +1,15 @@ /* - * Copyright (c) 2021, 2022, Oracle. + * Copyright (c) 2021, 2024, Oracle. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ package service import ( - "github.com/oracle/zfssa-csi-driver/pkg/utils" - "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" "github.com/container-storage-interface/spec/lib/go/csi" "github.com/kubernetes-csi/csi-lib-utils/protosanitizer" + "github.com/oracle/zfssa-csi-driver/pkg/utils" + "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -17,7 +17,7 @@ import ( ) var ( - // the current controller service accessModes supported + // controller service capabilities supported controllerCaps = []csi.ControllerServiceCapability_RPC_Type{ csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME, csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME, @@ -26,6 +26,7 @@ var ( csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, csi.ControllerServiceCapability_RPC_LIST_SNAPSHOTS, + // csi.ControllerServiceCapability_RPC_CLONE_VOLUME, } ) @@ -51,6 +52,7 @@ func (zd *ZFSSADriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRe return nil, err } + // TODO: check if pool/project are populated if the storage class is left out on volume cloneVolume parameters := req.GetParameters() pool := parameters["pool"] project := parameters["project"] @@ -59,21 +61,32 @@ func (zd *ZFSSADriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRe if err != nil { return nil, err } - defer zd.releaseVolume(ctx, zvol) + defer zd.releaseVolume(ctx, zvol) + // Check if there is a source for the new volume if volumeContentSource := req.GetVolumeContentSource(); volumeContentSource != nil { - if snapshot := volumeContentSource.GetSnapshot(); snapshot != nil { + switch volumeContentSource.Type.(type) { + case *csi.VolumeContentSource_Snapshot: + snapshot := volumeContentSource.GetSnapshot() + utils.GetLogCTRL(ctx, 5).Println("CreateSnapshot", "request", snapshot) zsnap, err := zd.lookupSnapshot(ctx, token, snapshot.GetSnapshotId()) if err != nil { return nil, err } - defer zd.releaseSnapshot(ctx, zsnap) + defer zd.releaseSnapshot(ctx, zsnap) return zvol.cloneSnapshot(ctx, token, req, zsnap) + case *csi.VolumeContentSource_Volume: + volume := volumeContentSource.GetVolume() + utils.GetLogCTRL(ctx, 5).Println("CreateVolumeClone", "request", volume) + // cloneVolume creation is complex, delegate out to it + return zvol.cloneVolume(ctx, token, req) + default: + return nil, status.Errorf(codes.InvalidArgument, "%v type not implemented in driver", + volumeContentSource.GetType()) } - return nil, status.Error(codes.InvalidArgument, "Only snapshots are supported as content source") - } else { - return zvol.create(ctx, token, req) } + + return zvol.create(ctx, token, req) } // Retrieve the volume size from the request (if not available, use a default) @@ -91,9 +104,8 @@ func getVolumeSize(capRange *csi.CapacityRange) int64 { // Check whether the access mode of the volume to create is "block" or "filesystem" // -// true block access mode -// false filesystem access mode -// +// true block access mode +// false filesystem access mode func isBlock(capabilities []*csi.VolumeCapability) bool { for _, capacity := range capabilities { if capacity.GetBlock() == nil { @@ -104,7 +116,6 @@ func isBlock(capabilities []*csi.VolumeCapability) bool { } // Validates as much of the "create volume request" as possible -// func validateCreateVolumeReq(ctx context.Context, token *zfssarest.Token, req *csi.CreateVolumeRequest) error { log5 := utils.GetLogCTRL(ctx, 5) @@ -149,7 +160,7 @@ func validateCreateVolumeReq(ctx context.Context, token *zfssarest.Token, req *c } if pool.Status != "online" && pool.Status != "degraded" { - log5.Println("Pool not ready", "State", pool.Status) + log5.Println("Pool not ready", "State", pool.Status) return status.Errorf(codes.InvalidArgument, "pool %s in an error state (%s)", poolName, pool.Status) } @@ -239,7 +250,7 @@ func (zd *ZFSSADriver) ControllerPublishVolume(ctx context.Context, req *csi.Con return nil, status.Error(codes.InvalidArgument, "Capability not provided") } - nodeName, err := GetNodeName(nodeID) + nodeName, err := GetNodeName(ctx, nodeID) if err != nil { return nil, status.Errorf(codes.NotFound, "Node (%s) was not found: %v", req.NodeId, err) } @@ -378,7 +389,7 @@ func (zd *ZFSSADriver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequ rsp := &csi.ListVolumesResponse{ NextToken: nextToken, - Entries: entries, + Entries: entries, } return rsp, nil @@ -387,7 +398,7 @@ func (zd *ZFSSADriver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequ func (zd *ZFSSADriver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) ( *csi.GetCapacityResponse, error) { - utils.GetLogCTRL(ctx,5).Println("GetCapacity", "request", protosanitizer.StripSecrets(req)) + utils.GetLogCTRL(ctx, 5).Println("GetCapacity", "request", protosanitizer.StripSecrets(req)) reqCaps := req.GetVolumeCapabilities() if len(reqCaps) > 0 { @@ -448,14 +459,14 @@ func (zd *ZFSSADriver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequ } availableCapacity = project.SpaceAvailable } - + return &csi.GetCapacityResponse{AvailableCapacity: availableCapacity}, nil } func (zd *ZFSSADriver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) ( *csi.ControllerGetCapabilitiesResponse, error) { - utils.GetLogCTRL(ctx,5).Println("ControllerGetCapabilities", + utils.GetLogCTRL(ctx, 5).Println("ControllerGetCapabilities", "request", protosanitizer.StripSecrets(req)) var caps []*csi.ControllerServiceCapability @@ -501,7 +512,7 @@ func (zd *ZFSSADriver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapsh func (zd *ZFSSADriver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) ( *csi.DeleteSnapshotResponse, error) { - utils.GetLogCTRL(ctx, 5).Println("DeleteSnapshot", "request", protosanitizer.StripSecrets(req)) + utils.GetLogCTRL(ctx, 5).Println("DeleteSnapshot", "request", protosanitizer.StripSecrets(req)) if len(req.GetSnapshotId()) == 0 { return nil, status.Errorf(codes.InvalidArgument, "no snapshot ID provided") @@ -577,11 +588,11 @@ func (zd *ZFSSADriver) ListSnapshots(ctx context.Context, req *csi.ListSnapshots if err == nil { entry := new(csi.ListSnapshotsResponse_Entry) entry.Snapshot = &csi.Snapshot{ - SnapshotId: zsnap.id.String(), - SizeBytes: zsnap.getSize(), + SnapshotId: zsnap.id.String(), + SizeBytes: zsnap.getSize(), SourceVolumeId: zsnap.getStringSourceId(), - CreationTime: zsnap.getCreationTime(), - ReadyToUse: true, + CreationTime: zsnap.getCreationTime(), + ReadyToUse: true, } zd.releaseSnapshot(ctx, zsnap) utils.GetLogCTRL(ctx, 5).Println("ListSnapshots with snapshot ID", "Snapshot", zsnap.getHref()) @@ -623,7 +634,7 @@ func (zd *ZFSSADriver) ListSnapshots(ctx context.Context, req *csi.ListSnapshots rsp := &csi.ListSnapshotsResponse{ NextToken: nextToken, - Entries: entries, + Entries: entries, } return rsp, nil @@ -659,6 +670,44 @@ func (zd *ZFSSADriver) ControllerExpandVolume(ctx context.Context, req *csi.Cont return zvol.controllerExpandVolume(ctx, token, req) } +func (zd *ZFSSADriver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) ( + *csi.ControllerGetVolumeResponse, error) { + + utils.GetLogCTRL(ctx, 5).Println("ControllerGetVolume", "request", protosanitizer.StripSecrets(req)) + + log2 := utils.GetLogCTRL(ctx, 2) + + volumeID := req.GetVolumeId() + if len(volumeID) == 0 { + log2.Println("Volume ID not provided, will return") + return nil, status.Error(codes.InvalidArgument, "Volume ID not provided") + } + + // req does not contain a secret map + user, password, err := zd.getUserLogin(ctx, nil) + if err != nil { + return nil, status.Error(codes.Unauthenticated, "Invalid credentials") + } + token := zfssarest.LookUpToken(ctx, user, password) + + zvol, err := zd.lookupVolume(ctx, token, volumeID) + if err != nil { + log2.Println("ControllerGetVolume request failed, bad VolumeId", + "volume_id", volumeID, "error", err.Error()) + return nil, err + } + defer zd.releaseVolume(ctx, zvol) + + return &csi.ControllerGetVolumeResponse{ + Volume: &csi.Volume{ + VolumeId: volumeID, + CapacityBytes: zvol.getCapacity(), + }, + // VolumeStatus is not required if LIST_VOLUMES_PUBLISHED_NODES and VOLUME_CONDITION + // are not implemented + }, nil +} + // Check the secrets map (typically in a request context) for a change in the username // and password or retrieve the username/password from the credentials file, the username // and password should be scrubbed quickly after use and not remain in memory diff --git a/pkg/service/controller_block.go b/pkg/service/controller_block.go index e5645c9..da77692 100644 --- a/pkg/service/controller_block.go +++ b/pkg/service/controller_block.go @@ -1,16 +1,16 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ package service import ( - "github.com/oracle/zfssa-csi-driver/pkg/utils" - "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" "context" "fmt" "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/oracle/zfssa-csi-driver/pkg/utils" + "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" context2 "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -20,22 +20,22 @@ import ( // ZFSSA block volume type zLUN struct { - bolt *utils.Bolt - refcount int32 - state volumeState - href string - id *utils.VolumeId - capacity int64 - accessModes []csi.VolumeCapability_AccessMode - source *csi.VolumeContentSource - initiatorgroup []string - targetgroup string`` + bolt *utils.Bolt + refcount int32 + state volumeState + href string + id *utils.VolumeId + capacity int64 + accessModes []csi.VolumeCapability_AccessMode + source *csi.VolumeContentSource + initiatorgroup []string + targetgroup string `` } var ( // access modes supported by block volumes. - blockVolumeCaps = []csi.VolumeCapability_AccessMode { - { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER }, + blockVolumeCaps = []csi.VolumeCapability_AccessMode{ + {Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER}, } ) @@ -58,8 +58,8 @@ func (lun *zLUN) create(ctx context.Context, token *zfssarest.Token, capacityRange := req.GetCapacityRange() capabilities := req.GetVolumeCapabilities() - _, luninfo, httpStatus, err := zfssarest.CreateLUN(ctx, token, - req.GetName(), getVolumeSize(capacityRange), &req.Parameters) + _, luninfo, httpStatus, err := zfssarest.CreateLUN(ctx, token, + req.GetName(), getVolumeSize(capacityRange), &req.Parameters) if err != nil { if httpStatus != http.StatusConflict { lun.state = stateDeleted @@ -67,47 +67,47 @@ func (lun *zLUN) create(ctx context.Context, token *zfssarest.Token, } utils.GetLogCTRL(ctx, 5).Println("LUN already exits") - // The creation failed because the appliance already has a LUN - // with the same name. We get the information from the appliance, + // The creation failed because the appliance already has a LUN + // with the same name. We get the information from the appliance, // update the LUN context and check its compatibility with the request. if lun.state == stateCreated { - luninfo, _, err := zfssarest.GetLun(ctx, token, - req.Parameters["pool"], req.Parameters["project"], req.GetName()) + luninfo, _, err := zfssarest.GetLun(ctx, token, + req.Parameters["pool"], req.Parameters["project"], req.GetName()) if err != nil { return nil, err } lun.setInfo(luninfo) } - + // The LUN has already been created. The compatibility of the // capacity range and accessModes is checked. if !compareCapacityRange(capacityRange, lun.capacity) { - return nil, - status.Errorf(codes.AlreadyExists, - "Volume (%s) is already on target (%s),"+ + return nil, + status.Errorf(codes.AlreadyExists, + "Volume (%s) is already on target (%s),"+ " capacity range incompatible (%v), requested (%v/%v)", - lun.id.Name, lun.id.Zfssa, lun.capacity, - capacityRange.RequiredBytes, capacityRange.LimitBytes) + lun.id.Name, lun.id.Zfssa, lun.capacity, + capacityRange.RequiredBytes, capacityRange.LimitBytes) } if !compareCapabilities(capabilities, lun.accessModes, true) { - return nil, - status.Errorf(codes.AlreadyExists, - "Volume (%s) is already on target (%s), accessModes are incompatible", - lun.id.Name, lun.id.Zfssa) + return nil, + status.Errorf(codes.AlreadyExists, + "Volume (%s) is already on target (%s), accessModes are incompatible", + lun.id.Name, lun.id.Zfssa) } } else { lun.setInfo(luninfo) } utils.GetLogCTRL(ctx, 5).Printf( - "LUN created: name=%s, target=%s, assigned_number=%d", + "LUN created: name=%s, target=%s, assigned_number=%d", luninfo.CanonicalName, luninfo.TargetGroup, luninfo.AssignedNumber[0]) return &csi.CreateVolumeResponse{ Volume: &csi.Volume{ - VolumeId: lun.id.String(), - CapacityBytes: lun.capacity, - VolumeContext: req.GetParameters()}}, nil + VolumeId: lun.id.String(), + CapacityBytes: lun.capacity, + VolumeContext: req.GetParameters()}}, nil } func (lun *zLUN) cloneSnapshot(ctx context.Context, token *zfssarest.Token, @@ -152,6 +152,17 @@ func (lun *zLUN) delete(ctx context.Context, token *zfssarest.Token) (*csi.Delet return &csi.DeleteVolumeResponse{}, nil } +func (lun *zLUN) cloneVolume(ctx context.Context, token *zfssarest.Token, + req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { + + // Create a snapshot to base the clone on + + // Clone the snapshot to the volume + + utils.GetLogCTRL(ctx, 5).Println("lun.cloneVolume") + return nil, status.Error(codes.Unimplemented, "LUN cloneVolume not implemented yet") +} + func (lun *zLUN) controllerPublishVolume(ctx context.Context, token *zfssarest.Token, req *csi.ControllerPublishVolumeRequest, nodeName string) (*csi.ControllerPublishVolumeResponse, error) { @@ -167,12 +178,12 @@ func (lun *zLUN) controllerPublishVolume(ctx context.Context, token *zfssarest.T return nil, err } - // When the driver creates a LUN or clones a Lun from a snapshot of another Lun, - // it masks the intiator group of the Lun using zfssarest.MaskAll value. + // When the driver creates a LUN or clones a Lun from a snapshot of another Lun, + // it masks the initiator group of the Lun using zfssarest.MaskAll value. // When the driver unpublishes the Lun, it also masks the initiator group. - // This block is to test if the Lun to publish was created or unpublished + // This block is to test if the Lun to publish was created or unpublished // by the driver. Publishing a Lun with unmasked initiator group fails - // to avoid mistakenly publishing a Lun that may be in use by other entity. + // to avoid mistakenly publishing a Lun that may be in use by other entity. utils.GetLogCTRL(ctx, 5).Printf("Volume to publish: %s:%s", lun.id, list[0]) if len(list) != 1 || list[0] != zfssarest.MaskAll { var msg string @@ -184,7 +195,7 @@ func (lun *zLUN) controllerPublishVolume(ctx context.Context, token *zfssarest.T return nil, status.Error(codes.FailedPrecondition, msg) } - // Reset the masked initiator group with one named by the current node name. + // Reset the masked initiator group with one named by the current node name. // There must be initiator groups on ZFSSA defined by the node names. _, err = zfssarest.SetInitiatorGroupList(ctx, token, pool, project, name, nodeName) if err != nil { @@ -285,15 +296,15 @@ func (lun *zLUN) getSnapshotsList(ctx context.Context, token *zfssarest.Token) ( return zfssaSnapshotList2csiSnapshotList(ctx, token.Name, snapList), nil } -func (lun *zLUN) getState() volumeState { return lun.state } -func (lun *zLUN) getName() string { return lun.id.Name } -func (lun *zLUN) getHref() string { return lun.href } +func (lun *zLUN) getState() volumeState { return lun.state } +func (lun *zLUN) getName() string { return lun.id.Name } +func (lun *zLUN) getHref() string { return lun.href } func (lun *zLUN) getVolumeID() *utils.VolumeId { return lun.id } -func (lun *zLUN) getCapacity() int64 { return lun.capacity } -func (lun *zLUN) isBlock() bool { return true } +func (lun *zLUN) getCapacity() int64 { return lun.capacity } +func (lun *zLUN) isBlock() bool { return true } func (lun *zLUN) getSnapshots(ctx context.Context, token *zfssarest.Token) ([]zfssarest.Snapshot, error) { - return zfssarest.GetSnapshots(ctx, token, lun.href) + return zfssarest.GetSnapshots(ctx, token, lun.href) } func (lun *zLUN) setInfo(volInfo interface{}) { @@ -329,7 +340,7 @@ func (lun *zLUN) lock(ctx context.Context) volumeState { return lun.state } -func (lun *zLUN) unlock(ctx context.Context) (int32, volumeState){ +func (lun *zLUN) unlock(ctx context.Context) (int32, volumeState) { lun.bolt.Unlock(ctx) utils.GetLogCTRL(ctx, 5).Printf("%s is unlocked", lun.id.String()) return lun.refcount, lun.state diff --git a/pkg/service/controller_fs.go b/pkg/service/controller_fs.go index a927eff..ae49c01 100644 --- a/pkg/service/controller_fs.go +++ b/pkg/service/controller_fs.go @@ -1,15 +1,16 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ package service import ( - "github.com/oracle/zfssa-csi-driver/pkg/utils" - "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" "context" "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/kubernetes-csi/csi-lib-utils/protosanitizer" + "github.com/oracle/zfssa-csi-driver/pkg/utils" + "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" context2 "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -19,25 +20,25 @@ import ( var ( filesystemAccessModes = []csi.VolumeCapability_AccessMode{ - { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER }, - { Mode: csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER }, - { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY }, - { Mode: csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY }, - { Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY }, + {Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER}, + {Mode: csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER}, + {Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY}, + {Mode: csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY}, + {Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY}, } ) // ZFSSA mount volume type zFilesystem struct { - bolt *utils.Bolt - refcount int32 - state volumeState - href string - id *utils.VolumeId - capacity int64 - accessModes []csi.VolumeCapability_AccessMode - source *csi.VolumeContentSource - mountpoint string + bolt *utils.Bolt + refcount int32 + state volumeState + href string + id *utils.VolumeId + capacity int64 + accessModes []csi.VolumeCapability_AccessMode + source *csi.VolumeContentSource + mountpoint string } // Creates a new filesysyem structure. If no information is provided (fsinfo is nil), this @@ -58,8 +59,18 @@ func (fs *zFilesystem) create(ctx context.Context, token *zfssarest.Token, capacityRange := req.GetCapacityRange() capabilities := req.GetVolumeCapabilities() - fsinfo, httpStatus, err := zfssarest.CreateFilesystem(ctx, token, - req.GetName(), getVolumeSize(capacityRange), &req.Parameters) + if _, ok := req.Parameters["restrictChown"]; !ok { + utils.GetLogCTRL(ctx, 5).Println("Adding restrictChown to CreateFilesystem req parameters") + req.Parameters["restrictChown"] = "false" + } + + if _, ok := req.Parameters["shareNFS"]; !ok { + utils.GetLogCTRL(ctx, 5).Println("Adding shareNFS to CreateFilesystem req parameters") + req.Parameters["shareNFS"] = "on" + } + + fsinfo, httpStatus, err := zfssarest.CreateFilesystem(ctx, token, + req.GetName(), getVolumeSize(capacityRange), &req.Parameters) if err != nil { if httpStatus != http.StatusConflict { fs.state = stateDeleted @@ -71,43 +82,43 @@ func (fs *zFilesystem) create(ctx context.Context, token *zfssarest.Token, // with the same name. We get the information from the appliance, update // the file system context and check its compatibility with the request. if fs.state == stateCreated { - fsinfo, _, err = zfssarest.GetFilesystem(ctx, token, - req.Parameters["pool"], req.Parameters["project"], req.GetName()) + fsinfo, _, err = zfssarest.GetFilesystem(ctx, token, + req.Parameters["pool"], req.Parameters["project"], req.GetName()) if err != nil { return nil, err } fs.setInfo(fsinfo) - // pass mountpoint as a volume context value to use for nfs mount to the pod - req.Parameters["mountpoint"] = fs.mountpoint + // pass mountpoint as a volume context value to use for nfs mount to the pod + req.Parameters["mountpoint"] = fs.mountpoint } // The volume has already been created. The compatibility of the // capacity range and accessModes is checked. if !compareCapacityRange(capacityRange, fs.capacity) { - return nil, - status.Errorf(codes.AlreadyExists, - "Volume (%s) is already on target (%s),"+ + return nil, + status.Errorf(codes.AlreadyExists, + "Volume (%s) is already on target (%s),"+ " capacity range incompatible (%v), requested (%v/%v)", - fs.id.Name, fs.id.Zfssa, fs.capacity, - capacityRange.RequiredBytes, capacityRange.LimitBytes) + fs.id.Name, fs.id.Zfssa, fs.capacity, + capacityRange.RequiredBytes, capacityRange.LimitBytes) } if !compareCapabilities(capabilities, fs.accessModes, false) { - return nil, - status.Errorf(codes.AlreadyExists, - "Volume (%s) is already on target (%s), accessModes are incompatible", - fs.id.Name, fs.id.Zfssa) + return nil, + status.Errorf(codes.AlreadyExists, + "Volume (%s) is already on target (%s), accessModes are incompatible", + fs.id.Name, fs.id.Zfssa) } } else { fs.setInfo(fsinfo) - // pass mountpoint as a volume context value to use for nfs mount to the pod - req.Parameters["mountpoint"] = fs.mountpoint + // pass mountpoint as a volume context value to use for nfs mount to the pod + req.Parameters["mountpoint"] = fs.mountpoint } return &csi.CreateVolumeResponse{ Volume: &csi.Volume{ - VolumeId: fs.id.String(), - CapacityBytes: fs.capacity, - VolumeContext: req.Parameters}}, nil + VolumeId: fs.id.String(), + CapacityBytes: fs.capacity, + VolumeContext: req.Parameters}}, nil } func (fs *zFilesystem) cloneSnapshot(ctx context.Context, token *zfssarest.Token, @@ -125,8 +136,8 @@ func (fs *zFilesystem) cloneSnapshot(ctx context.Context, token *zfssarest.Token } fs.setInfo(fsinfo) - // pass mountpoint as a volume context value to use for nfs mount to the pod - req.Parameters["mountpoint"] = fs.mountpoint + // pass mountpoint as a volume context value to use for nfs mount to the pod + req.Parameters["mountpoint"] = fs.mountpoint return &csi.CreateVolumeResponse{ Volume: &csi.Volume{ @@ -160,20 +171,29 @@ func (fs *zFilesystem) delete(ctx context.Context, token *zfssarest.Token) (*csi return &csi.DeleteVolumeResponse{}, nil } +func (lun *zFilesystem) cloneVolume(ctx context.Context, token *zfssarest.Token, + req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { + utils.GetLogCTRL(ctx, 5).Println("cloneVolume", "request", protosanitizer.StripSecrets(req)) + + // Create a snapshot to base the clone on + + // Clone the snapshot to the volume + + utils.GetLogCTRL(ctx, 5).Println("fs.cloneVolume") + return nil, status.Error(codes.Unimplemented, "Filesystem cloneVolume not implemented yet") +} + // Publishes a file system. In this case there's nothing to do. -// func (fs *zFilesystem) controllerPublishVolume(ctx context.Context, token *zfssarest.Token, req *csi.ControllerPublishVolumeRequest, nodeName string) (*csi.ControllerPublishVolumeResponse, error) { - // Note: the volume context of the volume provisioned from an existing share does not have the mountpoint. + // Note: the volume context of the volume provisioned from an existing share does not have the mountpoint. // Use the share (corresponding to volumeAttributes.share of PV configuration) to define the mountpoint. return &csi.ControllerPublishVolumeResponse{}, nil } - // Unpublishes a file system. In this case there's nothing to do. -// func (fs *zFilesystem) controllerUnpublishVolume(ctx context.Context, token *zfssarest.Token, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) { utils.GetLogCTRL(ctx, 5).Println("fs.controllerUnpublishVolume") @@ -206,7 +226,7 @@ func (fs *zFilesystem) controllerExpandVolume(ctx context.Context, token *zfssar reqCapacity := req.GetCapacityRange().RequiredBytes if fs.capacity >= reqCapacity { return &csi.ControllerExpandVolumeResponse{ - CapacityBytes: fs.capacity, + CapacityBytes: fs.capacity, NodeExpansionRequired: false, }, nil } @@ -221,8 +241,8 @@ func (fs *zFilesystem) controllerExpandVolume(ctx context.Context, token *zfssar fs.capacity = fsinfo.Quota return &csi.ControllerExpandVolumeResponse{ - CapacityBytes: fsinfo.Quota, - NodeExpansionRequired: false, + CapacityBytes: fsinfo.Quota, + NodeExpansionRequired: false, }, nil } @@ -270,12 +290,12 @@ func (fs *zFilesystem) getSnapshotsList(ctx context.Context, token *zfssarest.To return zfssaSnapshotList2csiSnapshotList(ctx, token.Name, snapList), nil } -func (fs *zFilesystem) getState() volumeState { return fs.state } -func (fs *zFilesystem) getName() string { return fs.id.Name } -func (fs *zFilesystem) getHref() string { return fs.href } +func (fs *zFilesystem) getState() volumeState { return fs.state } +func (fs *zFilesystem) getName() string { return fs.id.Name } +func (fs *zFilesystem) getHref() string { return fs.href } func (fs *zFilesystem) getVolumeID() *utils.VolumeId { return fs.id } -func (fs *zFilesystem) getCapacity() int64 { return fs.capacity } -func (fs *zFilesystem) isBlock() bool { return false } +func (fs *zFilesystem) getCapacity() int64 { return fs.capacity } +func (fs *zFilesystem) isBlock() bool { return false } func (fs *zFilesystem) setInfo(volInfo interface{}) { @@ -309,7 +329,7 @@ func (fs *zFilesystem) lock(ctx context.Context) volumeState { return fs.state } -func (fs *zFilesystem) unlock(ctx context.Context) (int32, volumeState){ +func (fs *zFilesystem) unlock(ctx context.Context) (int32, volumeState) { fs.bolt.Unlock(ctx) utils.GetLogCTRL(ctx, 5).Printf("%s is unlocked", fs.id.String()) return fs.refcount, fs.state diff --git a/pkg/service/iscsi.go b/pkg/service/iscsi.go index 6323c99..cf85ba5 100644 --- a/pkg/service/iscsi.go +++ b/pkg/service/iscsi.go @@ -6,15 +6,15 @@ package service import ( - "github.com/oracle/zfssa-csi-driver/pkg/utils" "bytes" "context" "encoding/json" "fmt" "github.com/container-storage-interface/spec/lib/go/csi" iscsi_lib "github.com/kubernetes-csi/csi-lib-iscsi/iscsi" - "k8s.io/utils/mount" + "github.com/oracle/zfssa-csi-driver/pkg/utils" "k8s.io/kubernetes/pkg/volume/util" + "k8s.io/utils/mount" "os" "os/exec" "path" @@ -24,12 +24,12 @@ import ( // A subset of the iscsiadm type IscsiAdmReturnValues int32 -const( - ISCSI_SUCCESS IscsiAdmReturnValues = 0 - ISCSI_ERR_SESS_NOT_FOUND = 2 - ISCSI_ERR_TRANS_TIMEOUT = 8 - ISCSI_ERR_ISCSID_NOTCONN = 20 - ISCSI_ERR_NO_OBJS_FOUND = 21 +const ( + ISCSI_SUCCESS IscsiAdmReturnValues = 0 + ISCSI_ERR_SESS_NOT_FOUND = 2 + ISCSI_ERR_TRANS_TIMEOUT = 8 + ISCSI_ERR_ISCSID_NOTCONN = 20 + ISCSI_ERR_NO_OBJS_FOUND = 21 ) func GetISCSIInfo(ctx context.Context, vid *utils.VolumeId, req *csi.NodePublishVolumeRequest, targetIqn string, @@ -92,9 +92,9 @@ func GetISCSIInfo(ctx context.Context, vid *utils.VolumeId, req *csi.NodePublish utils.GetLogCTRL(ctx, 5).Println("Final values", "iface", iface, "initiatorName", initiatorName) i := iscsiDisk{ - VolName: volName, + VolName: volName, Portals: bkportal, - Iqn: iqn, + Iqn: iqn, lun: assignedLunNumber, Iface: iface, chapDiscovery: chapDiscovery, @@ -160,9 +160,9 @@ func GetNodeISCSIInfo(vid *utils.VolumeId, req *csi.NodePublishVolumeRequest, ta } i := iscsiDisk{ - VolName: volName, + VolName: volName, Portals: bkportal, - Iqn: iqn, + Iqn: iqn, lun: assignedLunNumber, Iface: iface, chapDiscovery: chapDiscovery, @@ -180,8 +180,7 @@ func buildISCSIConnector(iscsiInfo *iscsiDisk) *iscsi_lib.Connector { VolumeName: iscsiInfo.VolName, TargetIqn: iscsiInfo.Iqn, TargetPortals: iscsiInfo.Portals, - Lun: iscsiInfo.lun, - Multipath: len(iscsiInfo.Portals) > 1, + Lun: iscsiInfo.lun, } if iscsiInfo.sessionSecret != (iscsi_lib.Secrets{}) { @@ -314,10 +313,9 @@ type iscsiDiskUnmounter struct { mounter mount.Interface } - type ISCSIUtil struct{} -func (util *ISCSIUtil) Rescan (ctx context.Context) (string, error) { +func (util *ISCSIUtil) Rescan(ctx context.Context) (string, error) { cmd := exec.Command("iscsiadm", "-m", "session", "--rescan") var stdout bytes.Buffer var iscsiadmError error @@ -337,9 +335,9 @@ func (util *ISCSIUtil) Rescan (ctx context.Context) (string, error) { formattedOutput := strings.Replace(string(stdout.Bytes()), "\n", "", -1) iscsiadmError = fmt.Errorf("iscsiadm error: %s (%s)", formattedOutput, err.Error()) } - return string(stdout.Bytes()), iscsiadmError - } - + return string(stdout.Bytes()), iscsiadmError + } + err = cmd.Wait() if err != nil { exitCode := err.(*exec.ExitError).ExitCode() @@ -459,7 +457,7 @@ func (util *ISCSIUtil) DetachDisk(ctx context.Context, c iscsiDiskUnmounter, tar return err } - err = iscsi_lib.Disconnect(connector.TargetIqn, connector.TargetPortals) + iscsi_lib.Disconnect(connector.TargetIqn, connector.TargetPortals) if err := os.RemoveAll(targetPath); err != nil { return err } diff --git a/pkg/service/node.go b/pkg/service/node.go index db50fc2..2fb674d 100644 --- a/pkg/service/node.go +++ b/pkg/service/node.go @@ -1,26 +1,26 @@ /* - * Copyright (c) 2021, 2022, Oracle. + * Copyright (c) 2021, 2024, Oracle. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ package service import ( + "fmt" + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/oracle/zfssa-csi-driver/pkg/utils" "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" - "fmt" - "os" - "github.com/container-storage-interface/spec/lib/go/csi" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "os" ) var ( // nodeCaps represents the capability of node service. nodeCaps = []csi.NodeServiceCapability_RPC_Type{ csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME, -// csi.NodeServiceCapability_RPC_EXPAND_VOLUME, + // csi.NodeServiceCapability_RPC_EXPAND_VOLUME, csi.NodeServiceCapability_RPC_UNKNOWN, } ) @@ -31,7 +31,7 @@ func NewZFSSANodeServer(zd *ZFSSADriver) *csi.NodeServer { return &ns } -func (zd *ZFSSADriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) ( +func (zd *ZFSSADriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) ( *csi.NodeStageVolumeResponse, error) { utils.GetLogNODE(ctx, 5).Println("NodeStageVolume", "request", req) @@ -102,7 +102,7 @@ func (zd *ZFSSADriver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnsta if err != nil { return nil, status.Errorf(codes.Internal, "Cannot unmount staging target %q: %v", target, err) } - + notMnt, mntErr := zd.NodeMounter.IsLikelyNotMountPoint(target) if mntErr != nil { utils.GetLogNODE(ctx, 2).Println("Cannot determine staging target path", diff --git a/pkg/service/node_fs.go b/pkg/service/node_fs.go index 17adbf7..0754f9c 100644 --- a/pkg/service/node_fs.go +++ b/pkg/service/node_fs.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ @@ -10,9 +10,9 @@ import ( "os" "strings" + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/oracle/zfssa-csi-driver/pkg/utils" "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" - "github.com/container-storage-interface/spec/lib/go/csi" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -75,11 +75,18 @@ func (zd *ZFSSADriver) nodeUnpublishFilesystemVolume(token *zfssarest.Token, return nil, status.Error(codes.InvalidArgument, "Target path not provided") } + if _, pathErr := os.Stat(targetPath); os.IsNotExist(pathErr) { + //targetPath doesn't exist; nothing to do + utils.GetLogNODE(ctx, 2).Println("nodeUnpublishFilesystemVolume targetPath doesn't exist", targetPath) + return &csi.NodeUnpublishVolumeResponse{}, nil + } err := zd.NodeMounter.Unmount(targetPath) if err != nil { utils.GetLogNODE(ctx, 2).Println("Cannot unmount volume", "volume_id", req.GetVolumeId(), "error", err.Error()) - return nil, status.Error(codes.Internal, err.Error()) + if !strings.Contains(err.Error(), "not mounted") { + return nil, status.Error(codes.Internal, err.Error()) + } } notMnt, mntErr := zd.NodeMounter.IsLikelyNotMountPoint(targetPath) diff --git a/pkg/service/service.go b/pkg/service/service.go index 5b6321a..0f69a57 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -13,7 +13,7 @@ import ( "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" "golang.org/x/net/context" "google.golang.org/grpc" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "io/ioutil" "net" "os" diff --git a/pkg/service/volumes.go b/pkg/service/volumes.go index ecd5bd9..981d229 100644 --- a/pkg/service/volumes.go +++ b/pkg/service/volumes.go @@ -1,14 +1,14 @@ /* - * Copyright (c) 2021, 2022, Oracle. + * Copyright (c) 2021, 2024, Oracle. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ package service import ( + "github.com/container-storage-interface/spec/lib/go/csi" "github.com/oracle/zfssa-csi-driver/pkg/utils" "github.com/oracle/zfssa-csi-driver/pkg/zfssarest" - "github.com/container-storage-interface/spec/lib/go/csi" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -58,7 +58,7 @@ import ( // volume source. // -type volumeState int +type volumeState int const ( stateCreating volumeState = iota @@ -71,7 +71,7 @@ type zVolumeInterface interface { create(ctx context.Context, token *zfssarest.Token, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) delete(ctx context.Context, token *zfssarest.Token, - ) (*csi.DeleteVolumeResponse, error) + ) (*csi.DeleteVolumeResponse, error) controllerPublishVolume(ctx context.Context, token *zfssarest.Token, req *csi.ControllerPublishVolumeRequest, nodeName string) (*csi.ControllerPublishVolumeResponse, error) controllerUnpublishVolume(ctx context.Context, token *zfssarest.Token, @@ -92,6 +92,8 @@ type zVolumeInterface interface { req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error) cloneSnapshot(ctx context.Context, token *zfssarest.Token, req *csi.CreateVolumeRequest, zsnap *zSnapshot) (*csi.CreateVolumeResponse, error) + cloneVolume(ctx context.Context, token *zfssarest.Token, + req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) getDetails(ctx context.Context, token *zfssarest.Token) (int, error) setInfo(volInfo interface{}) getSnapshotsList(context.Context, *zfssarest.Token) ([]*csi.ListSnapshotsResponse_Entry, error) @@ -107,20 +109,18 @@ type zVolumeInterface interface { isBlock() bool } - // This method must be called when the possibility of the volume not existing yet exists. // The following 3 scenarios are possible: // -// * The volume doesn't exists yet or it exists in the appliance but is not in the -// volume cache yet. Either way, a structure representing the volume is created -// in the stateCreating state, stored in the cache and a reference returned to the -// caller. -// * A structure representing the volume already exists in the cache and is in the -// stateCreated state. A reference is returned to the caller. -// * A structure representing the volume already exists in the cache and is NOT in -// the stateCreated state. This means the CO probably lost state and submitted multiple -// simultaneous requests for this volume. In this case an error is returned. -// +// - The volume doesn't exists yet or it exists in the appliance but is not in the +// volume cache yet. Either way, a structure representing the volume is created +// in the stateCreating state, stored in the cache and a reference returned to the +// caller. +// - A structure representing the volume already exists in the cache and is in the +// stateCreated state. A reference is returned to the caller. +// - A structure representing the volume already exists in the cache and is NOT in +// the stateCreated state. This means the CO probably lost state and submitted multiple +// simultaneous requests for this volume. In this case an error is returned. func (zd *ZFSSADriver) newVolume(ctx context.Context, pool, project, name string, block bool) (zVolumeInterface, error) { @@ -138,7 +138,7 @@ func (zd *ZFSSADriver) newVolume(ctx context.Context, pool, project, name string zvol := zd.vCache.lookup(ctx, name) if zvol != nil { // Volume already known. - utils.GetLogCTRL(ctx, 5).Println("zd.newVolume", "request", ) + utils.GetLogCTRL(ctx, 5).Println("zd.newVolume", "request") zvol.hold(ctx) zd.vCache.Unlock(ctx) if zvol.lock(ctx) != stateCreated { @@ -165,7 +165,8 @@ func (zd *ZFSSADriver) lookupVolume(ctx context.Context, token *zfssarest.Token, vid, err := utils.VolumeIdFromString(volumeId) if err != nil { - return nil, err + utils.GetLogCTRL(ctx, 2).Println("Failed to get volumeId from String", err.Error()) + return nil, status.Errorf(codes.NotFound, "Volume (%s) not found", volumeId) } // Check first in the list of volumes if the volume is already known. @@ -192,21 +193,21 @@ func (zd *ZFSSADriver) lookupVolume(ctx context.Context, token *zfssarest.Token, } switch zvol.getState() { - case stateCreating: // We check with the appliance. + case stateCreating: // We check with the appliance. httpStatus, err := zvol.getDetails(ctx, token) if err != nil { zd.releaseVolume(ctx, zvol) if httpStatus == http.StatusNotFound { - return nil, status.Error(codes.NotFound, "Volume (%s) not found") + return nil, status.Errorf(codes.NotFound, "Volume (%s) not found", volumeId) } return nil, err } return zvol, nil - case stateCreated: // Another Goroutine beat us to it. + case stateCreated: // Another Goroutine beat us to it. return zvol, nil default: zd.releaseVolume(ctx, zvol) - return nil, status.Error(codes.NotFound, "Volume (%s) not found") + return nil, status.Errorf(codes.NotFound, "Volume (%s) not found", volumeId) } } @@ -232,15 +233,16 @@ func (zd *ZFSSADriver) releaseVolume(ctx context.Context, zvol zVolumeInterface) // If a snapshot with the passed in name already exists, it is returned. If it doesn't exist, // a new snapshot structure is created and returned. This method could fail or reasons: // -// 1) A snapshot with the passed in name already exists but the volume source -// is not the volume source passed in. -// 2) A snapshot with the passed in name already exists but is not in the stateCreated -// state (or stable state). As for volumes, This would mean the CO lost state and -// issued simultaneous requests for the same snapshot. +// 1. A snapshot with the passed in name already exists but the volume source +// is not the volume source passed in. // -// If the call is successful, that caller has exclusive access to the snapshot and its volume -// source. When the snapshot returned is not needed anymore, the method releaseSnapshot() -// must be called. +// 2. A snapshot with the passed in name already exists but is not in the stateCreated +// state (or stable state). As for volumes, This would mean the CO lost state and +// issued simultaneous requests for the same snapshot. +// +// If the call is successful, that caller has exclusive access to the snapshot and its volume +// source. When the snapshot returned is not needed anymore, the method releaseSnapshot() +// must be called. func (zd *ZFSSADriver) newSnapshot(ctx context.Context, token *zfssarest.Token, name, sourceId string) (*zSnapshot, error) { @@ -287,13 +289,13 @@ func (zd *ZFSSADriver) newSnapshot(ctx context.Context, token *zfssarest.Token, // exclusive access to the returned snapshot and its volume source. This method could fail // for the following reasons: // -// 1) The source volume cannot be found locally or in the appliance. -// 2) The snapshot exists but is in an unstable state. This would mean the -// CO lost state and issued multiple simultaneous requests for the same -// snapshot. -// 3) There's an inconsistency between what the appliance thinks the volume -// source is and what the existing snapshot says it is (a panic is issued). -// 4) The snapshot cannot be found locally or in the appliance. +// 1. The source volume cannot be found locally or in the appliance. +// 2. The snapshot exists but is in an unstable state. This would mean the +// CO lost state and issued multiple simultaneous requests for the same +// snapshot. +// 3. There's an inconsistency between what the appliance thinks the volume +// source is and what the existing snapshot says it is (a panic is issued). +// 4. The snapshot cannot be found locally or in the appliance. func (zd *ZFSSADriver) lookupSnapshot(ctx context.Context, token *zfssarest.Token, snapshotId string) (*zSnapshot, error) { @@ -344,14 +346,14 @@ func (zd *ZFSSADriver) lookupSnapshot(ctx context.Context, token *zfssarest.Toke } switch zsnap.getState() { - case stateCreating: // We check with the appliance. + case stateCreating: // We check with the appliance. _, err = zsnap.getDetails(ctx, token) if err != nil { zd.releaseSnapshot(ctx, zsnap) return nil, err } return zsnap, nil - case stateCreated: // Another Goroutine beat us to it. + case stateCreated: // Another Goroutine beat us to it. return zsnap, nil default: zd.releaseSnapshot(ctx, zsnap) @@ -364,6 +366,7 @@ func (zd *ZFSSADriver) lookupSnapshot(ctx context.Context, token *zfssarest.Toke // a reference to the source volume and exclusive access to it. The volume source // is also released. func (zd *ZFSSADriver) releaseSnapshot(ctx context.Context, zsnap *zSnapshot) { + utils.GetLogCTRL(ctx, 5).Println("zd.releaseSnapshot", "zsnap", zsnap) zvol := zsnap.getSourceVolume() zd.sCache.RLock(ctx) refCount, state := zsnap.release(ctx) @@ -396,8 +399,8 @@ func (zd *ZFSSADriver) getVolumesList(ctx context.Context) ([]*csi.ListVolumesRe for _, zvol := range zd.vCache.vHash { entry := new(csi.ListVolumesResponse_Entry) entry.Volume = &csi.Volume{ - VolumeId: zvol.getVolumeID().String(), - CapacityBytes: zvol.getCapacity(), + VolumeId: zvol.getVolumeID().String(), + CapacityBytes: zvol.getCapacity(), } entries = append(entries, entry) } @@ -414,8 +417,8 @@ func (zd *ZFSSADriver) updateVolumeList(ctx context.Context) error { lunChan := make(chan error) go zd.updateFilesystemList(ctx, fsChan) go zd.updateLunList(ctx, lunChan) - errfs := <- fsChan - errlun := <- lunChan + errfs := <-fsChan + errlun := <-lunChan if errfs != nil { return errfs @@ -494,12 +497,12 @@ func (zd *ZFSSADriver) getSnapshotList(ctx context.Context) ([]*csi.ListSnapshot entries := make([]*csi.ListSnapshotsResponse_Entry, 0, len(zd.sCache.sHash)) for _, zsnap := range zd.sCache.sHash { entry := new(csi.ListSnapshotsResponse_Entry) - entry.Snapshot = &csi.Snapshot { - SizeBytes: zsnap.getSize(), - SnapshotId: zsnap.getStringId(), + entry.Snapshot = &csi.Snapshot{ + SizeBytes: zsnap.getSize(), + SnapshotId: zsnap.getStringId(), SourceVolumeId: zsnap.getStringSourceId(), - CreationTime: zsnap.getCreationTime(), - ReadyToUse: zsnap.getState() == stateCreated, + CreationTime: zsnap.getCreationTime(), + ReadyToUse: zsnap.getState() == stateCreated, } entries = append(entries, entry) } @@ -528,16 +531,22 @@ func (zd *ZFSSADriver) updateSnapshotList(ctx context.Context) error { } for _, snapInfo := range snapList { + utils.GetLogCTRL(ctx, 5).Println("zd.updateSnapshotList", "snapshotInfo", snapInfo) sid, err := utils.SnapshotIdFromHref(token.Name, snapInfo.Href) if err != nil { + utils.GetLogCTRL(ctx, 2).Println("zd.updateSnapshotList snapshotIdFromHref", "err", err) continue } + utils.GetLogCTRL(ctx, 2).Println("zd.updateSnapshotList newSnapshot") zsnap, err := zd.newSnapshot(ctx, token, snapInfo.Name, sid.VolumeId.String()) if err != nil { + utils.GetLogCTRL(ctx, 2).Println("zd.updateSnapshotList newSnapshot", "err", err) continue } + utils.GetLogCTRL(ctx, 2).Println("zd.updateSnapshotList setInfo") err = zsnap.setInfo(&snapInfo) if err != nil { + utils.GetLogCTRL(ctx, 2).Println("zd.updateSnapshotList setInfo", "err", err) continue } zd.releaseSnapshot(ctx, zsnap) @@ -581,8 +590,8 @@ func compareCapabilities(req []*csi.VolumeCapability, cur []csi.VolumeCapability } type volumeHashTable struct { - vMutex sync.RWMutex - vHash map[string]zVolumeInterface + vMutex sync.RWMutex + vHash map[string]zVolumeInterface } func (h *volumeHashTable) add(ctx context.Context, key string, zvol zVolumeInterface) { @@ -614,8 +623,8 @@ func (h *volumeHashTable) RUnlock(ctx context.Context) { } type snapshotHashTable struct { - sMutex sync.RWMutex - sHash map[string]*zSnapshot + sMutex sync.RWMutex + sHash map[string]*zSnapshot } func (h *snapshotHashTable) add(ctx context.Context, key string, zsnap *zSnapshot) { diff --git a/pkg/utils/log_utils.go b/pkg/utils/log_utils.go index 5bbca1e..f70de25 100644 --- a/pkg/utils/log_utils.go +++ b/pkg/utils/log_utils.go @@ -10,7 +10,7 @@ import ( "fmt" "golang.org/x/net/context" "io/ioutil" - "k8s.io/klog" + "k8s.io/klog/v2" "log" "os" "strconv" @@ -18,33 +18,33 @@ import ( ) const ( - CSID int = iota // CSI Driver - CTRL // Controller Service - NODE // Node Service - IDTY // Identity Service - REST // REST interface - UTIL // Utilities that may be controller or node + CSID int = iota // CSI Driver + CTRL // Controller Service + NODE // Node Service + IDTY // Identity Service + REST // REST interface + UTIL // Utilities that may be controller or node SENTINEL ) -const MAX_LEVEL int = 5 +const MAX_LEVEL int = 5 type zLogger struct { - prefix string - logger [MAX_LEVEL]*log.Logger + prefix string + logger [MAX_LEVEL]*log.Logger } // Type of the key being used to add the array of loggers to the context. -type zLoggersKey string +type zLoggersKey string var ( - reqCounter uint64 - logLevelStr string - logLevel int - loggersPrefix [SENTINEL]string - loggersTable [MAX_LEVEL]*log.Logger - loggersKey zLoggersKey = "zloggers" - loggerNOP *log.Logger + reqCounter uint64 + logLevelStr string + logLevel int + loggersPrefix [SENTINEL]string + loggersTable [MAX_LEVEL]*log.Logger + loggersKey zLoggersKey = "zloggers" + loggerNOP *log.Logger ) // Log service initialization. The original loggers are created with a prefix identifying the @@ -69,7 +69,7 @@ func InitLogs(level, driverName, version, nodeID string) { loggersPrefix[UTIL] = nodeID + "/" + driverName + "/" + version + "\n\t" for i := 0; i < MAX_LEVEL; i++ { - loggersTable[i] = log.New(os.Stdout, loggersPrefix[CSID] + "*** ", + loggersTable[i] = log.New(os.Stdout, loggersPrefix[CSID]+"*** ", log.Lmsgprefix|log.Ldate|log.Ltime|log.Lshortfile) } @@ -120,9 +120,9 @@ func getLogger(ctx context.Context, sel int, level int) *log.Logger { } // Public function returning the appropriate logger. -func GetLogCSID(ctx context.Context, level int) *log.Logger { return getLogger(ctx, CSID, level) } -func GetLogCTRL(ctx context.Context, level int) *log.Logger { return getLogger(ctx, CTRL, level) } -func GetLogNODE(ctx context.Context, level int) *log.Logger { return getLogger(ctx, NODE, level) } -func GetLogIDTY(ctx context.Context, level int) *log.Logger { return getLogger(ctx, IDTY, level) } -func GetLogREST(ctx context.Context, level int) *log.Logger { return getLogger(ctx, REST, level) } -func GetLogUTIL(ctx context.Context, level int) *log.Logger { return getLogger(ctx, UTIL, level) } +func GetLogCSID(ctx context.Context, level int) *log.Logger { return getLogger(ctx, CSID, level) } +func GetLogCTRL(ctx context.Context, level int) *log.Logger { return getLogger(ctx, CTRL, level) } +func GetLogNODE(ctx context.Context, level int) *log.Logger { return getLogger(ctx, NODE, level) } +func GetLogIDTY(ctx context.Context, level int) *log.Logger { return getLogger(ctx, IDTY, level) } +func GetLogREST(ctx context.Context, level int) *log.Logger { return getLogger(ctx, REST, level) } +func GetLogUTIL(ctx context.Context, level int) *log.Logger { return getLogger(ctx, UTIL, level) } diff --git a/pkg/utils/parser_utils.go b/pkg/utils/parser_utils.go index 1df3ef1..698a8d3 100644 --- a/pkg/utils/parser_utils.go +++ b/pkg/utils/parser_utils.go @@ -6,10 +6,10 @@ package utils import ( - "io/ioutil" - "gopkg.in/yaml.v2" "errors" "fmt" + "gopkg.in/yaml.v3" + "io/ioutil" ) func GetValueFromYAML(yamlFilePath string, key string) (string, error) { @@ -31,7 +31,7 @@ func GetValueFromYAML(yamlFilePath string, key string) (string, error) { value, ok := yamlMap[key] if !ok { return "", errors.New(fmt.Sprintf("key: <%s> could not be retrieved from <%s> : <%s>", - key, yamlFilePath, err)) + key, yamlFilePath, err)) } // Convert value to string and return return fmt.Sprintf("%v", value), nil diff --git a/pkg/utils/volume_id.go b/pkg/utils/volume_id.go index 95bf48a..3dcef87 100644 --- a/pkg/utils/volume_id.go +++ b/pkg/utils/volume_id.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ */ @@ -17,41 +17,42 @@ import ( ) const ( - VolumeIdLen = 6 - VolumeHandleLen = 8 - SnapshotIdLen = 7 - VolumeHrefLen = 10 - SnapshotHrefLen = 12 + VolumeMinComponents = 2 + VolumeIdLen = 6 + VolumeHandleLen = 8 + SnapshotIdLen = 7 + VolumeHrefLen = 10 + SnapshotHrefLen = 12 ) const ( - BlockVolume string = "lun" - MountVolume = "mnt" + BlockVolume string = "lun" + MountVolume = "mnt" ) const ( ResourceNamePattern string = `^[a-zA-Z0-9_\-\.\:]+$` - ResourceNameLength int = 64 + ResourceNameLength int = 64 ) // Volume ID // --------- // This structure is what identifies a volume (lun or filesystem). type VolumeId struct { - Type string - Zfssa string - Pool string - Project string - Name string + Type string + Zfssa string + Pool string + Project string + Name string } func NewVolumeId(vType, zfssaName, pool, project, name string) *VolumeId { return &VolumeId{ - Type: vType, - Zfssa: zfssaName, - Pool: pool, + Type: vType, + Zfssa: zfssaName, + Pool: pool, Project: project, - Name: name, + Name: name, } } @@ -59,7 +60,7 @@ func VolumeIdStringFromHref(zfssa, hRef string) (string, error) { result := strings.Split(hRef, "/") if len(result) < VolumeHrefLen { return "", status.Errorf(codes.NotFound, - "Volume ID (%s) contains insufficient components (%d)",hRef, VolumeHrefLen) + "Volume ID (%s) contains insufficient components (%d)", hRef, VolumeHrefLen) } var vType string @@ -69,7 +70,7 @@ func VolumeIdStringFromHref(zfssa, hRef string) (string, error) { case "luns": vType = BlockVolume default: - return "", status.Errorf(codes.NotFound,"Invalid snapshot href (%s)", hRef) + return "", status.Errorf(codes.NotFound, "Invalid snapshot href (%s)", hRef) } return fmt.Sprintf("/%v/%v/%v/%v/%v", @@ -83,6 +84,12 @@ func VolumeIdStringFromHref(zfssa, hRef string) (string, error) { func VolumeIdFromString(volumeId string) (*VolumeId, error) { result := strings.Split(volumeId, "/") + if len(result) < VolumeMinComponents { + return nil, status.Errorf(codes.InvalidArgument, + "Volume ID/Handle (%s) contains insufficient components to continue handling (%d)", + volumeId, VolumeMinComponents) + } + var pool, project, share string switch result[1] { case "nfs", "iscsi": @@ -116,11 +123,11 @@ func VolumeIdFromString(volumeId string) (*VolumeId, error) { } return &VolumeId{ - Type: result[1], + Type: result[1], Zfssa: result[2], - Pool: pool, + Pool: pool, Project: project, - Name: share, + Name: share, }, nil } @@ -130,8 +137,10 @@ func (zvi *VolumeId) String() string { func (zvi *VolumeId) IsBlock() bool { switch zvi.Type { - case BlockVolume: return true - case MountVolume: return false + case BlockVolume: + return true + case MountVolume: + return false } return false } @@ -140,14 +149,14 @@ func (zvi *VolumeId) IsBlock() bool { // ----------- // This structure is what identifies a volume (lun or filesystem). type SnapshotId struct { - VolumeId *VolumeId - Name string + VolumeId *VolumeId + Name string } func NewSnapshotId(volumeId *VolumeId, snapshotName string) *SnapshotId { return &SnapshotId{ VolumeId: volumeId, - Name: snapshotName, + Name: snapshotName, } } @@ -161,23 +170,23 @@ func SnapshotIdFromString(snapshotId string) (*SnapshotId, error) { return &SnapshotId{ VolumeId: &VolumeId{ - Type: result[1], - Zfssa: result[2], - Pool: result[3], + Type: result[1], + Zfssa: result[2], + Pool: result[3], Project: result[4], - Name: result[5] }, - Name: result[6] }, nil + Name: result[5]}, + Name: result[6]}, nil } func SnapshotIdFromHref(zfssa, hRef string) (*SnapshotId, error) { result := strings.Split(hRef, "/") if len(result) < SnapshotHrefLen { return nil, status.Errorf(codes.NotFound, - "Snapshot ID (%s) contains insufficient components (%d)",hRef, SnapshotHrefLen) + "Snapshot ID (%s) contains insufficient components (%d)", hRef, SnapshotHrefLen) } if result[10] != "snapshots" { - return nil, status.Errorf(codes.NotFound,"Invalid snapshot href (%s)", hRef) + return nil, status.Errorf(codes.NotFound, "Invalid snapshot href (%s)", hRef) } var vType string @@ -187,28 +196,28 @@ func SnapshotIdFromHref(zfssa, hRef string) (*SnapshotId, error) { case "luns": vType = BlockVolume default: - return nil, status.Errorf(codes.NotFound,"Invalid snapshot href (%s)", hRef) + return nil, status.Errorf(codes.NotFound, "Invalid snapshot href (%s)", hRef) } return &SnapshotId{ VolumeId: &VolumeId{ - Type: vType, - Zfssa: zfssa, - Pool: result[5], + Type: vType, + Zfssa: zfssa, + Pool: result[5], Project: result[7], - Name: result[9] }, - Name: result[11] }, nil + Name: result[9]}, + Name: result[11]}, nil } func SnapshotIdStringFromHref(zfssa, hRef string) (string, error) { result := strings.Split(hRef, "/") if len(result) < SnapshotHrefLen { return "", status.Errorf(codes.NotFound, - "Snapshot ID (%s) contains insufficient components (%d)",hRef, SnapshotHrefLen) + "Snapshot ID (%s) contains insufficient components (%d)", hRef, SnapshotHrefLen) } if result[10] != "snapshots" { - return "", status.Errorf(codes.NotFound,"Invalid snapshot href (%s)", hRef) + return "", status.Errorf(codes.NotFound, "Invalid snapshot href (%s)", hRef) } var vType string @@ -218,7 +227,7 @@ func SnapshotIdStringFromHref(zfssa, hRef string) (string, error) { case "luns": vType = BlockVolume default: - return "", status.Errorf(codes.NotFound,"Invalid snapshot href (%s)", hRef) + return "", status.Errorf(codes.NotFound, "Invalid snapshot href (%s)", hRef) } return fmt.Sprintf("/%v/%v/%v/%v/%v/%v", @@ -247,15 +256,15 @@ func (zsi *SnapshotId) GetVolumeId() *VolumeId { func DateToUnix(date string) (*timestamp.Timestamp, error) { year, err := strconv.Atoi(date[0:4]) if err == nil { - month, err := strconv.Atoi(date[5:7]) + month, err := strconv.Atoi(date[5:7]) if err == nil { - day, err := strconv.Atoi(date[8:10]) + day, err := strconv.Atoi(date[8:10]) if err == nil { - hour, err := strconv.Atoi(date[11:13]) + hour, err := strconv.Atoi(date[11:13]) if err == nil { - min, err := strconv.Atoi(date[14:16]) + min, err := strconv.Atoi(date[14:16]) if err == nil { - sec, err := strconv.Atoi(date[17:19]) + sec, err := strconv.Atoi(date[17:19]) if err == nil { seconds := time.Date(year, time.Month(month), day, hour, min, sec, 0, time.Local).Unix() diff --git a/release-tools/build.make b/release-tools/build.make index dd34a41..544a1ba 100644 --- a/release-tools/build.make +++ b/release-tools/build.make @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # @@ -26,7 +26,7 @@ IMAGE_NAME=$(REGISTRY_NAME)/$* build-%: mkdir -p bin - CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* container-%: build-% $(CONTAINER_BUILD) build -t $*:latest -f $(shell if [ -e ./cmd/zfssa-csi-driver/$*/Dockerfile ]; then echo ./cmd/zfssa-csi-driver/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . --build-arg var_proxy=$(CONTAINER_PROXY)