revert packages from vendor/kubesphere.io
Signed-off-by: zhu733756 <talonzhu@yunify.com>
This commit is contained in:
10
go.mod
10
go.mod
@@ -91,9 +91,7 @@ require (
|
|||||||
github.com/yvasiyarov/gorelic v0.0.6 // indirect
|
github.com/yvasiyarov/gorelic v0.0.6 // indirect
|
||||||
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f // indirect
|
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f // indirect
|
||||||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
|
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
|
||||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
|
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
|
||||||
golang.org/x/tools v0.1.5 // indirect
|
|
||||||
google.golang.org/grpc v1.30.0
|
google.golang.org/grpc v1.30.0
|
||||||
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
|
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
|
||||||
gopkg.in/cas.v2 v2.2.0
|
gopkg.in/cas.v2 v2.2.0
|
||||||
@@ -251,6 +249,7 @@ replace (
|
|||||||
github.com/containernetworking/cni => github.com/containernetworking/cni v0.8.0
|
github.com/containernetworking/cni => github.com/containernetworking/cni v0.8.0
|
||||||
github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.3
|
github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.3
|
||||||
github.com/coreos/etcd => github.com/coreos/etcd v3.3.17+incompatible
|
github.com/coreos/etcd => github.com/coreos/etcd v3.3.17+incompatible
|
||||||
|
github.com/coreos/go-etcd => github.com/coreos/go-etcd v2.0.0+incompatible
|
||||||
github.com/coreos/go-oidc => github.com/coreos/go-oidc v2.1.0+incompatible
|
github.com/coreos/go-oidc => github.com/coreos/go-oidc v2.1.0+incompatible
|
||||||
github.com/coreos/go-semver => github.com/coreos/go-semver v0.3.0
|
github.com/coreos/go-semver => github.com/coreos/go-semver v0.3.0
|
||||||
github.com/coreos/go-systemd => github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
|
github.com/coreos/go-systemd => github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
|
||||||
@@ -288,6 +287,7 @@ replace (
|
|||||||
github.com/docker/go-metrics => github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82
|
github.com/docker/go-metrics => github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82
|
||||||
github.com/docker/go-units => github.com/docker/go-units v0.4.0
|
github.com/docker/go-units => github.com/docker/go-units v0.4.0
|
||||||
github.com/docker/libtrust => github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7
|
github.com/docker/libtrust => github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7
|
||||||
|
github.com/docker/spdystream => github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96
|
||||||
github.com/docopt/docopt-go => github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
|
github.com/docopt/docopt-go => github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
|
||||||
github.com/dustin/go-humanize => github.com/dustin/go-humanize v1.0.0
|
github.com/dustin/go-humanize => github.com/dustin/go-humanize v1.0.0
|
||||||
github.com/eapache/go-resiliency => github.com/eapache/go-resiliency v1.1.0
|
github.com/eapache/go-resiliency => github.com/eapache/go-resiliency v1.1.0
|
||||||
@@ -416,7 +416,9 @@ replace (
|
|||||||
github.com/gorilla/handlers => github.com/gorilla/handlers v1.4.0
|
github.com/gorilla/handlers => github.com/gorilla/handlers v1.4.0
|
||||||
github.com/gorilla/mux => github.com/gorilla/mux v1.7.3
|
github.com/gorilla/mux => github.com/gorilla/mux v1.7.3
|
||||||
github.com/gorilla/websocket => github.com/gorilla/websocket v1.4.1
|
github.com/gorilla/websocket => github.com/gorilla/websocket v1.4.1
|
||||||
|
github.com/gosimple/slug => github.com/gosimple/slug v1.1.1
|
||||||
github.com/gosuri/uitable => github.com/gosuri/uitable v0.0.1
|
github.com/gosuri/uitable => github.com/gosuri/uitable v0.0.1
|
||||||
|
github.com/grafana-tools/sdk => github.com/grafana-tools/sdk v0.0.0-20210625151406-43693eb2f02b
|
||||||
github.com/gregjones/httpcache => github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f
|
github.com/gregjones/httpcache => github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware => github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
|
github.com/grpc-ecosystem/go-grpc-middleware => github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus => github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
github.com/grpc-ecosystem/go-grpc-prometheus => github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||||
@@ -626,6 +628,7 @@ replace (
|
|||||||
github.com/prometheus/procfs => github.com/prometheus/procfs v0.1.3
|
github.com/prometheus/procfs => github.com/prometheus/procfs v0.1.3
|
||||||
github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.8.2-0.20200507164740-ecee9c8abfd1
|
github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.8.2-0.20200507164740-ecee9c8abfd1
|
||||||
github.com/rafaeljusto/redigomock => github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1
|
github.com/rafaeljusto/redigomock => github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1
|
||||||
|
github.com/rainycape/unidecode => github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be
|
||||||
github.com/rcrowley/go-metrics => github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
|
github.com/rcrowley/go-metrics => github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
|
||||||
github.com/retailnext/hllpp => github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52
|
github.com/retailnext/hllpp => github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52
|
||||||
github.com/rogpeppe/fastuuid => github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af
|
github.com/rogpeppe/fastuuid => github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af
|
||||||
@@ -676,6 +679,7 @@ replace (
|
|||||||
github.com/uber/jaeger-client-go => github.com/uber/jaeger-client-go v2.23.0+incompatible
|
github.com/uber/jaeger-client-go => github.com/uber/jaeger-client-go v2.23.0+incompatible
|
||||||
github.com/uber/jaeger-lib => github.com/uber/jaeger-lib v2.2.0+incompatible
|
github.com/uber/jaeger-lib => github.com/uber/jaeger-lib v2.2.0+incompatible
|
||||||
github.com/ugorji/go => github.com/ugorji/go v1.1.4
|
github.com/ugorji/go => github.com/ugorji/go v1.1.4
|
||||||
|
github.com/ugorji/go/codec => github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8
|
||||||
github.com/urfave/cli => github.com/urfave/cli v1.20.0
|
github.com/urfave/cli => github.com/urfave/cli v1.20.0
|
||||||
github.com/valyala/bytebufferpool => github.com/valyala/bytebufferpool v1.0.0
|
github.com/valyala/bytebufferpool => github.com/valyala/bytebufferpool v1.0.0
|
||||||
github.com/valyala/fasttemplate => github.com/valyala/fasttemplate v1.0.1
|
github.com/valyala/fasttemplate => github.com/valyala/fasttemplate v1.0.1
|
||||||
@@ -816,6 +820,8 @@ replace (
|
|||||||
sigs.k8s.io/kustomize/cmd/config => sigs.k8s.io/kustomize/cmd/config v0.9.10
|
sigs.k8s.io/kustomize/cmd/config => sigs.k8s.io/kustomize/cmd/config v0.9.10
|
||||||
sigs.k8s.io/kustomize/kustomize/v4 => sigs.k8s.io/kustomize/kustomize/v4 v4.1.2
|
sigs.k8s.io/kustomize/kustomize/v4 => sigs.k8s.io/kustomize/kustomize/v4 v4.1.2
|
||||||
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.10.17
|
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.10.17
|
||||||
|
sigs.k8s.io/structured-merge-diff => sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06
|
||||||
|
sigs.k8s.io/structured-merge-diff/v3 => sigs.k8s.io/structured-merge-diff/v3 v3.0.0
|
||||||
sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 v4.1.0
|
sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 v4.1.0
|
||||||
sigs.k8s.io/yaml => sigs.k8s.io/yaml v1.2.0
|
sigs.k8s.io/yaml => sigs.k8s.io/yaml v1.2.0
|
||||||
sourcegraph.com/sourcegraph/appdash => sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0
|
sourcegraph.com/sourcegraph/appdash => sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0
|
||||||
|
|||||||
1
go.sum
1
go.sum
@@ -1012,7 +1012,6 @@ sigs.k8s.io/kustomize/kyaml v0.10.17 h1:4zrV0ym5AYa0e512q7K3Wp1u7mzoWW0xR3UHJcGW
|
|||||||
sigs.k8s.io/kustomize/kyaml v0.10.17/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg=
|
sigs.k8s.io/kustomize/kyaml v0.10.17/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg=
|
||||||
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU=
|
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU=
|
||||||
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18=
|
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18=
|
||||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=
|
|
||||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8=
|
sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8=
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||||
|
|||||||
1
vendor/kubesphere.io/api
generated
vendored
Symbolic link
1
vendor/kubesphere.io/api
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../staging/src/kubesphere.io/api
|
||||||
201
vendor/kubesphere.io/api/LICENSE
generated
vendored
201
vendor/kubesphere.io/api/LICENSE
generated
vendored
@@ -1,201 +0,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.
|
|
||||||
29
vendor/kubesphere.io/api/application/crdinstall/install.go
generated
vendored
29
vendor/kubesphere.io/api/application/crdinstall/install.go
generated
vendored
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package crdinstall
|
|
||||||
|
|
||||||
import (
|
|
||||||
k8sruntime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
|
|
||||||
|
|
||||||
"kubesphere.io/api/application/v1alpha1"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Install(scheme *k8sruntime.Scheme) {
|
|
||||||
urlruntime.Must(v1alpha1.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion))
|
|
||||||
}
|
|
||||||
63
vendor/kubesphere.io/api/application/v1alpha1/constants.go
generated
vendored
63
vendor/kubesphere.io/api/application/v1alpha1/constants.go
generated
vendored
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
const (
|
|
||||||
MsgLen = 512
|
|
||||||
HelmRepoSyncStateLen = 10
|
|
||||||
|
|
||||||
// app version state
|
|
||||||
StateDraft = "draft"
|
|
||||||
StateSubmitted = "submitted"
|
|
||||||
StatePassed = "passed"
|
|
||||||
StateRejected = "rejected"
|
|
||||||
StateSuspended = "suspended"
|
|
||||||
StateActive = "active"
|
|
||||||
|
|
||||||
// repo state
|
|
||||||
RepoStateSuccessful = "successful"
|
|
||||||
RepoStateFailed = "failed"
|
|
||||||
RepoStateSyncing = "syncing"
|
|
||||||
|
|
||||||
// helm release state
|
|
||||||
HelmStatusActive = "active"
|
|
||||||
HelmStatusCreating = "creating"
|
|
||||||
HelmStatusDeleting = "deleting"
|
|
||||||
HelmStatusUpgrading = "upgrading"
|
|
||||||
HelmStatusRollbacking = "rollbacking"
|
|
||||||
HelmStatusFailed = "failed"
|
|
||||||
HelmStatusCreated = "created"
|
|
||||||
HelmStatusUpgraded = "upgraded"
|
|
||||||
|
|
||||||
AttachmentTypeScreenshot = "screenshot"
|
|
||||||
AttachmentTypeIcon = "icon"
|
|
||||||
|
|
||||||
HelmApplicationAppStoreSuffix = "-store"
|
|
||||||
HelmApplicationIdPrefix = "app-"
|
|
||||||
HelmRepoIdPrefix = "repo-"
|
|
||||||
HelmApplicationVersionIdPrefix = "appv-"
|
|
||||||
HelmCategoryIdPrefix = "ctg-"
|
|
||||||
HelmAttachmentPrefix = "att-"
|
|
||||||
HelmReleasePrefix = "rls-"
|
|
||||||
UncategorizedName = "uncategorized"
|
|
||||||
UncategorizedId = "ctg-uncategorized"
|
|
||||||
AppStoreRepoId = "repo-helm"
|
|
||||||
|
|
||||||
ApplicationInstance = "app.kubesphere.io/instance"
|
|
||||||
|
|
||||||
OriginWorkspaceLabelKey = "kubesphere.io/workspace-origin"
|
|
||||||
)
|
|
||||||
20
vendor/kubesphere.io/api/application/v1alpha1/doc.go
generated
vendored
20
vendor/kubesphere.io/api/application/v1alpha1/doc.go
generated
vendored
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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:deepcopy-gen=package,register
|
|
||||||
// +groupName=application.kubesphere.io
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
136
vendor/kubesphere.io/api/application/v1alpha1/helmapplication_types.go
generated
vendored
136
vendor/kubesphere.io/api/application/v1alpha1/helmapplication_types.go
generated
vendored
@@ -1,136 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
"kubesphere.io/api/constants"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindHelmApplication = "HelmApplication"
|
|
||||||
ResourceSingularHelmApplication = "helmapplication"
|
|
||||||
ResourcePluralHelmApplication = "helmapplications"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HelmApplicationSpec defines the desired state of HelmApplication
|
|
||||||
type HelmApplicationSpec struct {
|
|
||||||
// the name of the helm application
|
|
||||||
Name string `json:"name"`
|
|
||||||
// description from chart's description or frontend
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
// attachments id
|
|
||||||
Attachments []string `json:"attachments,omitempty"`
|
|
||||||
// info from frontend
|
|
||||||
Abstraction string `json:"abstraction,omitempty"`
|
|
||||||
AppHome string `json:"appHome,omitempty"`
|
|
||||||
// The attachment id of the icon
|
|
||||||
Icon string `json:"icon,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HelmApplicationStatus defines the observed state of HelmApplication
|
|
||||||
type HelmApplicationStatus struct {
|
|
||||||
// If this application belong to appStore, latestVersion is the the latest version of the active application version.
|
|
||||||
// otherwise latestVersion is the latest version of all application version
|
|
||||||
LatestVersion string `json:"latestVersion,omitempty"`
|
|
||||||
// the state of the helm application: draft, submitted, passed, rejected, suspended, active
|
|
||||||
State string `json:"state,omitempty"`
|
|
||||||
UpdateTime *metav1.Time `json:"updateTime"`
|
|
||||||
StatusTime *metav1.Time `json:"statusTime"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=happ
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:printcolumn:name="application name",type=string,JSONPath=`.spec.name`
|
|
||||||
// +kubebuilder:printcolumn:name="workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace"
|
|
||||||
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmApplication is the Schema for the helmapplications API
|
|
||||||
type HelmApplication struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec HelmApplicationSpec `json:"spec,omitempty"`
|
|
||||||
Status HelmApplicationStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmApplicationList contains a list of HelmApplication
|
|
||||||
type HelmApplicationList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []HelmApplication `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&HelmApplication{}, &HelmApplicationList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) GetTrueName() string {
|
|
||||||
return in.Spec.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) GetHelmRepoId() string {
|
|
||||||
return getValue(in.Labels, constants.ChartRepoIdLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) GetHelmApplicationId() string {
|
|
||||||
return strings.TrimSuffix(in.Name, HelmApplicationAppStoreSuffix)
|
|
||||||
}
|
|
||||||
func (in *HelmApplication) GetHelmCategoryId() string {
|
|
||||||
return getValue(in.Labels, constants.CategoryIdLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) GetWorkspace() string {
|
|
||||||
ws := getValue(in.Labels, constants.WorkspaceLabelKey)
|
|
||||||
if ws == "" {
|
|
||||||
return getValue(in.Labels, OriginWorkspaceLabelKey)
|
|
||||||
}
|
|
||||||
return ws
|
|
||||||
}
|
|
||||||
|
|
||||||
func getValue(m map[string]string, key string) string {
|
|
||||||
if m == nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return m[key]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) GetCategoryId() string {
|
|
||||||
return getValue(in.Labels, constants.CategoryIdLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) State() string {
|
|
||||||
if in.Status.State == "" {
|
|
||||||
return StateDraft
|
|
||||||
}
|
|
||||||
return in.Status.State
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplication) GetCreator() string {
|
|
||||||
return getValue(in.Annotations, constants.CreatorAnnotationKey)
|
|
||||||
}
|
|
||||||
233
vendor/kubesphere.io/api/application/v1alpha1/helmapplicationversion_types.go
generated
vendored
233
vendor/kubesphere.io/api/application/v1alpha1/helmapplicationversion_types.go
generated
vendored
@@ -1,233 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
"kubesphere.io/api/constants"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindHelmApplicationVersion = "HelmApplicationVersion"
|
|
||||||
ResourceSingularHelmApplicationVersion = "helmapplicationversion"
|
|
||||||
ResourcePluralHelmApplicationVersion = "helmapplicationversions"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HelmApplicationVersionSpec defines the desired state of HelmApplicationVersion
|
|
||||||
type HelmApplicationVersionSpec struct {
|
|
||||||
// metadata from chart
|
|
||||||
*Metadata `json:",inline"`
|
|
||||||
// chart url
|
|
||||||
URLs []string `json:"urls,omitempty"`
|
|
||||||
// raw data of chart, it will !!!NOT!!! be save to etcd
|
|
||||||
Data []byte `json:"data,omitempty"`
|
|
||||||
|
|
||||||
// dataKey in the storage
|
|
||||||
DataKey string `json:"dataKey,omitempty"`
|
|
||||||
|
|
||||||
// chart create time
|
|
||||||
Created *metav1.Time `json:"created,omitempty"`
|
|
||||||
|
|
||||||
// chart digest
|
|
||||||
Digest string `json:"digest,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HelmApplicationVersionStatus defines the observed state of HelmApplicationVersion
|
|
||||||
type HelmApplicationVersionStatus struct {
|
|
||||||
State string `json:"state,omitempty"`
|
|
||||||
Audit []Audit `json:"audit,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=happver
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:printcolumn:name="application name",type=string,JSONPath=`.spec.name`
|
|
||||||
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmApplicationVersion is the Schema for the helmapplicationversions API
|
|
||||||
type HelmApplicationVersion struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec HelmApplicationVersionSpec `json:"spec,omitempty"`
|
|
||||||
Status HelmApplicationVersionStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maintainer describes a Chart maintainer.
|
|
||||||
type Maintainer struct {
|
|
||||||
// Name is a user name or organization name
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
// Email is an optional email address to contact the named maintainer
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
// URL is an optional URL to an address for the named maintainer
|
|
||||||
URL string `json:"url,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Metadata for a Chart file. This models the structure of a Chart.yaml file.
|
|
||||||
type Metadata struct {
|
|
||||||
// The name of the chart
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
// The URL to a relevant project page, git repo, or contact person
|
|
||||||
Home string `json:"home,omitempty"`
|
|
||||||
// Source is the URL to the source code of this chart
|
|
||||||
Sources []string `json:"sources,omitempty"`
|
|
||||||
// A SemVer 2 conformant version string of the chart
|
|
||||||
Version string `json:"version,omitempty"`
|
|
||||||
// A one-sentence description of the chart
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
// A list of string keywords
|
|
||||||
Keywords []string `json:"keywords,omitempty"`
|
|
||||||
// A list of name and URL/email address combinations for the maintainer(s)
|
|
||||||
Maintainers []*Maintainer `json:"maintainers,omitempty"`
|
|
||||||
// The URL to an icon file.
|
|
||||||
Icon string `json:"icon,omitempty"`
|
|
||||||
// The API Version of this chart.
|
|
||||||
APIVersion string `json:"apiVersion,omitempty"`
|
|
||||||
// The condition to check to enable chart
|
|
||||||
Condition string `json:"condition,omitempty"`
|
|
||||||
// The tags to check to enable chart
|
|
||||||
Tags string `json:"tags,omitempty"`
|
|
||||||
// The version of the application enclosed inside of this chart.
|
|
||||||
AppVersion string `json:"appVersion,omitempty"`
|
|
||||||
// Whether or not this chart is deprecated
|
|
||||||
Deprecated bool `json:"deprecated,omitempty"`
|
|
||||||
// Annotations are additional mappings uninterpreted by Helm,
|
|
||||||
// made available for inspection by other applications.
|
|
||||||
Annotations map[string]string `json:"annotations,omitempty"`
|
|
||||||
// KubeVersion is a SemVer constraint specifying the version of Kubernetes required.
|
|
||||||
KubeVersion string `json:"kubeVersion,omitempty"`
|
|
||||||
// Dependencies are a list of dependencies for a chart.
|
|
||||||
Dependencies []*Dependency `json:"dependencies,omitempty"`
|
|
||||||
// Specifies the chart type: application or library
|
|
||||||
Type string `json:"type,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Audit struct {
|
|
||||||
// audit message
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
// audit state: submitted, passed, draft, active, rejected, suspended
|
|
||||||
State string `json:"state,omitempty"`
|
|
||||||
// audit time
|
|
||||||
Time metav1.Time `json:"time"`
|
|
||||||
// audit operator
|
|
||||||
Operator string `json:"operator,omitempty"`
|
|
||||||
OperatorType string `json:"operatorType,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dependency describes a chart upon which another chart depends.
|
|
||||||
// Dependencies can be used to express developer intent, or to capture the state
|
|
||||||
// of a chart.
|
|
||||||
type Dependency struct {
|
|
||||||
// Name is the name of the dependency.
|
|
||||||
// This must mach the name in the dependency's Chart.yaml.
|
|
||||||
Name string `json:"name"`
|
|
||||||
// Version is the version (range) of this chart.
|
|
||||||
// A lock file will always produce a single version, while a dependency
|
|
||||||
// may contain a semantic version range.
|
|
||||||
Version string `json:"version,omitempty"`
|
|
||||||
// The URL to the repository.
|
|
||||||
// Appending `index.yaml` to this string should result in a URL that can be
|
|
||||||
// used to fetch the repository index.
|
|
||||||
Repository string `json:"repository"`
|
|
||||||
// A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )
|
|
||||||
Condition string `json:"condition,omitempty"`
|
|
||||||
// Tags can be used to group charts for enabling/disabling together
|
|
||||||
Tags []string `json:"tags,omitempty"`
|
|
||||||
// Enabled bool determines if chart should be loaded
|
|
||||||
Enabled bool `json:"enabled,omitempty"`
|
|
||||||
// ImportValues holds the mapping of source values to parent key to be imported. Each item can be a
|
|
||||||
// string or pair of child/parent sublist items.
|
|
||||||
// ImportValues []interface{} `json:"import_values,omitempty"`
|
|
||||||
|
|
||||||
// Alias usable alias to be used for the chart
|
|
||||||
Alias string `json:"alias,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmApplicationVersionList contains a list of HelmApplicationVersion
|
|
||||||
type HelmApplicationVersionList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []HelmApplicationVersion `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&HelmApplicationVersion{}, &HelmApplicationVersionList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetCreator() string {
|
|
||||||
return getValue(in.Annotations, constants.CreatorAnnotationKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetHelmApplicationVersionId() string {
|
|
||||||
return in.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetWorkspace() string {
|
|
||||||
return getValue(in.Labels, constants.WorkspaceLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetVersionName() string {
|
|
||||||
appV := in.GetChartAppVersion()
|
|
||||||
if appV != "" {
|
|
||||||
return fmt.Sprintf("%s [%s]", in.GetChartVersion(), appV)
|
|
||||||
} else {
|
|
||||||
return in.GetChartVersion()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetHelmApplicationId() string {
|
|
||||||
return getValue(in.Labels, constants.ChartApplicationIdLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetSemver() string {
|
|
||||||
return strings.Split(in.GetVersionName(), " ")[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetTrueName() string {
|
|
||||||
return in.Spec.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetChartVersion() string {
|
|
||||||
return in.Spec.Version
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetChartAppVersion() string {
|
|
||||||
return in.Spec.AppVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) GetHelmRepoId() string {
|
|
||||||
return getValue(in.Labels, constants.ChartRepoIdLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmApplicationVersion) State() string {
|
|
||||||
if in.Status.State == "" {
|
|
||||||
return StateDraft
|
|
||||||
}
|
|
||||||
|
|
||||||
return in.Status.State
|
|
||||||
}
|
|
||||||
81
vendor/kubesphere.io/api/application/v1alpha1/helmcategory_types.go
generated
vendored
81
vendor/kubesphere.io/api/application/v1alpha1/helmcategory_types.go
generated
vendored
@@ -1,81 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindHelmCategory = "HelmCategory"
|
|
||||||
ResourceSingularHelmCategory = "helmcategory"
|
|
||||||
ResourcePluralHelmCategory = "helmcategories"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HelmCategorySpec defines the desired state of HelmRepo
|
|
||||||
type HelmCategorySpec struct {
|
|
||||||
// name of the category
|
|
||||||
Name string `json:"name"`
|
|
||||||
// info from frontend
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
Locale string `json:"locale,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=hctg
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:printcolumn:name="name",type=string,JSONPath=`.spec.name`
|
|
||||||
// +kubebuilder:printcolumn:name="total",type=string,JSONPath=`.status.total`
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmCategory is the Schema for the helmcategories API
|
|
||||||
type HelmCategory struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec HelmCategorySpec `json:"spec,omitempty"`
|
|
||||||
Status HelmCategoryStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type HelmCategoryStatus struct {
|
|
||||||
// total helmapplications belong to this category
|
|
||||||
Total int `json:"total"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmCategoryList contains a list of HelmCategory
|
|
||||||
type HelmCategoryList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []HelmCategory `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmCategory) GetTrueName() string {
|
|
||||||
if in == nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return in.Spec.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&HelmCategory{}, &HelmCategoryList{})
|
|
||||||
}
|
|
||||||
154
vendor/kubesphere.io/api/application/v1alpha1/helmrelease_types.go
generated
vendored
154
vendor/kubesphere.io/api/application/v1alpha1/helmrelease_types.go
generated
vendored
@@ -1,154 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
"kubesphere.io/api/constants"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindHelmRelease = "HelmRelease"
|
|
||||||
ResourceSingularHelmRelease = "helmrelease"
|
|
||||||
ResourcePluralHelmRelease = "helmreleases"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HelmReleaseSpec defines the desired state of HelmRelease
|
|
||||||
type HelmReleaseSpec struct {
|
|
||||||
// Name of the release
|
|
||||||
Name string `json:"name"`
|
|
||||||
// Message got from frontend
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
// helm release values.yaml
|
|
||||||
Values []byte `json:"values,omitempty"`
|
|
||||||
// The name of the chart which will be installed.
|
|
||||||
ChartName string `json:"chartName"`
|
|
||||||
// Specify the exact chart version to install. If this is not specified, the latest version is installed
|
|
||||||
ChartVersion string `json:"chartVersion"`
|
|
||||||
// appVersion from Chart.yaml
|
|
||||||
ChartAppVersion string `json:"chartAppVer,omitempty"`
|
|
||||||
// id of the repo
|
|
||||||
RepoId string `json:"repoId,omitempty"`
|
|
||||||
// id of the helmapplication
|
|
||||||
ApplicationId string `json:"appId,omitempty"`
|
|
||||||
// application version id
|
|
||||||
ApplicationVersionId string `json:"appVerId,omitempty"`
|
|
||||||
// expected release version, when this version is not equal status.version, the release need upgrade
|
|
||||||
// this filed should be modified when any filed of the spec modified.
|
|
||||||
Version int `json:"version"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type HelmReleaseDeployStatus struct {
|
|
||||||
// A human readable message indicating details about why the release is in this state.
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
// current state of the release
|
|
||||||
State string `json:"state"`
|
|
||||||
// deploy time, upgrade time or check status time
|
|
||||||
Time metav1.Time `json:"deployTime"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HelmReleaseStatus defines the observed state of HelmRelease
|
|
||||||
type HelmReleaseStatus struct {
|
|
||||||
// current state
|
|
||||||
State string `json:"state"`
|
|
||||||
// A human readable message indicating details about why the release is in this state.
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
// current release version
|
|
||||||
Version int `json:"version,omitempty"`
|
|
||||||
// deploy status list of history, which will store at most 10 state
|
|
||||||
DeployStatus []HelmReleaseDeployStatus `json:"deployStatus,omitempty"`
|
|
||||||
// last update time
|
|
||||||
LastUpdate metav1.Time `json:"lastUpdate,omitempty"`
|
|
||||||
// last deploy time or upgrade time
|
|
||||||
LastDeployed *metav1.Time `json:"lastDeployed,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=hrls
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:printcolumn:name="Release Name",type=string,JSONPath=".spec.name"
|
|
||||||
// +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace"
|
|
||||||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.kubesphere\\.io/cluster"
|
|
||||||
// +kubebuilder:printcolumn:name="Namespace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/namespace"
|
|
||||||
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmRelease is the Schema for the helmreleases API
|
|
||||||
type HelmRelease struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec HelmReleaseSpec `json:"spec,omitempty"`
|
|
||||||
Status HelmReleaseStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmReleaseList contains a list of HelmRelease
|
|
||||||
type HelmReleaseList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []HelmRelease `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&HelmRelease{}, &HelmReleaseList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetCreator() string {
|
|
||||||
return getValue(in.Annotations, constants.CreatorAnnotationKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetTrueName() string {
|
|
||||||
return in.Spec.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetChartVersionName() string {
|
|
||||||
appV := in.GetChartAppVersion()
|
|
||||||
if appV != "" {
|
|
||||||
return fmt.Sprintf("%s [%s]", in.GetChartVersion(), appV)
|
|
||||||
} else {
|
|
||||||
return in.GetChartVersion()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetChartAppVersion() string {
|
|
||||||
return in.Spec.ChartAppVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetChartVersion() string {
|
|
||||||
return in.Spec.ChartVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetRlsCluster() string {
|
|
||||||
return getValue(in.Labels, constants.ClusterNameLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetWorkspace() string {
|
|
||||||
return getValue(in.Labels, constants.WorkspaceLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRelease) GetRlsNamespace() string {
|
|
||||||
return getValue(in.Labels, constants.NamespaceLabelKey)
|
|
||||||
}
|
|
||||||
141
vendor/kubesphere.io/api/application/v1alpha1/helmrepo_types.go
generated
vendored
141
vendor/kubesphere.io/api/application/v1alpha1/helmrepo_types.go
generated
vendored
@@ -1,141 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
"kubesphere.io/api/constants"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindHelmRepo = "HelmRepo"
|
|
||||||
ResourceSingularHelmRepo = "helmrepo"
|
|
||||||
ResourcePluralHelmRepo = "helmrepos"
|
|
||||||
)
|
|
||||||
|
|
||||||
type HelmRepoCredential struct {
|
|
||||||
// chart repository username
|
|
||||||
Username string `json:"username,omitempty"`
|
|
||||||
// chart repository password
|
|
||||||
Password string `json:"password,omitempty"`
|
|
||||||
// identify HTTPS client using this SSL certificate file
|
|
||||||
CertFile string `json:"certFile,omitempty"`
|
|
||||||
// identify HTTPS client using this SSL key file
|
|
||||||
KeyFile string `json:"keyFile,omitempty"`
|
|
||||||
// verify certificates of HTTPS-enabled servers using this CA bundle
|
|
||||||
CAFile string `json:"caFile,omitempty"`
|
|
||||||
// skip tls certificate checks for the repository, default is ture
|
|
||||||
InsecureSkipTLSVerify *bool `json:"insecureSkipTLSVerify,omitempty"`
|
|
||||||
|
|
||||||
S3Config `json:",inline"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type S3Config struct {
|
|
||||||
AccessKeyID string `json:"accessKeyID,omitempty"`
|
|
||||||
SecretAccessKey string `json:"secretAccessKey,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HelmRepoSpec defines the desired state of HelmRepo
|
|
||||||
type HelmRepoSpec struct {
|
|
||||||
// name of the repo
|
|
||||||
Name string `json:"name"`
|
|
||||||
// helm repo url
|
|
||||||
Url string `json:"url"`
|
|
||||||
// helm repo credential
|
|
||||||
Credential HelmRepoCredential `json:"credential,omitempty"`
|
|
||||||
// chart repo description from frontend
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
// sync period in seconds, no sync when SyncPeriod=0, the minimum SyncPeriod is 180s
|
|
||||||
SyncPeriod int `json:"syncPeriod,omitempty"`
|
|
||||||
// expected repo version, when this version is not equal status.version, the repo need upgrade
|
|
||||||
// this filed should be modified when any filed of the spec modified.
|
|
||||||
Version int `json:"version,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type HelmRepoSyncState struct {
|
|
||||||
// last sync state, valid state are: "failed", "success", and ""
|
|
||||||
State string `json:"state,omitempty"`
|
|
||||||
// A human readable message indicating details about why the repo is in this state.
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
SyncTime *metav1.Time `json:"syncTime"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HelmRepoStatus defines the observed state of HelmRepo
|
|
||||||
type HelmRepoStatus struct {
|
|
||||||
// repo index
|
|
||||||
Data string `json:"data,omitempty"`
|
|
||||||
// status last update time
|
|
||||||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
|
|
||||||
// current state of the repo, successful, failed or syncing
|
|
||||||
State string `json:"state,omitempty"`
|
|
||||||
// sync state list of history, which will store at most 10 state
|
|
||||||
SyncState []HelmRepoSyncState `json:"syncState,omitempty"`
|
|
||||||
// if status.version!=spec.Version, we need sync the repo now
|
|
||||||
Version int `json:"version,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,path=helmrepos,shortName=hrepo
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:printcolumn:name="name",type=string,JSONPath=`.spec.name`
|
|
||||||
// +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace"
|
|
||||||
// +kubebuilder:printcolumn:name="url",type=string,JSONPath=`.spec.url`
|
|
||||||
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmRepo is the Schema for the helmrepoes API
|
|
||||||
type HelmRepo struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec HelmRepoSpec `json:"spec,omitempty"`
|
|
||||||
Status HelmRepoStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// HelmRepoList contains a list of HelmRepo
|
|
||||||
type HelmRepoList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []HelmRepo `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&HelmRepo{}, &HelmRepoList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRepo) GetTrueName() string {
|
|
||||||
return in.Spec.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRepo) GetHelmRepoId() string {
|
|
||||||
return in.Name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRepo) GetWorkspace() string {
|
|
||||||
return getValue(in.Labels, constants.WorkspaceLabelKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (in *HelmRepo) GetCreator() string {
|
|
||||||
return getValue(in.Annotations, constants.CreatorAnnotationKey)
|
|
||||||
}
|
|
||||||
40
vendor/kubesphere.io/api/application/v1alpha1/register.go
generated
vendored
40
vendor/kubesphere.io/api/application/v1alpha1/register.go
generated
vendored
@@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the application v1alpha1 API group
|
|
||||||
// +kubebuilder:object:generate=true
|
|
||||||
// +groupName=application.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "application.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme adds the types in this group-version to the given scheme.
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
742
vendor/kubesphere.io/api/application/v1alpha1/zz_generated.deepcopy.go
generated
vendored
742
vendor/kubesphere.io/api/application/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,742 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Audit) DeepCopyInto(out *Audit) {
|
|
||||||
*out = *in
|
|
||||||
in.Time.DeepCopyInto(&out.Time)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit.
|
|
||||||
func (in *Audit) DeepCopy() *Audit {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Audit)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Dependency) DeepCopyInto(out *Dependency) {
|
|
||||||
*out = *in
|
|
||||||
if in.Tags != nil {
|
|
||||||
in, out := &in.Tags, &out.Tags
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency.
|
|
||||||
func (in *Dependency) DeepCopy() *Dependency {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Dependency)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplication) DeepCopyInto(out *HelmApplication) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplication.
|
|
||||||
func (in *HelmApplication) DeepCopy() *HelmApplication {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplication)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmApplication) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationList) DeepCopyInto(out *HelmApplicationList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]HelmApplication, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationList.
|
|
||||||
func (in *HelmApplicationList) DeepCopy() *HelmApplicationList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmApplicationList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationSpec) DeepCopyInto(out *HelmApplicationSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Attachments != nil {
|
|
||||||
in, out := &in.Attachments, &out.Attachments
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationSpec.
|
|
||||||
func (in *HelmApplicationSpec) DeepCopy() *HelmApplicationSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationStatus) DeepCopyInto(out *HelmApplicationStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.UpdateTime != nil {
|
|
||||||
in, out := &in.UpdateTime, &out.UpdateTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.StatusTime != nil {
|
|
||||||
in, out := &in.StatusTime, &out.StatusTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationStatus.
|
|
||||||
func (in *HelmApplicationStatus) DeepCopy() *HelmApplicationStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationVersion) DeepCopyInto(out *HelmApplicationVersion) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersion.
|
|
||||||
func (in *HelmApplicationVersion) DeepCopy() *HelmApplicationVersion {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationVersion)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmApplicationVersion) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationVersionList) DeepCopyInto(out *HelmApplicationVersionList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]HelmApplicationVersion, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersionList.
|
|
||||||
func (in *HelmApplicationVersionList) DeepCopy() *HelmApplicationVersionList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationVersionList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmApplicationVersionList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationVersionSpec) DeepCopyInto(out *HelmApplicationVersionSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Metadata != nil {
|
|
||||||
in, out := &in.Metadata, &out.Metadata
|
|
||||||
*out = new(Metadata)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.URLs != nil {
|
|
||||||
in, out := &in.URLs, &out.URLs
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Data != nil {
|
|
||||||
in, out := &in.Data, &out.Data
|
|
||||||
*out = make([]byte, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Created != nil {
|
|
||||||
in, out := &in.Created, &out.Created
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersionSpec.
|
|
||||||
func (in *HelmApplicationVersionSpec) DeepCopy() *HelmApplicationVersionSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationVersionSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmApplicationVersionStatus) DeepCopyInto(out *HelmApplicationVersionStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.Audit != nil {
|
|
||||||
in, out := &in.Audit, &out.Audit
|
|
||||||
*out = make([]Audit, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApplicationVersionStatus.
|
|
||||||
func (in *HelmApplicationVersionStatus) DeepCopy() *HelmApplicationVersionStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmApplicationVersionStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmCategory) DeepCopyInto(out *HelmCategory) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategory.
|
|
||||||
func (in *HelmCategory) DeepCopy() *HelmCategory {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmCategory)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmCategory) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmCategoryList) DeepCopyInto(out *HelmCategoryList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]HelmCategory, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategoryList.
|
|
||||||
func (in *HelmCategoryList) DeepCopy() *HelmCategoryList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmCategoryList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmCategoryList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmCategorySpec) DeepCopyInto(out *HelmCategorySpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategorySpec.
|
|
||||||
func (in *HelmCategorySpec) DeepCopy() *HelmCategorySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmCategorySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmCategoryStatus) DeepCopyInto(out *HelmCategoryStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCategoryStatus.
|
|
||||||
func (in *HelmCategoryStatus) DeepCopy() *HelmCategoryStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmCategoryStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRelease) DeepCopyInto(out *HelmRelease) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease.
|
|
||||||
func (in *HelmRelease) DeepCopy() *HelmRelease {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRelease)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmRelease) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmReleaseDeployStatus) DeepCopyInto(out *HelmReleaseDeployStatus) {
|
|
||||||
*out = *in
|
|
||||||
in.Time.DeepCopyInto(&out.Time)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseDeployStatus.
|
|
||||||
func (in *HelmReleaseDeployStatus) DeepCopy() *HelmReleaseDeployStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmReleaseDeployStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmReleaseList) DeepCopyInto(out *HelmReleaseList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]HelmRelease, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseList.
|
|
||||||
func (in *HelmReleaseList) DeepCopy() *HelmReleaseList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmReleaseList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmReleaseList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmReleaseSpec) DeepCopyInto(out *HelmReleaseSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Values != nil {
|
|
||||||
in, out := &in.Values, &out.Values
|
|
||||||
*out = make([]byte, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseSpec.
|
|
||||||
func (in *HelmReleaseSpec) DeepCopy() *HelmReleaseSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmReleaseSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmReleaseStatus) DeepCopyInto(out *HelmReleaseStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.DeployStatus != nil {
|
|
||||||
in, out := &in.DeployStatus, &out.DeployStatus
|
|
||||||
*out = make([]HelmReleaseDeployStatus, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.LastUpdate.DeepCopyInto(&out.LastUpdate)
|
|
||||||
if in.LastDeployed != nil {
|
|
||||||
in, out := &in.LastDeployed, &out.LastDeployed
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmReleaseStatus.
|
|
||||||
func (in *HelmReleaseStatus) DeepCopy() *HelmReleaseStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmReleaseStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRepo) DeepCopyInto(out *HelmRepo) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepo.
|
|
||||||
func (in *HelmRepo) DeepCopy() *HelmRepo {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRepo)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmRepo) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRepoCredential) DeepCopyInto(out *HelmRepoCredential) {
|
|
||||||
*out = *in
|
|
||||||
if in.InsecureSkipTLSVerify != nil {
|
|
||||||
in, out := &in.InsecureSkipTLSVerify, &out.InsecureSkipTLSVerify
|
|
||||||
*out = new(bool)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
out.S3Config = in.S3Config
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoCredential.
|
|
||||||
func (in *HelmRepoCredential) DeepCopy() *HelmRepoCredential {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRepoCredential)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRepoList) DeepCopyInto(out *HelmRepoList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]HelmRepo, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoList.
|
|
||||||
func (in *HelmRepoList) DeepCopy() *HelmRepoList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRepoList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *HelmRepoList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRepoSpec) DeepCopyInto(out *HelmRepoSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.Credential.DeepCopyInto(&out.Credential)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoSpec.
|
|
||||||
func (in *HelmRepoSpec) DeepCopy() *HelmRepoSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRepoSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRepoStatus) DeepCopyInto(out *HelmRepoStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.LastUpdateTime != nil {
|
|
||||||
in, out := &in.LastUpdateTime, &out.LastUpdateTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.SyncState != nil {
|
|
||||||
in, out := &in.SyncState, &out.SyncState
|
|
||||||
*out = make([]HelmRepoSyncState, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoStatus.
|
|
||||||
func (in *HelmRepoStatus) DeepCopy() *HelmRepoStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRepoStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *HelmRepoSyncState) DeepCopyInto(out *HelmRepoSyncState) {
|
|
||||||
*out = *in
|
|
||||||
if in.SyncTime != nil {
|
|
||||||
in, out := &in.SyncTime, &out.SyncTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepoSyncState.
|
|
||||||
func (in *HelmRepoSyncState) DeepCopy() *HelmRepoSyncState {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(HelmRepoSyncState)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Maintainer) DeepCopyInto(out *Maintainer) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Maintainer.
|
|
||||||
func (in *Maintainer) DeepCopy() *Maintainer {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Maintainer)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Metadata) DeepCopyInto(out *Metadata) {
|
|
||||||
*out = *in
|
|
||||||
if in.Sources != nil {
|
|
||||||
in, out := &in.Sources, &out.Sources
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Keywords != nil {
|
|
||||||
in, out := &in.Keywords, &out.Keywords
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Maintainers != nil {
|
|
||||||
in, out := &in.Maintainers, &out.Maintainers
|
|
||||||
*out = make([]*Maintainer, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
if (*in)[i] != nil {
|
|
||||||
in, out := &(*in)[i], &(*out)[i]
|
|
||||||
*out = new(Maintainer)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Annotations != nil {
|
|
||||||
in, out := &in.Annotations, &out.Annotations
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Dependencies != nil {
|
|
||||||
in, out := &in.Dependencies, &out.Dependencies
|
|
||||||
*out = make([]*Dependency, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
if (*in)[i] != nil {
|
|
||||||
in, out := &(*in)[i], &(*out)[i]
|
|
||||||
*out = new(Dependency)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
|
|
||||||
func (in *Metadata) DeepCopy() *Metadata {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Metadata)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S3Config) DeepCopyInto(out *S3Config) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Config.
|
|
||||||
func (in *S3Config) DeepCopy() *S3Config {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S3Config)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
19
vendor/kubesphere.io/api/auditing/v1alpha1/doc.go
generated
vendored
19
vendor/kubesphere.io/api/auditing/v1alpha1/doc.go
generated
vendored
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the audit v1alpha1 API group
|
|
||||||
// +groupName=auditing.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
41
vendor/kubesphere.io/api/auditing/v1alpha1/register.go
generated
vendored
41
vendor/kubesphere.io/api/auditing/v1alpha1/register.go
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the audit v1alpha1 API group
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +groupName=auditing.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "auditing.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
91
vendor/kubesphere.io/api/auditing/v1alpha1/rule_types.go
generated
vendored
91
vendor/kubesphere.io/api/auditing/v1alpha1/rule_types.go
generated
vendored
@@ -1,91 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
type PolicyRule struct {
|
|
||||||
// Rule name
|
|
||||||
Name string `json:"name,omitempty" protobuf:"bytes,8,opt,name=name"`
|
|
||||||
// Rule type, rule, macro,list,alias
|
|
||||||
Type string `json:"type,omitempty" protobuf:"bytes,8,opt,name=type"`
|
|
||||||
// Rule describe
|
|
||||||
Desc string `json:"desc,omitempty" protobuf:"bytes,8,opt,name=desc"`
|
|
||||||
// Rule condition
|
|
||||||
// This effective When the rule type is rule
|
|
||||||
Condition string `json:"condition,omitempty" protobuf:"bytes,8,opt,name=condition"`
|
|
||||||
// This effective When the rule type is macro
|
|
||||||
Macro string `json:"macro,omitempty" protobuf:"bytes,8,opt,name=macro"`
|
|
||||||
// This effective When the rule type is alias
|
|
||||||
Alias string `json:"alias,omitempty" protobuf:"bytes,8,opt,name=alias"`
|
|
||||||
// This effective When the rule type is list
|
|
||||||
List []string `json:"list,omitempty" protobuf:"bytes,8,opt,name=list"`
|
|
||||||
// Is the rule enable
|
|
||||||
Enable bool `json:"enable" protobuf:"bytes,8,opt,name=enable"`
|
|
||||||
// The output formater of message which send to user
|
|
||||||
Output string `json:"output,omitempty" protobuf:"bytes,8,opt,name=output"`
|
|
||||||
// Rule priority, DEBUG, INFO, WARNING
|
|
||||||
Priority string `json:"priority,omitempty" protobuf:"bytes,8,opt,name=priority"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AuditRuleSpec defines the desired state of Rule
|
|
||||||
type RuleSpec struct {
|
|
||||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
|
|
||||||
PolicyRules []PolicyRule `json:"rules,omitempty" protobuf:"bytes,8,opt,name=rules"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AuditRuleStatus defines the observed state of Rule
|
|
||||||
type RuleStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:noStatus
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// Rule is the Schema for the rules API
|
|
||||||
type Rule struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec RuleSpec `json:"spec,omitempty"`
|
|
||||||
Status RuleStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// AuditRuleList contains a list of Rule
|
|
||||||
type RuleList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Rule `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Rule{}, &RuleList{})
|
|
||||||
}
|
|
||||||
261
vendor/kubesphere.io/api/auditing/v1alpha1/webhook_types.go
generated
vendored
261
vendor/kubesphere.io/api/auditing/v1alpha1/webhook_types.go
generated
vendored
@@ -1,261 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
// Receiver config which received the audit alert
|
|
||||||
type Receiver struct {
|
|
||||||
// Receiver name
|
|
||||||
// +optional
|
|
||||||
ReceicerName string `json:"name,omitempty" protobuf:"bytes,8,opt,name=name"`
|
|
||||||
// Receiver type, alertmanager or webhook
|
|
||||||
// +optional
|
|
||||||
ReceiverType string `json:"type,omitempty" protobuf:"bytes,8,opt,name=type"`
|
|
||||||
// ClientConfig holds the connection parameters for the webhook
|
|
||||||
// +optional
|
|
||||||
ReceiverConfig *WebhookClientConfig `json:"config,omitempty" protobuf:"bytes,8,opt,name=config"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AuditSinkPolicy struct {
|
|
||||||
ArchivingRuleSelector *metav1.LabelSelector `json:"archivingRuleSelector,omitempty" protobuf:"bytes,8,opt,name=archivingRuleSelector"`
|
|
||||||
AlertingRuleSelector *metav1.LabelSelector `json:"alertingRuleSelector,omitempty" protobuf:"bytes,8,opt,name=alertingRuleSelector"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DynamicAuditConfig struct {
|
|
||||||
// Throttle holds the options for throttling the webhook
|
|
||||||
// +optional
|
|
||||||
Throttle *WebhookThrottleConfig `json:"throttle,omitempty" protobuf:"bytes,18,opt,name=throttle"`
|
|
||||||
// Policy defines the policy for selecting which events should be sent to the webhook
|
|
||||||
// +optional
|
|
||||||
Policy *Policy `json:"policy,omitempty" protobuf:"bytes,18,opt,name=policy"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Policy struct {
|
|
||||||
// The Level that all requests are recorded at.
|
|
||||||
// available options: None, Metadata, Request, RequestResponse
|
|
||||||
// required
|
|
||||||
Level Level `json:"level" protobuf:"bytes,1,opt,name=level"`
|
|
||||||
|
|
||||||
// Stages is a list of stages for which events are created.
|
|
||||||
// +optional
|
|
||||||
Stages []Stage `json:"stages" protobuf:"bytes,2,opt,name=stages"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Stage string
|
|
||||||
|
|
||||||
type Level string
|
|
||||||
|
|
||||||
type WebhookThrottleConfig struct {
|
|
||||||
// ThrottleQPS maximum number of batches per second
|
|
||||||
// default 10 QPS
|
|
||||||
// +optional
|
|
||||||
QPS *int64 `json:"qps,omitempty" protobuf:"bytes,1,opt,name=qps"`
|
|
||||||
|
|
||||||
// ThrottleBurst is the maximum number of events sent at the same moment
|
|
||||||
// default 15 QPS
|
|
||||||
// +optional
|
|
||||||
Burst *int64 `json:"burst,omitempty" protobuf:"bytes,2,opt,name=burst"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// WebhookSpec defines the desired state of Webhook
|
|
||||||
type WebhookSpec struct {
|
|
||||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
|
|
||||||
// Number of desired pods. This is a pointer to distinguish between explicit
|
|
||||||
// zero and not specified. Defaults to 1.
|
|
||||||
// +optional
|
|
||||||
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
|
||||||
// The webhook docker image name.
|
|
||||||
// +optional
|
|
||||||
Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
|
|
||||||
// Image pull policy.
|
|
||||||
// One of Always, Never, IfNotPresent.
|
|
||||||
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
|
|
||||||
// Cannot be updated.
|
|
||||||
// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
|
|
||||||
// +optional
|
|
||||||
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
|
|
||||||
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
|
|
||||||
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
|
|
||||||
// in the case of docker, only DockerConfig type secrets are honored.
|
|
||||||
// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
|
|
||||||
// +optional
|
|
||||||
// +patchMergeKey=name
|
|
||||||
// +patchStrategy=merge
|
|
||||||
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
|
|
||||||
// Arguments to the entrypoint..
|
|
||||||
// It will be appended to the args and replace the default value.
|
|
||||||
// +optional
|
|
||||||
Args []string `json:"args,omitempty" protobuf:"bytes,3,rep,name=args"`
|
|
||||||
// NodeSelector is a selector which must be true for the pod to fit on a node.
|
|
||||||
// Selector which must match a node's labels for the pod to be scheduled on that node.
|
|
||||||
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
|
|
||||||
// +optional
|
|
||||||
NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
|
|
||||||
// If specified, the pod's scheduling constraints
|
|
||||||
// +optional
|
|
||||||
Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`
|
|
||||||
// If specified, the pod's tolerations.
|
|
||||||
// +optional
|
|
||||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
|
|
||||||
// Compute Resources required by this container.
|
|
||||||
// Cannot be updated.
|
|
||||||
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
|
|
||||||
// +optional
|
|
||||||
Resources *corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
|
|
||||||
// Receiver contains the information to make a connection with the alertmanager
|
|
||||||
// +optional
|
|
||||||
Receivers []Receiver `json:"receivers,omitempty" protobuf:"bytes,8,opt,name=receivers"`
|
|
||||||
|
|
||||||
// AuditSinkPolicy is a rule selector, only the rule matched this selector will be taked effect.
|
|
||||||
// +optional
|
|
||||||
*AuditSinkPolicy `json:"auditSinkPolicy,omitempty" protobuf:"bytes,8,opt,name=auditSinkPolicy"`
|
|
||||||
// Rule priority, DEBUG < INFO < WARNING
|
|
||||||
//Audit events will be stored only when the priority of the audit rule
|
|
||||||
// matching the audit event is greater than this.
|
|
||||||
Priority string `json:"priority,omitempty" protobuf:"bytes,8,opt,name=priority"`
|
|
||||||
// Audit type, static or dynamic.
|
|
||||||
AuditType string `json:"auditType,omitempty" protobuf:"bytes,8,opt,name=auditType"`
|
|
||||||
// The Level that all requests are recorded at.
|
|
||||||
// available options: None, Metadata, Request, RequestResponse
|
|
||||||
// default: Metadata
|
|
||||||
// +optional
|
|
||||||
AuditLevel Level `json:"auditLevel" protobuf:"bytes,1,opt,name=auditLevel"`
|
|
||||||
// K8s auditing is enabled or not.
|
|
||||||
K8sAuditingEnabled bool `json:"k8sAuditingEnabled,omitempty" protobuf:"bytes,8,opt,name=priority"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WebhookClientConfig struct {
|
|
||||||
// `url` gives the location of the webhook, in standard URL form
|
|
||||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
|
||||||
// must be specified.
|
|
||||||
//
|
|
||||||
// The `host` should not refer to a service running in the cluster; use
|
|
||||||
// the `service` field instead. The host might be resolved via external
|
|
||||||
// DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
|
|
||||||
// in-cluster DNS as that would be a layering violation). `host` may
|
|
||||||
// also be an IP address.
|
|
||||||
//
|
|
||||||
// Please note that using `localhost` or `127.0.0.1` as a `host` is
|
|
||||||
// risky unless you take great care to run this webhook on all hosts
|
|
||||||
// which run an apiserver which might need to make calls to this
|
|
||||||
// webhook. Such installs are likely to be non-portable, i.e., not easy
|
|
||||||
// to turn up in a new cluster.
|
|
||||||
//
|
|
||||||
// The scheme must be "https"; the URL must begin with "https://".
|
|
||||||
//
|
|
||||||
// A path is optional, and if present may be any string permissible in
|
|
||||||
// a URL. You may use the path to pass an arbitrary string to the
|
|
||||||
// webhook, for example, a cluster identifier.
|
|
||||||
//
|
|
||||||
// Attempting to use a user or basic auth e.g. "user:password@" is not
|
|
||||||
// allowed. Fragments ("#...") and query parameters ("?...") are not
|
|
||||||
// allowed, either.
|
|
||||||
//
|
|
||||||
// +optional
|
|
||||||
URL *string `json:"url,omitempty" protobuf:"bytes,1,opt,name=url"`
|
|
||||||
|
|
||||||
// `service` is a reference to the service for this webhook. Either
|
|
||||||
// `service` or `url` must be specified.
|
|
||||||
//
|
|
||||||
// If the webhook is running within the cluster, then you should use `service`.
|
|
||||||
//
|
|
||||||
// +optional
|
|
||||||
Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,2,opt,name=service"`
|
|
||||||
|
|
||||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
|
||||||
// If unspecified, system trust roots on the apiserver are used.
|
|
||||||
// +optional
|
|
||||||
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,3,opt,name=caBundle"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// WebhookStatus defines the observed state of Webhook
|
|
||||||
type WebhookStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:noStatus
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// Webhook is the Schema for the webhooks API
|
|
||||||
type Webhook struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec WebhookSpec `json:"spec,omitempty"`
|
|
||||||
Status WebhookStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// WebhookList contains a list of Webhook
|
|
||||||
type WebhookList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Webhook `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ServiceReference struct {
|
|
||||||
// `namespace` is the namespace of the service.
|
|
||||||
// Required
|
|
||||||
Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
|
|
||||||
|
|
||||||
// `name` is the name of the service.
|
|
||||||
// Required
|
|
||||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
|
||||||
|
|
||||||
// `path` is an optional URL path which will be sent in any request to
|
|
||||||
// this service.
|
|
||||||
// +optional
|
|
||||||
Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"`
|
|
||||||
|
|
||||||
// If specified, the port on the service that hosting webhook.
|
|
||||||
// Default to 443 for backward compatibility.
|
|
||||||
// `port` should be a valid port number (1-65535, inclusive).
|
|
||||||
// +optional
|
|
||||||
Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Webhook{}, &WebhookList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
// LevelNone disables auditing
|
|
||||||
LevelNone Level = "None"
|
|
||||||
// LevelMetadata provides the basic level of auditing.
|
|
||||||
LevelMetadata Level = "Metadata"
|
|
||||||
// LevelRequest provides Metadata level of auditing, and additionally
|
|
||||||
// logs the request object (does not apply for non-resource requests).
|
|
||||||
LevelRequest Level = "Request"
|
|
||||||
// LevelRequestResponse provides Request level of auditing, and additionally
|
|
||||||
// logs the response object (does not apply for non-resource requests and watches).
|
|
||||||
LevelRequestResponse Level = "RequestResponse"
|
|
||||||
)
|
|
||||||
454
vendor/kubesphere.io/api/auditing/v1alpha1/zz_generated.deepcopy.go
generated
vendored
454
vendor/kubesphere.io/api/auditing/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,454 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by controller-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *AuditSinkPolicy) DeepCopyInto(out *AuditSinkPolicy) {
|
|
||||||
*out = *in
|
|
||||||
if in.ArchivingRuleSelector != nil {
|
|
||||||
in, out := &in.ArchivingRuleSelector, &out.ArchivingRuleSelector
|
|
||||||
*out = new(v1.LabelSelector)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.AlertingRuleSelector != nil {
|
|
||||||
in, out := &in.AlertingRuleSelector, &out.AlertingRuleSelector
|
|
||||||
*out = new(v1.LabelSelector)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSinkPolicy.
|
|
||||||
func (in *AuditSinkPolicy) DeepCopy() *AuditSinkPolicy {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(AuditSinkPolicy)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DynamicAuditConfig) DeepCopyInto(out *DynamicAuditConfig) {
|
|
||||||
*out = *in
|
|
||||||
if in.Throttle != nil {
|
|
||||||
in, out := &in.Throttle, &out.Throttle
|
|
||||||
*out = new(WebhookThrottleConfig)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.Policy != nil {
|
|
||||||
in, out := &in.Policy, &out.Policy
|
|
||||||
*out = new(Policy)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicAuditConfig.
|
|
||||||
func (in *DynamicAuditConfig) DeepCopy() *DynamicAuditConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DynamicAuditConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PolicyRule) DeepCopyInto(out *PolicyRule) {
|
|
||||||
*out = *in
|
|
||||||
if in.List != nil {
|
|
||||||
in, out := &in.List, &out.List
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule.
|
|
||||||
func (in *PolicyRule) DeepCopy() *PolicyRule {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PolicyRule)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Receiver) DeepCopyInto(out *Receiver) {
|
|
||||||
*out = *in
|
|
||||||
in.ReceiverConfig.DeepCopyInto(out.ReceiverConfig)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receiver.
|
|
||||||
func (in *Receiver) DeepCopy() *Receiver {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Receiver)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Rule) DeepCopyInto(out *Rule) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
out.Status = in.Status
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
|
|
||||||
func (in *Rule) DeepCopy() *Rule {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Rule)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Rule) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RuleList) DeepCopyInto(out *RuleList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Rule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList.
|
|
||||||
func (in *RuleList) DeepCopy() *RuleList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RuleList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *RuleList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RuleSpec) DeepCopyInto(out *RuleSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.PolicyRules != nil {
|
|
||||||
in, out := &in.PolicyRules, &out.PolicyRules
|
|
||||||
*out = make([]PolicyRule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSpec.
|
|
||||||
func (in *RuleSpec) DeepCopy() *RuleSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RuleSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RuleStatus) DeepCopyInto(out *RuleStatus) {
|
|
||||||
*out = *in
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleStatus.
|
|
||||||
func (in *RuleStatus) DeepCopy() *RuleStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RuleStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Webhook) DeepCopyInto(out *Webhook) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
out.Status = in.Status
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook.
|
|
||||||
func (in *Webhook) DeepCopy() *Webhook {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Webhook)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Webhook) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WebhookList) DeepCopyInto(out *WebhookList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Webhook, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookList.
|
|
||||||
func (in *WebhookList) DeepCopy() *WebhookList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WebhookList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WebhookList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WebhookSpec) DeepCopyInto(out *WebhookSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Replicas != nil {
|
|
||||||
in, out := &in.Replicas, &out.Replicas
|
|
||||||
*out = new(int32)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.ImagePullSecrets != nil {
|
|
||||||
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
|
|
||||||
*out = make([]corev1.LocalObjectReference, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Args != nil {
|
|
||||||
in, out := &in.Args, &out.Args
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.NodeSelector != nil {
|
|
||||||
in, out := &in.NodeSelector, &out.NodeSelector
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Affinity != nil {
|
|
||||||
in, out := &in.Affinity, &out.Affinity
|
|
||||||
*out = new(corev1.Affinity)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.Tolerations != nil {
|
|
||||||
in, out := &in.Tolerations, &out.Tolerations
|
|
||||||
*out = make([]corev1.Toleration, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Resources != nil {
|
|
||||||
in, out := &in.Resources, &out.Resources
|
|
||||||
*out = new(corev1.ResourceRequirements)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.Receivers != nil {
|
|
||||||
in, out := &in.Receivers, &out.Receivers
|
|
||||||
*out = make([]Receiver, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.AuditSinkPolicy != nil {
|
|
||||||
in, out := &in.AuditSinkPolicy, &out.AuditSinkPolicy
|
|
||||||
*out = new(AuditSinkPolicy)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookSpec.
|
|
||||||
func (in *WebhookSpec) DeepCopy() *WebhookSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WebhookSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WebhookStatus) DeepCopyInto(out *WebhookStatus) {
|
|
||||||
*out = *in
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookStatus.
|
|
||||||
func (in *WebhookStatus) DeepCopy() *WebhookStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WebhookStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WebhookThrottleConfig) DeepCopyInto(out *WebhookThrottleConfig) {
|
|
||||||
*out = *in
|
|
||||||
if in.QPS != nil {
|
|
||||||
in, out := &in.QPS, &out.QPS
|
|
||||||
*out = new(int64)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.Burst != nil {
|
|
||||||
in, out := &in.Burst, &out.Burst
|
|
||||||
*out = new(int64)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookThrottleConfig.
|
|
||||||
func (in *WebhookThrottleConfig) DeepCopy() *WebhookThrottleConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WebhookThrottleConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Policy) DeepCopyInto(out *Policy) {
|
|
||||||
*out = *in
|
|
||||||
if in.Stages != nil {
|
|
||||||
in, out := &in.Stages, &out.Stages
|
|
||||||
*out = make([]Stage, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
|
|
||||||
func (in *Policy) DeepCopy() *Policy {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Policy)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) {
|
|
||||||
*out = *in
|
|
||||||
if in.URL != nil {
|
|
||||||
in, out := &in.URL, &out.URL
|
|
||||||
*out = new(string)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.Service != nil {
|
|
||||||
in, out := &in.Service, &out.Service
|
|
||||||
*out = new(ServiceReference)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.CABundle != nil {
|
|
||||||
in, out := &in.CABundle, &out.CABundle
|
|
||||||
*out = make([]byte, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig.
|
|
||||||
func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WebhookClientConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServiceReference) DeepCopyInto(out *ServiceReference) {
|
|
||||||
*out = *in
|
|
||||||
if in.Path != nil {
|
|
||||||
|
|
||||||
in, out := &in.Path, &out.Path
|
|
||||||
*out = new(string)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.Port != nil {
|
|
||||||
in, out := &in.Port, &out.Port
|
|
||||||
*out = new(int32)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
|
|
||||||
func (in *ServiceReference) DeepCopy() *ServiceReference {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServiceReference)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
189
vendor/kubesphere.io/api/cluster/v1alpha1/cluster_types.go
generated
vendored
189
vendor/kubesphere.io/api/cluster/v1alpha1/cluster_types.go
generated
vendored
@@ -1,189 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/core/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindCluster = "Cluster"
|
|
||||||
ResourcesSingularCluster = "cluster"
|
|
||||||
ResourcesPluralCluster = "clusters"
|
|
||||||
|
|
||||||
HostCluster = "cluster-role.kubesphere.io/host"
|
|
||||||
// Description of which region the cluster been placed
|
|
||||||
ClusterRegion = "cluster.kubesphere.io/region"
|
|
||||||
// Name of the cluster group
|
|
||||||
ClusterGroup = "cluster.kubesphere.io/group"
|
|
||||||
|
|
||||||
Finalizer = "finalizer.cluster.kubesphere.io"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ClusterSpec struct {
|
|
||||||
|
|
||||||
// Join cluster as a kubefed cluster
|
|
||||||
JoinFederation bool `json:"joinFederation,omitempty"`
|
|
||||||
|
|
||||||
// Desired state of the cluster
|
|
||||||
Enable bool `json:"enable,omitempty"`
|
|
||||||
|
|
||||||
// Provider of the cluster, this field is just for description
|
|
||||||
Provider string `json:"provider,omitempty"`
|
|
||||||
|
|
||||||
// Connection holds info to connect to the member cluster
|
|
||||||
Connection Connection `json:"connection,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ConnectionType string
|
|
||||||
|
|
||||||
const (
|
|
||||||
ConnectionTypeDirect ConnectionType = "direct"
|
|
||||||
ConnectionTypeProxy ConnectionType = "proxy"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Connection struct {
|
|
||||||
|
|
||||||
// type defines how host cluster will connect to host cluster
|
|
||||||
// ConnectionTypeDirect means direct connection, this requires
|
|
||||||
// kubeconfig and kubesphere apiserver endpoint provided
|
|
||||||
// ConnectionTypeProxy means using kubesphere proxy, no kubeconfig
|
|
||||||
// or kubesphere apiserver endpoint required
|
|
||||||
Type ConnectionType `json:"type,omitempty"`
|
|
||||||
|
|
||||||
// KubeSphere API Server endpoint. Example: http://10.10.0.11:8080
|
|
||||||
// Should provide this field explicitly if connection type is direct.
|
|
||||||
// Will be populated by ks-apiserver if connection type is proxy.
|
|
||||||
KubeSphereAPIEndpoint string `json:"kubesphereAPIEndpoint,omitempty"`
|
|
||||||
|
|
||||||
// Kubernetes API Server endpoint. Example: https://10.10.0.1:6443
|
|
||||||
// Should provide this field explicitly if connection type is direct.
|
|
||||||
// Will be populated by ks-apiserver if connection type is proxy.
|
|
||||||
KubernetesAPIEndpoint string `json:"kubernetesAPIEndpoint,omitempty"`
|
|
||||||
|
|
||||||
// KubeConfig content used to connect to cluster api server
|
|
||||||
// Should provide this field explicitly if connection type is direct.
|
|
||||||
// Will be populated by ks-proxy if connection type is proxy.
|
|
||||||
KubeConfig []byte `json:"kubeconfig,omitempty"`
|
|
||||||
|
|
||||||
// Token used by agents of member cluster to connect to host cluster proxy.
|
|
||||||
// This field is populated by apiserver only if connection type is proxy.
|
|
||||||
Token string `json:"token,omitempty"`
|
|
||||||
|
|
||||||
// KubeAPIServerPort is the port which listens for forwarding kube-apiserver traffic
|
|
||||||
// Only applicable when connection type is proxy.
|
|
||||||
KubernetesAPIServerPort uint16 `json:"kubernetesAPIServerPort,omitempty"`
|
|
||||||
|
|
||||||
// KubeSphereAPIServerPort is the port which listens for forwarding kubesphere apigateway traffic
|
|
||||||
// Only applicable when connection type is proxy.
|
|
||||||
KubeSphereAPIServerPort uint16 `json:"kubesphereAPIServerPort,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ClusterConditionType string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Cluster agent is initialized and waiting for connecting
|
|
||||||
ClusterInitialized ClusterConditionType = "Initialized"
|
|
||||||
|
|
||||||
// Cluster agent is available
|
|
||||||
ClusterAgentAvailable ClusterConditionType = "AgentAvailable"
|
|
||||||
|
|
||||||
// Cluster has been one of federated clusters
|
|
||||||
ClusterFederated ClusterConditionType = "Federated"
|
|
||||||
|
|
||||||
// Cluster is all available for requests
|
|
||||||
ClusterReady ClusterConditionType = "Ready"
|
|
||||||
|
|
||||||
// Openpitrix runtime is created
|
|
||||||
ClusterOpenPitrixRuntimeReady ClusterConditionType = "OpenPitrixRuntimeReady"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ClusterCondition struct {
|
|
||||||
// Type of the condition
|
|
||||||
Type ClusterConditionType `json:"type"`
|
|
||||||
// Status of the condition, one of True, False, Unknown.
|
|
||||||
Status v1.ConditionStatus `json:"status"`
|
|
||||||
// The last time this condition was updated.
|
|
||||||
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
|
|
||||||
// Last time the condition transitioned from one status to another.
|
|
||||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
|
||||||
// The reason for the condition's last transition.
|
|
||||||
Reason string `json:"reason,omitempty"`
|
|
||||||
// A human readable message indicating details about the transition.
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ClusterStatus struct {
|
|
||||||
|
|
||||||
// Represents the latest available observations of a cluster's current state.
|
|
||||||
Conditions []ClusterCondition `json:"conditions,omitempty"`
|
|
||||||
|
|
||||||
// GitVersion of the kubernetes cluster, this field is populated by cluster controller
|
|
||||||
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
|
|
||||||
|
|
||||||
// GitVersion of the /kapis/version api response, this field is populated by cluster controller
|
|
||||||
KubeSphereVersion string `json:"kubeSphereVersion,omitempty"`
|
|
||||||
|
|
||||||
// Count of the kubernetes cluster nodes
|
|
||||||
// This field may not reflect the instant status of the cluster.
|
|
||||||
NodeCount int `json:"nodeCount,omitempty"`
|
|
||||||
|
|
||||||
// Zones are the names of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
|
|
||||||
// +optional
|
|
||||||
Zones []string `json:"zones,omitempty"`
|
|
||||||
|
|
||||||
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
|
|
||||||
// +optional
|
|
||||||
Region *string `json:"region,omitempty"`
|
|
||||||
|
|
||||||
// Configz is status of components enabled in the member cluster. This is synchronized with member cluster
|
|
||||||
// every amount of time, like 5 minutes.
|
|
||||||
// +optional
|
|
||||||
Configz map[string]bool `json:"configz,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:printcolumn:name="Federated",type="boolean",JSONPath=".spec.joinFederation"
|
|
||||||
// +kubebuilder:printcolumn:name="Provider",type="string",JSONPath=".spec.provider"
|
|
||||||
// +kubebuilder:printcolumn:name="Active",type="boolean",JSONPath=".spec.enable"
|
|
||||||
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.kubernetesVersion"
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
|
|
||||||
// Cluster is the schema for the clusters API
|
|
||||||
type Cluster struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec ClusterSpec `json:"spec,omitempty"`
|
|
||||||
Status ClusterStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
type ClusterList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Cluster `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Cluster{}, &ClusterList{})
|
|
||||||
}
|
|
||||||
24
vendor/kubesphere.io/api/cluster/v1alpha1/doc.go
generated
vendored
24
vendor/kubesphere.io/api/cluster/v1alpha1/doc.go
generated
vendored
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the tower v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/cluster
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=cluster.kubesphere.io
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
14502
vendor/kubesphere.io/api/cluster/v1alpha1/openapi_generated.go
generated
vendored
14502
vendor/kubesphere.io/api/cluster/v1alpha1/openapi_generated.go
generated
vendored
File diff suppressed because it is too large
Load Diff
57
vendor/kubesphere.io/api/cluster/v1alpha1/register.go
generated
vendored
57
vendor/kubesphere.io/api/cluster/v1alpha1/register.go
generated
vendored
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the tower v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=cluster.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// GroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "cluster.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme adds the types in this group-version to the given scheme.
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
182
vendor/kubesphere.io/api/cluster/v1alpha1/zz_generated.deepcopy.go
generated
vendored
182
vendor/kubesphere.io/api/cluster/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,182 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Cluster) DeepCopyInto(out *Cluster) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
|
|
||||||
func (in *Cluster) DeepCopy() *Cluster {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Cluster)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Cluster) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) {
|
|
||||||
*out = *in
|
|
||||||
in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
|
|
||||||
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition.
|
|
||||||
func (in *ClusterCondition) DeepCopy() *ClusterCondition {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ClusterCondition)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ClusterList) DeepCopyInto(out *ClusterList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Cluster, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
|
|
||||||
func (in *ClusterList) DeepCopy() *ClusterList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ClusterList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ClusterList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.Connection.DeepCopyInto(&out.Connection)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
|
|
||||||
func (in *ClusterSpec) DeepCopy() *ClusterSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ClusterSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.Conditions != nil {
|
|
||||||
in, out := &in.Conditions, &out.Conditions
|
|
||||||
*out = make([]ClusterCondition, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Zones != nil {
|
|
||||||
in, out := &in.Zones, &out.Zones
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Region != nil {
|
|
||||||
in, out := &in.Region, &out.Region
|
|
||||||
*out = new(string)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.Configz != nil {
|
|
||||||
in, out := &in.Configz, &out.Configz
|
|
||||||
*out = make(map[string]bool, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
|
|
||||||
func (in *ClusterStatus) DeepCopy() *ClusterStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ClusterStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Connection) DeepCopyInto(out *Connection) {
|
|
||||||
*out = *in
|
|
||||||
if in.KubeConfig != nil {
|
|
||||||
in, out := &in.KubeConfig, &out.KubeConfig
|
|
||||||
*out = make([]byte, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connection.
|
|
||||||
func (in *Connection) DeepCopy() *Connection {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Connection)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
29
vendor/kubesphere.io/api/constants/constants.go
generated
vendored
29
vendor/kubesphere.io/api/constants/constants.go
generated
vendored
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package constants
|
|
||||||
|
|
||||||
const (
|
|
||||||
WorkspaceLabelKey = "kubesphere.io/workspace"
|
|
||||||
NameLabelKey = "kubesphere.io/name"
|
|
||||||
NamespaceLabelKey = "kubesphere.io/namespace"
|
|
||||||
CreatorAnnotationKey = "kubesphere.io/creator"
|
|
||||||
ClusterNameLabelKey = "kubesphere.io/cluster"
|
|
||||||
ChartRepoIdLabelKey = "application.kubesphere.io/repo-id"
|
|
||||||
ChartApplicationIdLabelKey = "application.kubesphere.io/app-id"
|
|
||||||
ChartApplicationVersionIdLabelKey = "application.kubesphere.io/app-version-id"
|
|
||||||
CategoryIdLabelKey = "application.kubesphere.io/app-category-id"
|
|
||||||
)
|
|
||||||
31
vendor/kubesphere.io/api/devops/crdinstall/install.go
generated
vendored
31
vendor/kubesphere.io/api/devops/crdinstall/install.go
generated
vendored
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package install
|
|
||||||
|
|
||||||
import (
|
|
||||||
k8sruntime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
|
|
||||||
|
|
||||||
devopsv1alpha1 "kubesphere.io/api/devops/v1alpha1"
|
|
||||||
devopsv1alpha3 "kubesphere.io/api/devops/v1alpha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Install(scheme *k8sruntime.Scheme) {
|
|
||||||
urlruntime.Must(devopsv1alpha1.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(devopsv1alpha3.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(scheme.SetVersionPriority(devopsv1alpha3.SchemeGroupVersion, devopsv1alpha1.SchemeGroupVersion))
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/devops/v1alpha1/doc.go
generated
vendored
23
vendor/kubesphere.io/api/devops/v1alpha1/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the devops v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/devops
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=devops.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
16124
vendor/kubesphere.io/api/devops/v1alpha1/openapi_generated.go
generated
vendored
16124
vendor/kubesphere.io/api/devops/v1alpha1/openapi_generated.go
generated
vendored
File diff suppressed because it is too large
Load Diff
46
vendor/kubesphere.io/api/devops/v1alpha1/register.go
generated
vendored
46
vendor/kubesphere.io/api/devops/v1alpha1/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the devops v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/devops
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=devops.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "devops.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
91
vendor/kubesphere.io/api/devops/v1alpha1/s2ibinary_types.go
generated
vendored
91
vendor/kubesphere.io/api/devops/v1alpha1/s2ibinary_types.go
generated
vendored
@@ -1,91 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindS2iBinary = "S2iBinary"
|
|
||||||
ResourceSingularS2iBinary = "s2ibinary"
|
|
||||||
ResourcePluralS2iBinary = "s2ibinaries"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
StatusUploading = "Uploading"
|
|
||||||
StatusReady = "Ready"
|
|
||||||
StatusUploadFailed = "UploadFailed"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
S2iBinaryFinalizerName = "s2ibinary.finalizers.kubesphere.io"
|
|
||||||
S2iBinaryLabelKey = "s2ibinary-name.kubesphere.io"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
// S2iBinarySpec defines the desired state of S2iBinary
|
|
||||||
type S2iBinarySpec struct {
|
|
||||||
//FileName is filename of binary
|
|
||||||
FileName string `json:"fileName,omitempty"`
|
|
||||||
//MD5 is Binary's MD5 Hash
|
|
||||||
MD5 string `json:"md5,omitempty"`
|
|
||||||
//Size is the file size of file
|
|
||||||
Size string `json:"size,omitempty"`
|
|
||||||
//DownloadURL in KubeSphere
|
|
||||||
DownloadURL string `json:"downloadURL,omitempty"`
|
|
||||||
// UploadTime is last upload time
|
|
||||||
UploadTimeStamp *metav1.Time `json:"uploadTimeStamp,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// S2iBinaryStatus defines the observed state of S2iBinary
|
|
||||||
type S2iBinaryStatus struct {
|
|
||||||
//Phase is status of S2iBinary . Possible value is "Ready","UnableToDownload"
|
|
||||||
Phase string `json:"phase,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iBinary is the Schema for the s2ibinaries API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:printcolumn:name="FileName",type="string",JSONPath=".spec.fileName"
|
|
||||||
// +kubebuilder:printcolumn:name="MD5",type="string",JSONPath=".spec.md5"
|
|
||||||
// +kubebuilder:printcolumn:name="Size",type="string",JSONPath=".spec.size"
|
|
||||||
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase"
|
|
||||||
type S2iBinary struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec S2iBinarySpec `json:"spec,omitempty"`
|
|
||||||
Status S2iBinaryStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iBinaryList contains a list of S2iBinary
|
|
||||||
type S2iBinaryList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []S2iBinary `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&S2iBinary{}, &S2iBinaryList{})
|
|
||||||
}
|
|
||||||
516
vendor/kubesphere.io/api/devops/v1alpha1/s2ibuilder_types.go
generated
vendored
516
vendor/kubesphere.io/api/devops/v1alpha1/s2ibuilder_types.go
generated
vendored
@@ -1,516 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
type RunState string
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindS2iBuilder = "S2iBuilder"
|
|
||||||
ResourceSingularS2iBuilder = "s2ibuilder"
|
|
||||||
ResourcePluralS2iBuilder = "s2ibuilders"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
NotRunning RunState = "Not Running Yet"
|
|
||||||
Running RunState = "Running"
|
|
||||||
Successful RunState = "Successful"
|
|
||||||
Failed RunState = "Failed"
|
|
||||||
Unknown RunState = "Unknown"
|
|
||||||
)
|
|
||||||
const (
|
|
||||||
AutoScaleAnnotations = "devops.kubesphere.io/autoscale"
|
|
||||||
S2iRunLabel = "devops.kubesphere.io/s2ir"
|
|
||||||
S2irCompletedScaleAnnotations = "devops.kubesphere.io/completedscale"
|
|
||||||
WorkLoadCompletedInitAnnotations = "devops.kubesphere.io/inithasbeencomplted"
|
|
||||||
S2iRunDoNotAutoScaleAnnotations = "devops.kubesphere.io/donotautoscale"
|
|
||||||
DescriptionAnnotations = "desc"
|
|
||||||
)
|
|
||||||
const (
|
|
||||||
KindDeployment = "Deployment"
|
|
||||||
KindStatefulSet = "StatefulSet"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EnvironmentSpec specifies a single environment variable.
|
|
||||||
type EnvironmentSpec struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Value string `json:"value"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ProxyConfig holds proxy configuration.
|
|
||||||
type ProxyConfig struct {
|
|
||||||
HTTPProxy string `json:"httpProxy,omitempty"`
|
|
||||||
HTTPSProxy string `json:"httpsProxy,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CGroupLimits holds limits used to constrain container resources.
|
|
||||||
type CGroupLimits struct {
|
|
||||||
MemoryLimitBytes int64 `json:"memoryLimitBytes"`
|
|
||||||
CPUShares int64 `json:"cpuShares"`
|
|
||||||
CPUPeriod int64 `json:"cpuPeriod"`
|
|
||||||
CPUQuota int64 `json:"cpuQuota"`
|
|
||||||
MemorySwap int64 `json:"memorySwap"`
|
|
||||||
Parent string `json:"parent"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// VolumeSpec represents a single volume mount point.
|
|
||||||
type VolumeSpec struct {
|
|
||||||
// Source is a reference to the volume source.
|
|
||||||
Source string `json:"source,omitempty"`
|
|
||||||
// Destination is the path to mount the volume to - absolute or relative.
|
|
||||||
Destination string `json:"destination,omitempty"`
|
|
||||||
// Keep indicates if the mounted data should be kept in the final image.
|
|
||||||
Keep bool `json:"keep,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DockerConfig contains the configuration for a Docker connection.
|
|
||||||
type DockerConfig struct {
|
|
||||||
// Endpoint is the docker network endpoint or socket
|
|
||||||
Endpoint string `json:"endPoint"`
|
|
||||||
|
|
||||||
// CertFile is the certificate file path for a TLS connection
|
|
||||||
CertFile string `json:"certFile"`
|
|
||||||
|
|
||||||
// KeyFile is the key file path for a TLS connection
|
|
||||||
KeyFile string `json:"keyFile"`
|
|
||||||
|
|
||||||
// CAFile is the certificate authority file path for a TLS connection
|
|
||||||
CAFile string `json:"caFile"`
|
|
||||||
|
|
||||||
// UseTLS indicates if TLS must be used
|
|
||||||
UseTLS bool `json:"useTLS"`
|
|
||||||
|
|
||||||
// TLSVerify indicates if TLS peer must be verified
|
|
||||||
TLSVerify bool `json:"tlsVerify"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AuthConfig is our abstraction of the Registry authorization information for whatever
|
|
||||||
// docker client we happen to be based on
|
|
||||||
type AuthConfig struct {
|
|
||||||
Username string `json:"username,omitempty"`
|
|
||||||
Password string `json:"password,omitempty"`
|
|
||||||
Email string `json:"email,omitempty"`
|
|
||||||
ServerAddress string `json:"serverAddress,omitempty"`
|
|
||||||
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerConfig is the abstraction of the docker client provider (formerly go-dockerclient, now either
|
|
||||||
// engine-api or kube docker client) container.Config type that is leveraged by s2i or origin
|
|
||||||
type ContainerConfig struct {
|
|
||||||
Labels map[string]string
|
|
||||||
Env []string
|
|
||||||
}
|
|
||||||
|
|
||||||
type PullPolicy string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// PullAlways means that we always attempt to pull the latest image.
|
|
||||||
PullAlways PullPolicy = "always"
|
|
||||||
|
|
||||||
// PullNever means that we never pull an image, but only use a local image.
|
|
||||||
PullNever PullPolicy = "never"
|
|
||||||
|
|
||||||
// PullIfNotPresent means that we pull if the image isn't present on disk.
|
|
||||||
PullIfNotPresent PullPolicy = "if-not-present"
|
|
||||||
|
|
||||||
// DefaultBuilderPullPolicy specifies the default pull policy to use
|
|
||||||
DefaultBuilderPullPolicy = PullIfNotPresent
|
|
||||||
|
|
||||||
// DefaultRuntimeImagePullPolicy specifies the default pull policy to use.
|
|
||||||
DefaultRuntimeImagePullPolicy = PullIfNotPresent
|
|
||||||
|
|
||||||
// DefaultPreviousImagePullPolicy specifies policy for pulling the previously
|
|
||||||
// build Docker image when doing incremental build
|
|
||||||
DefaultPreviousImagePullPolicy = PullIfNotPresent
|
|
||||||
)
|
|
||||||
|
|
||||||
// DockerNetworkMode specifies the network mode setting for the docker container
|
|
||||||
type DockerNetworkMode string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// DockerNetworkModeHost places the container in the default (host) network namespace.
|
|
||||||
DockerNetworkModeHost DockerNetworkMode = "host"
|
|
||||||
// DockerNetworkModeBridge instructs docker to create a network namespace for this container connected to the docker0 bridge via a veth-pair.
|
|
||||||
DockerNetworkModeBridge DockerNetworkMode = "bridge"
|
|
||||||
// DockerNetworkModeContainerPrefix is the string prefix used by NewDockerNetworkModeContainer.
|
|
||||||
DockerNetworkModeContainerPrefix string = "container:"
|
|
||||||
// DockerNetworkModeNetworkNamespacePrefix is the string prefix used when sharing a namespace from a CRI-O container.
|
|
||||||
DockerNetworkModeNetworkNamespacePrefix string = "netns:"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TriggerSource string
|
|
||||||
|
|
||||||
const (
|
|
||||||
Default TriggerSource = "Manual"
|
|
||||||
Github TriggerSource = "Github"
|
|
||||||
Gitlab TriggerSource = "Gitlab"
|
|
||||||
SVN TriggerSource = "SVN"
|
|
||||||
Others TriggerSource = "Others"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewDockerNetworkModeContainer creates a DockerNetworkMode value which instructs docker to place the container in the network namespace of an existing container.
|
|
||||||
// It can be used, for instance, to place the s2i container in the network namespace of the infrastructure container of a k8s pod.
|
|
||||||
func NewDockerNetworkModeContainer(id string) DockerNetworkMode {
|
|
||||||
return DockerNetworkMode(DockerNetworkModeContainerPrefix + id)
|
|
||||||
}
|
|
||||||
|
|
||||||
// String implements the String() function of pflags.Value so this can be used as
|
|
||||||
// command line parameter.
|
|
||||||
// This method is really used just to show the default value when printing help.
|
|
||||||
// It will not default the configuration.
|
|
||||||
func (p *PullPolicy) String() string {
|
|
||||||
if len(string(*p)) == 0 {
|
|
||||||
return string(DefaultBuilderPullPolicy)
|
|
||||||
}
|
|
||||||
return string(*p)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Type implements the Type() function of pflags.Value interface
|
|
||||||
func (p *PullPolicy) Type() string {
|
|
||||||
return "string"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set implements the Set() function of pflags.Value interface
|
|
||||||
// The valid options are "always", "never" or "if-not-present"
|
|
||||||
func (p *PullPolicy) Set(v string) error {
|
|
||||||
switch v {
|
|
||||||
case "always":
|
|
||||||
*p = PullAlways
|
|
||||||
case "never":
|
|
||||||
*p = PullNever
|
|
||||||
case "if-not-present":
|
|
||||||
*p = PullIfNotPresent
|
|
||||||
default:
|
|
||||||
return fmt.Errorf("invalid value %q, valid values are: always, never or if-not-present", v)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type S2iConfig struct {
|
|
||||||
// DisplayName is a result image display-name label. This defaults to the
|
|
||||||
// output image name.
|
|
||||||
DisplayName string `json:"displayName,omitempty"`
|
|
||||||
|
|
||||||
// Description is a result image description label. The default is no
|
|
||||||
// description.
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
|
|
||||||
// BuilderImage describes which image is used for building the result images.
|
|
||||||
BuilderImage string `json:"builderImage,omitempty"`
|
|
||||||
|
|
||||||
// BuilderImageVersion provides optional version information about the builder image.
|
|
||||||
BuilderImageVersion string `json:"builderImageVersion,omitempty"`
|
|
||||||
|
|
||||||
// BuilderBaseImageVersion provides optional version information about the builder base image.
|
|
||||||
BuilderBaseImageVersion string `json:"builderBaseImageVersion,omitempty"`
|
|
||||||
|
|
||||||
// RuntimeImage specifies the image that will be a base for resulting image
|
|
||||||
// and will be used for running an application. By default, BuilderImage is
|
|
||||||
// used for building and running, but the latter may be overridden.
|
|
||||||
RuntimeImage string `json:"runtimeImage,omitempty"`
|
|
||||||
|
|
||||||
//OutputImageName is a result image name without tag, default is latest. tag will append to ImageName in the end
|
|
||||||
OutputImageName string `json:"outputImageName,omitempty"`
|
|
||||||
// RuntimeImagePullPolicy specifies when to pull a runtime image.
|
|
||||||
RuntimeImagePullPolicy PullPolicy `json:"runtimeImagePullPolicy,omitempty"`
|
|
||||||
|
|
||||||
// RuntimeAuthentication holds the authentication information for pulling the
|
|
||||||
// runtime Docker images from private repositories.
|
|
||||||
RuntimeAuthentication *AuthConfig `json:"runtimeAuthentication,omitempty"`
|
|
||||||
|
|
||||||
// RuntimeArtifacts specifies a list of source/destination pairs that will
|
|
||||||
// be copied from builder to a runtime image. Source can be a file or
|
|
||||||
// directory. Destination must be a directory. Regardless whether it
|
|
||||||
// is an absolute or relative path, it will be placed into image's WORKDIR.
|
|
||||||
// Destination also can be empty or equals to ".", in this case it just
|
|
||||||
// refers to a root of WORKDIR.
|
|
||||||
// In case it's empty, S2I will try to get this list from
|
|
||||||
// io.openshift.s2i.assemble-input-files label on a RuntimeImage.
|
|
||||||
RuntimeArtifacts []VolumeSpec `json:"runtimeArtifacts,omitempty"`
|
|
||||||
|
|
||||||
// DockerConfig describes how to access host docker daemon.
|
|
||||||
DockerConfig *DockerConfig `json:"dockerConfig,omitempty"`
|
|
||||||
|
|
||||||
// PullAuthentication holds the authentication information for pulling the
|
|
||||||
// Docker images from private repositories
|
|
||||||
PullAuthentication *AuthConfig `json:"pullAuthentication,omitempty"`
|
|
||||||
|
|
||||||
// PullAuthentication holds the authentication information for pulling the
|
|
||||||
// Docker images from private repositories
|
|
||||||
PushAuthentication *AuthConfig `json:"pushAuthentication,omitempty"`
|
|
||||||
|
|
||||||
// IncrementalAuthentication holds the authentication information for pulling the
|
|
||||||
// previous image from private repositories
|
|
||||||
IncrementalAuthentication *AuthConfig `json:"incrementalAuthentication,omitempty"`
|
|
||||||
|
|
||||||
// DockerNetworkMode is used to set the docker network setting to --net=container:<id>
|
|
||||||
// when the builder is invoked from a container.
|
|
||||||
DockerNetworkMode DockerNetworkMode `json:"dockerNetworkMode,omitempty"`
|
|
||||||
|
|
||||||
// PreserveWorkingDir describes if working directory should be left after processing.
|
|
||||||
PreserveWorkingDir bool `json:"preserveWorkingDir,omitempty"`
|
|
||||||
|
|
||||||
//ImageName Contains the registry address and reponame, tag should set by field tag alone
|
|
||||||
ImageName string `json:"imageName"`
|
|
||||||
// Tag is a result image tag name.
|
|
||||||
Tag string `json:"tag,omitempty"`
|
|
||||||
|
|
||||||
// BuilderPullPolicy specifies when to pull the builder image
|
|
||||||
BuilderPullPolicy PullPolicy `json:"builderPullPolicy,omitempty"`
|
|
||||||
|
|
||||||
// PreviousImagePullPolicy specifies when to pull the previously build image
|
|
||||||
// when doing incremental build
|
|
||||||
PreviousImagePullPolicy PullPolicy `json:"previousImagePullPolicy,omitempty"`
|
|
||||||
|
|
||||||
// Incremental describes whether to try to perform incremental build.
|
|
||||||
Incremental bool `json:"incremental,omitempty"`
|
|
||||||
|
|
||||||
// IncrementalFromTag sets an alternative image tag to look for existing
|
|
||||||
// artifacts. Tag is used by default if this is not set.
|
|
||||||
IncrementalFromTag string `json:"incrementalFromTag,omitempty"`
|
|
||||||
|
|
||||||
// RemovePreviousImage describes if previous image should be removed after successful build.
|
|
||||||
// This applies only to incremental builds.
|
|
||||||
RemovePreviousImage bool `json:"removePreviousImage,omitempty"`
|
|
||||||
|
|
||||||
// Environment is a map of environment variables to be passed to the image.
|
|
||||||
Environment []EnvironmentSpec `json:"environment,omitempty"`
|
|
||||||
|
|
||||||
// LabelNamespace provides the namespace under which the labels will be generated.
|
|
||||||
LabelNamespace string `json:"labelNamespace,omitempty"`
|
|
||||||
|
|
||||||
// CallbackURL is a URL which is called upon successful build to inform about that fact.
|
|
||||||
CallbackURL string `json:"callbackUrl,omitempty"`
|
|
||||||
|
|
||||||
// ScriptsURL is a URL describing where to fetch the S2I scripts from during build process.
|
|
||||||
// This url can be a reference within the builder image if the scheme is specified as image://
|
|
||||||
ScriptsURL string `json:"scriptsUrl,omitempty"`
|
|
||||||
|
|
||||||
// Destination specifies a location where the untar operation will place its artifacts.
|
|
||||||
Destination string `json:"destination,omitempty"`
|
|
||||||
|
|
||||||
// WorkingDir describes temporary directory used for downloading sources, scripts and tar operations.
|
|
||||||
WorkingDir string `json:"workingDir,omitempty"`
|
|
||||||
|
|
||||||
// WorkingSourceDir describes the subdirectory off of WorkingDir set up during the repo download
|
|
||||||
// that is later used as the root for ignore processing
|
|
||||||
WorkingSourceDir string `json:"workingSourceDir,omitempty"`
|
|
||||||
|
|
||||||
// LayeredBuild describes if this is build which layered scripts and sources on top of BuilderImage.
|
|
||||||
LayeredBuild bool `json:"layeredBuild,omitempty"`
|
|
||||||
|
|
||||||
// Specify a relative directory inside the application repository that should
|
|
||||||
// be used as a root directory for the application.
|
|
||||||
ContextDir string `json:"contextDir,omitempty"`
|
|
||||||
|
|
||||||
// AssembleUser specifies the user to run the assemble script in container
|
|
||||||
AssembleUser string `json:"assembleUser,omitempty"`
|
|
||||||
|
|
||||||
// RunImage will trigger a "docker run ..." invocation of the produced image so the user
|
|
||||||
// can see if it operates as he would expect
|
|
||||||
RunImage bool `json:"runImage,omitempty"`
|
|
||||||
|
|
||||||
// Usage allows for properly shortcircuiting s2i logic when `s2i usage` is invoked
|
|
||||||
Usage bool `json:"usage,omitempty"`
|
|
||||||
|
|
||||||
// Injections specifies a list source/destination folders that are injected to
|
|
||||||
// the container that runs assemble.
|
|
||||||
// All files we inject will be truncated after the assemble script finishes.
|
|
||||||
Injections []VolumeSpec `json:"injections,omitempty"`
|
|
||||||
|
|
||||||
// CGroupLimits describes the cgroups limits that will be applied to any containers
|
|
||||||
// run by s2i.
|
|
||||||
CGroupLimits *CGroupLimits `json:"cgroupLimits,omitempty"`
|
|
||||||
|
|
||||||
// DropCapabilities contains a list of capabilities to drop when executing containers
|
|
||||||
DropCapabilities []string `json:"dropCapabilities,omitempty"`
|
|
||||||
|
|
||||||
// ScriptDownloadProxyConfig optionally specifies the http and https proxy
|
|
||||||
// to use when downloading scripts
|
|
||||||
ScriptDownloadProxyConfig *ProxyConfig `json:"scriptDownloadProxyConfig,omitempty"`
|
|
||||||
|
|
||||||
// ExcludeRegExp contains a string representation of the regular expression desired for
|
|
||||||
// deciding which files to exclude from the tar stream
|
|
||||||
ExcludeRegExp string `json:"excludeRegExp,omitempty"`
|
|
||||||
|
|
||||||
// BlockOnBuild prevents s2i from performing a docker build operation
|
|
||||||
// if one is necessary to execute ONBUILD commands, or to layer source code into
|
|
||||||
// the container for images that don't have a tar binary available, if the
|
|
||||||
// image contains ONBUILD commands that would be executed.
|
|
||||||
BlockOnBuild bool `json:"blockOnBuild,omitempty"`
|
|
||||||
|
|
||||||
// HasOnBuild will be set to true if the builder image contains ONBUILD instructions
|
|
||||||
HasOnBuild bool `json:"hasOnBuild,omitempty"`
|
|
||||||
|
|
||||||
// BuildVolumes specifies a list of volumes to mount to container running the
|
|
||||||
// build.
|
|
||||||
BuildVolumes []string `json:"buildVolumes,omitempty"`
|
|
||||||
|
|
||||||
// Labels specify labels and their values to be applied to the resulting image. Label keys
|
|
||||||
// must have non-zero length. The labels defined here override generated labels in case
|
|
||||||
// they have the same name.
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
|
|
||||||
// SecurityOpt are passed as options to the docker containers launched by s2i.
|
|
||||||
SecurityOpt []string `json:"securityOpt,omitempty"`
|
|
||||||
|
|
||||||
// KeepSymlinks indicates to copy symlinks as symlinks. Default behavior is to follow
|
|
||||||
// symlinks and copy files by content.
|
|
||||||
KeepSymlinks bool `json:"keepSymlinks,omitempty"`
|
|
||||||
|
|
||||||
// AsDockerfile indicates the path where the Dockerfile should be written instead of building
|
|
||||||
// a new image.
|
|
||||||
AsDockerfile string `json:"asDockerfile,omitempty"`
|
|
||||||
|
|
||||||
// ImageWorkDir is the default working directory for the builder image.
|
|
||||||
ImageWorkDir string `json:"imageWorkDir,omitempty"`
|
|
||||||
|
|
||||||
// ImageScriptsURL is the default location to find the assemble/run scripts for a builder image.
|
|
||||||
// This url can be a reference within the builder image if the scheme is specified as image://
|
|
||||||
ImageScriptsURL string `json:"imageScriptsUrl,omitempty"`
|
|
||||||
|
|
||||||
// AddHost Add a line to /etc/hosts for test purpose or private use in LAN. Its format is host:IP,multiple hosts can be added by using multiple --add-host
|
|
||||||
AddHost []string `json:"addHost,omitempty"`
|
|
||||||
|
|
||||||
// Export Push the result image to specify image registry in tag
|
|
||||||
Export bool `json:"export,omitempty"`
|
|
||||||
|
|
||||||
// SourceURL is url of the codes such as https://github.com/a/b.git
|
|
||||||
SourceURL string `json:"sourceUrl"`
|
|
||||||
|
|
||||||
// IsBinaryURL explain the type of SourceURL.
|
|
||||||
// If it is IsBinaryURL, it will download the file directly without using git.
|
|
||||||
IsBinaryURL bool `json:"isBinaryURL,omitempty"`
|
|
||||||
|
|
||||||
// GitSecretRef is the BasicAuth Secret of Git Clone
|
|
||||||
GitSecretRef *corev1.LocalObjectReference `json:"gitSecretRef,omitempty"`
|
|
||||||
|
|
||||||
// The RevisionId is a branch name or a SHA-1 hash of every important thing about the commit
|
|
||||||
RevisionId string `json:"revisionId,omitempty"`
|
|
||||||
|
|
||||||
// The name of taint.
|
|
||||||
TaintKey string `json:"taintKey,omitempty"`
|
|
||||||
|
|
||||||
// The key of Node Affinity.
|
|
||||||
NodeAffinityKey string `json:"nodeAffinityKey,omitempty"`
|
|
||||||
|
|
||||||
// The values of Node Affinity.
|
|
||||||
NodeAffinityValues []string `json:"nodeAffinityValues,omitempty"`
|
|
||||||
|
|
||||||
// Whether output build result to status.
|
|
||||||
OutputBuildResult bool `json:"outputBuildResult,omitempty"`
|
|
||||||
|
|
||||||
// Regular expressions, ignoring names that do not match the provided regular expression
|
|
||||||
BranchExpression string `json:"branchExpression,omitempty"`
|
|
||||||
|
|
||||||
// SecretCode
|
|
||||||
SecretCode string `json:"secretCode,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserDefineTemplate struct {
|
|
||||||
//Name specify a template to use, so many fields in Config can left empty
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
//Parameters must use with `template`, fill some parameters which template will use
|
|
||||||
Parameters []Parameter `json:"parameters,omitempty"`
|
|
||||||
//BaseImage specify which version of this template to use
|
|
||||||
BuilderImage string `json:"builderImage,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// S2iBuilderSpec defines the desired state of S2iBuilder
|
|
||||||
type S2iBuilderSpec struct {
|
|
||||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
Config *S2iConfig `json:"config,omitempty"`
|
|
||||||
//FromTemplate define some inputs from user
|
|
||||||
FromTemplate *UserDefineTemplate `json:"fromTemplate,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// S2iBuilderStatus defines the observed state of S2iBuilder
|
|
||||||
type S2iBuilderStatus struct {
|
|
||||||
//RunCount represent the sum of s2irun of this builder
|
|
||||||
RunCount int `json:"runCount"`
|
|
||||||
//LastRunState return the state of the newest run of this builder
|
|
||||||
LastRunState RunState `json:"lastRunState,omitempty"`
|
|
||||||
//LastRunState return the name of the newest run of this builder
|
|
||||||
LastRunName *string `json:"lastRunName,omitempty"`
|
|
||||||
//LastRunStartTime return the startTime of the newest run of this builder
|
|
||||||
LastRunStartTime *metav1.Time `json:"lastRunStartTime,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iBuilder is the Schema for the s2ibuilders API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:printcolumn:name="RunCount",type="integer",JSONPath=".status.runCount"
|
|
||||||
// +kubebuilder:printcolumn:name="LastRunState",type="string",JSONPath=".status.lastRunState"
|
|
||||||
// +kubebuilder:printcolumn:name="LastRunName",type="string",JSONPath=".status.lastRunName"
|
|
||||||
// +kubebuilder:printcolumn:name="LastRunStartTime",type="date",JSONPath=".status.lastRunStartTime"
|
|
||||||
// +kubebuilder:resource:shortName=s2ib
|
|
||||||
type S2iBuilder struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec S2iBuilderSpec `json:"spec,omitempty"`
|
|
||||||
Status S2iBuilderStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iBuilderList contains a list of S2iBuilder
|
|
||||||
type S2iBuilderList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []S2iBuilder `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type S2iAutoScale struct {
|
|
||||||
Kind string `json:"kind"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
InitReplicas *int32 `json:"initReplicas,omitempty"`
|
|
||||||
Containers []string `json:"containers,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DockerConfigJson struct {
|
|
||||||
Auths DockerConfigMap `json:"auths"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DockerConfig represents the config file used by the docker CLI.
|
|
||||||
// This config that represents the credentials that should be used
|
|
||||||
// when pulling images from specific image repositories.
|
|
||||||
type DockerConfigMap map[string]DockerConfigEntry
|
|
||||||
|
|
||||||
type DockerConfigEntry struct {
|
|
||||||
Username string `json:"username"`
|
|
||||||
Password string `json:"password"`
|
|
||||||
Email string `json:"email"`
|
|
||||||
ServerAddress string `json:"serverAddress,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&S2iBuilder{}, &S2iBuilderList{})
|
|
||||||
}
|
|
||||||
126
vendor/kubesphere.io/api/devops/v1alpha1/s2ibuildertemplate_types.go
generated
vendored
126
vendor/kubesphere.io/api/devops/v1alpha1/s2ibuildertemplate_types.go
generated
vendored
@@ -1,126 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindS2iBuilderTemplate = "S2iBuilderTemplate"
|
|
||||||
ResourceSingularS2iBuilderTemplate = "s2ibuildertemplate"
|
|
||||||
ResourcePluralS2iBuilderTemplate = "s2ibuildertemplates"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Parameter struct {
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
Key string `json:"key,omitempty"`
|
|
||||||
Type string `json:"type,omitempty"`
|
|
||||||
OptValues []string `json:"optValues,omitempty"`
|
|
||||||
Required bool `json:"required,omitempty"`
|
|
||||||
DefaultValue string `json:"defaultValue,omitempty"`
|
|
||||||
Value string `json:"value,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type CodeFramework string
|
|
||||||
|
|
||||||
const (
|
|
||||||
Ruby CodeFramework = "ruby"
|
|
||||||
Go CodeFramework = "go"
|
|
||||||
Java CodeFramework = "Java"
|
|
||||||
JavaTomcat CodeFramework = "JavaTomcat"
|
|
||||||
Nodejs CodeFramework = "Nodejs"
|
|
||||||
Python CodeFramework = "python"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (p *Parameter) ToEnvonment() *EnvironmentSpec {
|
|
||||||
var v string
|
|
||||||
if p.Value == "" && p.DefaultValue != "" {
|
|
||||||
v = p.DefaultValue
|
|
||||||
} else if p.Value != "" {
|
|
||||||
v = p.Value
|
|
||||||
} else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return &EnvironmentSpec{
|
|
||||||
Name: p.Key,
|
|
||||||
Value: v,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// S2iBuilderTemplateSpec defines the desired state of S2iBuilderTemplate
|
|
||||||
type S2iBuilderTemplateSpec struct {
|
|
||||||
//DefaultBaseImage is the image that will be used by default
|
|
||||||
DefaultBaseImage string `json:"defaultBaseImage,omitempty"`
|
|
||||||
//Images are the images this template will use.
|
|
||||||
ContainerInfo []ContainerInfo `json:"containerInfo,omitempty"`
|
|
||||||
//CodeFramework means which language this template is designed for and which framework is using if has framework. Like Java, NodeJS etc
|
|
||||||
CodeFramework CodeFramework `json:"codeFramework,omitempty"`
|
|
||||||
// Parameters is a set of environment variables to be passed to the image.
|
|
||||||
Parameters []Parameter `json:"environment,omitempty"`
|
|
||||||
// Version of template
|
|
||||||
Version string `json:"version,omitempty"`
|
|
||||||
// Description illustrate the purpose of this template
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
// IconPath is used for frontend display
|
|
||||||
IconPath string `json:"iconPath,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ContainerInfo struct {
|
|
||||||
//BaseImage are the images this template will use.
|
|
||||||
BuilderImage string `json:"builderImage,omitempty"`
|
|
||||||
RuntimeImage string `json:"runtimeImage,omitempty"`
|
|
||||||
RuntimeArtifacts []VolumeSpec `json:"runtimeArtifacts,omitempty"`
|
|
||||||
// BuildVolumes specifies a list of volumes to mount to container running the
|
|
||||||
// build.
|
|
||||||
BuildVolumes []string `json:"buildVolumes,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// S2iBuilderTemplateStatus defines the observed state of S2iBuilderTemplate
|
|
||||||
type S2iBuilderTemplateStatus struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iBuilderTemplate is the Schema for the s2ibuildertemplates API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:printcolumn:name="Framework",type="string",JSONPath=".spec.codeFramework"
|
|
||||||
// +kubebuilder:printcolumn:name="DefaultBaseImage",type="string",JSONPath=".spec.defaultBaseImage"
|
|
||||||
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version"
|
|
||||||
// +kubebuilder:resource:categories="devops",scope="Cluster",shortName="s2ibt"
|
|
||||||
type S2iBuilderTemplate struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec S2iBuilderTemplateSpec `json:"spec,omitempty"`
|
|
||||||
Status S2iBuilderTemplateStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iBuilderTemplateList contains a list of S2iBuilderTemplate
|
|
||||||
type S2iBuilderTemplateList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []S2iBuilderTemplate `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&S2iBuilderTemplate{}, &S2iBuilderTemplateList{})
|
|
||||||
}
|
|
||||||
141
vendor/kubesphere.io/api/devops/v1alpha1/s2irun_types.go
generated
vendored
141
vendor/kubesphere.io/api/devops/v1alpha1/s2irun_types.go
generated
vendored
@@ -1,141 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindS2iRun = "S2iRun"
|
|
||||||
ResourceSingularS2iRun = "s2irun"
|
|
||||||
ResourcePluralS2iRun = "s2iruns"
|
|
||||||
)
|
|
||||||
|
|
||||||
// S2iRunSpec defines the desired state of S2iRun
|
|
||||||
type S2iRunSpec struct {
|
|
||||||
//BuilderName specify the name of s2ibuilder, required
|
|
||||||
BuilderName string `json:"builderName"`
|
|
||||||
//BackoffLimit limits the restart count of each s2irun. Default is 0
|
|
||||||
BackoffLimit int32 `json:"backoffLimit,omitempty"`
|
|
||||||
//SecondsAfterFinished if is set and greater than zero, and the job created by s2irun become successful or failed , the job will be auto deleted after SecondsAfterFinished
|
|
||||||
SecondsAfterFinished int32 `json:"secondsAfterFinished,omitempty"`
|
|
||||||
//NewTag override the default tag in its s2ibuilder, image name cannot be changed.
|
|
||||||
NewTag string `json:"newTag,omitempty"`
|
|
||||||
//NewRevisionId override the default NewRevisionId in its s2ibuilder.
|
|
||||||
NewRevisionId string `json:"newRevisionId,omitempty"`
|
|
||||||
//NewSourceURL is used to download new binary artifacts
|
|
||||||
NewSourceURL string `json:"newSourceURL,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// S2iRunStatus defines the observed state of S2iRun
|
|
||||||
type S2iRunStatus struct {
|
|
||||||
// StartTime represent when this run began
|
|
||||||
StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
|
||||||
|
|
||||||
// Represents time when the job was completed. It is not guaranteed to
|
|
||||||
// be set in happens-before order across separate operations.
|
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
|
||||||
// +optional
|
|
||||||
CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
|
||||||
// RunState indicates whether this job is done or failed
|
|
||||||
RunState RunState `json:"runState,omitempty"`
|
|
||||||
//LogURL is uesd for external log handler to let user know where is log located in
|
|
||||||
LogURL string `json:"logURL,omitempty"`
|
|
||||||
//KubernetesJobName is the job name in k8s
|
|
||||||
KubernetesJobName string `json:"kubernetesJobName,omitempty"`
|
|
||||||
|
|
||||||
// S2i build result info.
|
|
||||||
S2iBuildResult *S2iBuildResult `json:"s2iBuildResult,omitempty"`
|
|
||||||
// S2i build source info.
|
|
||||||
S2iBuildSource *S2iBuildSource `json:"s2iBuildSource,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type S2iBuildResult struct {
|
|
||||||
//ImageName is the name of artifact
|
|
||||||
ImageName string `json:"imageName,omitempty"`
|
|
||||||
//The size in bytes of the image
|
|
||||||
ImageSize int64 `json:"imageSize,omitempty"`
|
|
||||||
// Image ID.
|
|
||||||
ImageID string `json:"imageID,omitempty"`
|
|
||||||
// Image created time.
|
|
||||||
ImageCreated string `json:"imageCreated,omitempty"`
|
|
||||||
// image tags.
|
|
||||||
ImageRepoTags []string `json:"imageRepoTags,omitempty"`
|
|
||||||
// Command for pull image.
|
|
||||||
CommandPull string `json:"commandPull,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type S2iBuildSource struct {
|
|
||||||
// SourceURL is url of the codes such as https://github.com/a/b.git
|
|
||||||
SourceUrl string `json:"sourceUrl,omitempty"`
|
|
||||||
// The RevisionId is a branch name or a SHA-1 hash of every important thing about the commit
|
|
||||||
RevisionId string `json:"revisionId,omitempty"`
|
|
||||||
// Binary file Name
|
|
||||||
BinaryName string `json:"binaryName,omitempty"`
|
|
||||||
// Binary file Size
|
|
||||||
BinarySize uint64 `json:"binarySize,omitempty"`
|
|
||||||
|
|
||||||
// // BuilderImage describes which image is used for building the result images.
|
|
||||||
BuilderImage string `json:"builderImage,omitempty"`
|
|
||||||
// Description is a result image description label. The default is no
|
|
||||||
// description.
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
|
|
||||||
// CommitID represents an arbitrary extended object reference in Git as SHA-1
|
|
||||||
CommitID string `json:"commitID,omitempty"`
|
|
||||||
// CommitterName contains the name of the committer
|
|
||||||
CommitterName string `json:"committerName,omitempty"`
|
|
||||||
// CommitterEmail contains the e-mail of the committer
|
|
||||||
CommitterEmail string `json:"committerEmail,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iRun is the Schema for the s2iruns API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:resource:shortName=s2ir
|
|
||||||
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.runState"
|
|
||||||
// +kubebuilder:printcolumn:name="K8sJobName",type="string",JSONPath=".status.kubernetesJobName"
|
|
||||||
// +kubebuilder:printcolumn:name="StartTime",type="date",JSONPath=".status.startTime"
|
|
||||||
// +kubebuilder:printcolumn:name="CompletionTime",type="date",JSONPath=".status.completionTime"
|
|
||||||
// +kubebuilder:printcolumn:name="ImageName",type="string",JSONPath=".status.s2iBuildResult.imageName"
|
|
||||||
type S2iRun struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec S2iRunSpec `json:"spec,omitempty"`
|
|
||||||
Status S2iRunStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// S2iRunList contains a list of S2iRun
|
|
||||||
type S2iRunList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []S2iRun `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&S2iRun{}, &S2iRunList{})
|
|
||||||
}
|
|
||||||
879
vendor/kubesphere.io/api/devops/v1alpha1/zz_generated.deepcopy.go
generated
vendored
879
vendor/kubesphere.io/api/devops/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,879 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/core/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *AuthConfig) DeepCopyInto(out *AuthConfig) {
|
|
||||||
*out = *in
|
|
||||||
if in.SecretRef != nil {
|
|
||||||
in, out := &in.SecretRef, &out.SecretRef
|
|
||||||
*out = new(v1.LocalObjectReference)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthConfig.
|
|
||||||
func (in *AuthConfig) DeepCopy() *AuthConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(AuthConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *CGroupLimits) DeepCopyInto(out *CGroupLimits) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CGroupLimits.
|
|
||||||
func (in *CGroupLimits) DeepCopy() *CGroupLimits {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(CGroupLimits)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ContainerConfig) DeepCopyInto(out *ContainerConfig) {
|
|
||||||
*out = *in
|
|
||||||
if in.Labels != nil {
|
|
||||||
in, out := &in.Labels, &out.Labels
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Env != nil {
|
|
||||||
in, out := &in.Env, &out.Env
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerConfig.
|
|
||||||
func (in *ContainerConfig) DeepCopy() *ContainerConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ContainerConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ContainerInfo) DeepCopyInto(out *ContainerInfo) {
|
|
||||||
*out = *in
|
|
||||||
if in.RuntimeArtifacts != nil {
|
|
||||||
in, out := &in.RuntimeArtifacts, &out.RuntimeArtifacts
|
|
||||||
*out = make([]VolumeSpec, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.BuildVolumes != nil {
|
|
||||||
in, out := &in.BuildVolumes, &out.BuildVolumes
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerInfo.
|
|
||||||
func (in *ContainerInfo) DeepCopy() *ContainerInfo {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ContainerInfo)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DockerConfig) DeepCopyInto(out *DockerConfig) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfig.
|
|
||||||
func (in *DockerConfig) DeepCopy() *DockerConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DockerConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DockerConfigEntry) DeepCopyInto(out *DockerConfigEntry) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigEntry.
|
|
||||||
func (in *DockerConfigEntry) DeepCopy() *DockerConfigEntry {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DockerConfigEntry)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DockerConfigJson) DeepCopyInto(out *DockerConfigJson) {
|
|
||||||
*out = *in
|
|
||||||
if in.Auths != nil {
|
|
||||||
in, out := &in.Auths, &out.Auths
|
|
||||||
*out = make(DockerConfigMap, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigJson.
|
|
||||||
func (in *DockerConfigJson) DeepCopy() *DockerConfigJson {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DockerConfigJson)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in DockerConfigMap) DeepCopyInto(out *DockerConfigMap) {
|
|
||||||
{
|
|
||||||
in := &in
|
|
||||||
*out = make(DockerConfigMap, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigMap.
|
|
||||||
func (in DockerConfigMap) DeepCopy() DockerConfigMap {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DockerConfigMap)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return *out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSpec.
|
|
||||||
func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(EnvironmentSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Parameter) DeepCopyInto(out *Parameter) {
|
|
||||||
*out = *in
|
|
||||||
if in.OptValues != nil {
|
|
||||||
in, out := &in.OptValues, &out.OptValues
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.
|
|
||||||
func (in *Parameter) DeepCopy() *Parameter {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Parameter)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.
|
|
||||||
func (in *ProxyConfig) DeepCopy() *ProxyConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ProxyConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iAutoScale) DeepCopyInto(out *S2iAutoScale) {
|
|
||||||
*out = *in
|
|
||||||
if in.InitReplicas != nil {
|
|
||||||
in, out := &in.InitReplicas, &out.InitReplicas
|
|
||||||
*out = new(int32)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.Containers != nil {
|
|
||||||
in, out := &in.Containers, &out.Containers
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iAutoScale.
|
|
||||||
func (in *S2iAutoScale) DeepCopy() *S2iAutoScale {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iAutoScale)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBinary) DeepCopyInto(out *S2iBinary) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinary.
|
|
||||||
func (in *S2iBinary) DeepCopy() *S2iBinary {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBinary)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iBinary) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBinaryList) DeepCopyInto(out *S2iBinaryList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]S2iBinary, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinaryList.
|
|
||||||
func (in *S2iBinaryList) DeepCopy() *S2iBinaryList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBinaryList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iBinaryList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBinarySpec) DeepCopyInto(out *S2iBinarySpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.UploadTimeStamp != nil {
|
|
||||||
in, out := &in.UploadTimeStamp, &out.UploadTimeStamp
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinarySpec.
|
|
||||||
func (in *S2iBinarySpec) DeepCopy() *S2iBinarySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBinarySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBinaryStatus) DeepCopyInto(out *S2iBinaryStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBinaryStatus.
|
|
||||||
func (in *S2iBinaryStatus) DeepCopy() *S2iBinaryStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBinaryStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuildResult) DeepCopyInto(out *S2iBuildResult) {
|
|
||||||
*out = *in
|
|
||||||
if in.ImageRepoTags != nil {
|
|
||||||
in, out := &in.ImageRepoTags, &out.ImageRepoTags
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuildResult.
|
|
||||||
func (in *S2iBuildResult) DeepCopy() *S2iBuildResult {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuildResult)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuildSource) DeepCopyInto(out *S2iBuildSource) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuildSource.
|
|
||||||
func (in *S2iBuildSource) DeepCopy() *S2iBuildSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuildSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilder) DeepCopyInto(out *S2iBuilder) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilder.
|
|
||||||
func (in *S2iBuilder) DeepCopy() *S2iBuilder {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilder)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iBuilder) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderList) DeepCopyInto(out *S2iBuilderList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]S2iBuilder, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderList.
|
|
||||||
func (in *S2iBuilderList) DeepCopy() *S2iBuilderList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iBuilderList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderSpec) DeepCopyInto(out *S2iBuilderSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Config != nil {
|
|
||||||
in, out := &in.Config, &out.Config
|
|
||||||
*out = new(S2iConfig)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.FromTemplate != nil {
|
|
||||||
in, out := &in.FromTemplate, &out.FromTemplate
|
|
||||||
*out = new(UserDefineTemplate)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderSpec.
|
|
||||||
func (in *S2iBuilderSpec) DeepCopy() *S2iBuilderSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderStatus) DeepCopyInto(out *S2iBuilderStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.LastRunName != nil {
|
|
||||||
in, out := &in.LastRunName, &out.LastRunName
|
|
||||||
*out = new(string)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.LastRunStartTime != nil {
|
|
||||||
in, out := &in.LastRunStartTime, &out.LastRunStartTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderStatus.
|
|
||||||
func (in *S2iBuilderStatus) DeepCopy() *S2iBuilderStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderTemplate) DeepCopyInto(out *S2iBuilderTemplate) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplate.
|
|
||||||
func (in *S2iBuilderTemplate) DeepCopy() *S2iBuilderTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iBuilderTemplate) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderTemplateList) DeepCopyInto(out *S2iBuilderTemplateList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]S2iBuilderTemplate, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplateList.
|
|
||||||
func (in *S2iBuilderTemplateList) DeepCopy() *S2iBuilderTemplateList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderTemplateList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iBuilderTemplateList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderTemplateSpec) DeepCopyInto(out *S2iBuilderTemplateSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.ContainerInfo != nil {
|
|
||||||
in, out := &in.ContainerInfo, &out.ContainerInfo
|
|
||||||
*out = make([]ContainerInfo, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Parameters != nil {
|
|
||||||
in, out := &in.Parameters, &out.Parameters
|
|
||||||
*out = make([]Parameter, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplateSpec.
|
|
||||||
func (in *S2iBuilderTemplateSpec) DeepCopy() *S2iBuilderTemplateSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderTemplateSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iBuilderTemplateStatus) DeepCopyInto(out *S2iBuilderTemplateStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iBuilderTemplateStatus.
|
|
||||||
func (in *S2iBuilderTemplateStatus) DeepCopy() *S2iBuilderTemplateStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iBuilderTemplateStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iConfig) DeepCopyInto(out *S2iConfig) {
|
|
||||||
*out = *in
|
|
||||||
if in.RuntimeAuthentication != nil {
|
|
||||||
in, out := &in.RuntimeAuthentication, &out.RuntimeAuthentication
|
|
||||||
*out = new(AuthConfig)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.RuntimeArtifacts != nil {
|
|
||||||
in, out := &in.RuntimeArtifacts, &out.RuntimeArtifacts
|
|
||||||
*out = make([]VolumeSpec, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.DockerConfig != nil {
|
|
||||||
in, out := &in.DockerConfig, &out.DockerConfig
|
|
||||||
*out = new(DockerConfig)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.PullAuthentication != nil {
|
|
||||||
in, out := &in.PullAuthentication, &out.PullAuthentication
|
|
||||||
*out = new(AuthConfig)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.PushAuthentication != nil {
|
|
||||||
in, out := &in.PushAuthentication, &out.PushAuthentication
|
|
||||||
*out = new(AuthConfig)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.IncrementalAuthentication != nil {
|
|
||||||
in, out := &in.IncrementalAuthentication, &out.IncrementalAuthentication
|
|
||||||
*out = new(AuthConfig)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.Environment != nil {
|
|
||||||
in, out := &in.Environment, &out.Environment
|
|
||||||
*out = make([]EnvironmentSpec, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Injections != nil {
|
|
||||||
in, out := &in.Injections, &out.Injections
|
|
||||||
*out = make([]VolumeSpec, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.CGroupLimits != nil {
|
|
||||||
in, out := &in.CGroupLimits, &out.CGroupLimits
|
|
||||||
*out = new(CGroupLimits)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.DropCapabilities != nil {
|
|
||||||
in, out := &in.DropCapabilities, &out.DropCapabilities
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.ScriptDownloadProxyConfig != nil {
|
|
||||||
in, out := &in.ScriptDownloadProxyConfig, &out.ScriptDownloadProxyConfig
|
|
||||||
*out = new(ProxyConfig)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.BuildVolumes != nil {
|
|
||||||
in, out := &in.BuildVolumes, &out.BuildVolumes
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Labels != nil {
|
|
||||||
in, out := &in.Labels, &out.Labels
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.SecurityOpt != nil {
|
|
||||||
in, out := &in.SecurityOpt, &out.SecurityOpt
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.AddHost != nil {
|
|
||||||
in, out := &in.AddHost, &out.AddHost
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.GitSecretRef != nil {
|
|
||||||
in, out := &in.GitSecretRef, &out.GitSecretRef
|
|
||||||
*out = new(v1.LocalObjectReference)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.NodeAffinityValues != nil {
|
|
||||||
in, out := &in.NodeAffinityValues, &out.NodeAffinityValues
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iConfig.
|
|
||||||
func (in *S2iConfig) DeepCopy() *S2iConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iRun) DeepCopyInto(out *S2iRun) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRun.
|
|
||||||
func (in *S2iRun) DeepCopy() *S2iRun {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iRun)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iRun) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iRunList) DeepCopyInto(out *S2iRunList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]S2iRun, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRunList.
|
|
||||||
func (in *S2iRunList) DeepCopy() *S2iRunList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iRunList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *S2iRunList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iRunSpec) DeepCopyInto(out *S2iRunSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRunSpec.
|
|
||||||
func (in *S2iRunSpec) DeepCopy() *S2iRunSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iRunSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *S2iRunStatus) DeepCopyInto(out *S2iRunStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.StartTime != nil {
|
|
||||||
in, out := &in.StartTime, &out.StartTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.CompletionTime != nil {
|
|
||||||
in, out := &in.CompletionTime, &out.CompletionTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.S2iBuildResult != nil {
|
|
||||||
in, out := &in.S2iBuildResult, &out.S2iBuildResult
|
|
||||||
*out = new(S2iBuildResult)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.S2iBuildSource != nil {
|
|
||||||
in, out := &in.S2iBuildSource, &out.S2iBuildSource
|
|
||||||
*out = new(S2iBuildSource)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S2iRunStatus.
|
|
||||||
func (in *S2iRunStatus) DeepCopy() *S2iRunStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(S2iRunStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *UserDefineTemplate) DeepCopyInto(out *UserDefineTemplate) {
|
|
||||||
*out = *in
|
|
||||||
if in.Parameters != nil {
|
|
||||||
in, out := &in.Parameters, &out.Parameters
|
|
||||||
*out = make([]Parameter, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserDefineTemplate.
|
|
||||||
func (in *UserDefineTemplate) DeepCopy() *UserDefineTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(UserDefineTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSpec.
|
|
||||||
func (in *VolumeSpec) DeepCopy() *VolumeSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(VolumeSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
76
vendor/kubesphere.io/api/devops/v1alpha3/credential_types.go
generated
vendored
76
vendor/kubesphere.io/api/devops/v1alpha3/credential_types.go
generated
vendored
@@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import v1 "k8s.io/api/core/v1"
|
|
||||||
|
|
||||||
/**
|
|
||||||
We use a special type of secret as a credential for DevOps.
|
|
||||||
This file will not contain CRD, but the credential type constants and their fields.
|
|
||||||
*/
|
|
||||||
const (
|
|
||||||
CredentialFinalizerName = "finalizers.kubesphere.io/credential"
|
|
||||||
DevOpsCredentialPrefix = "credential.devops.kubesphere.io/"
|
|
||||||
DevOpsCredentialDataHash = DevOpsCredentialPrefix + "datahash"
|
|
||||||
// SecretTypeBasicAuth contains data needed for basic authentication.
|
|
||||||
//
|
|
||||||
// Required at least one of fields:
|
|
||||||
// - Secret.Data["username"] - username used for authentication
|
|
||||||
// - Secret.Data["password"] - password or token needed for authentication
|
|
||||||
SecretTypeBasicAuth v1.SecretType = DevOpsCredentialPrefix + "basic-auth"
|
|
||||||
// BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets
|
|
||||||
BasicAuthUsernameKey = "username"
|
|
||||||
// BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets
|
|
||||||
BasicAuthPasswordKey = "password"
|
|
||||||
|
|
||||||
// SecretTypeSSHAuth contains data needed for ssh authentication.
|
|
||||||
//
|
|
||||||
// Required at least one of fields:
|
|
||||||
// - Secret.Data["username"] - username used for authentication
|
|
||||||
// - Secret.Data["passphrase"] - passphrase needed for authentication
|
|
||||||
// - Secret.Data["privatekey"] - privatekey needed for authentication
|
|
||||||
SecretTypeSSHAuth v1.SecretType = DevOpsCredentialPrefix + "ssh-auth"
|
|
||||||
// SSHAuthUsernameKey is the key of the username for SecretTypeSSHAuth secrets
|
|
||||||
SSHAuthUsernameKey = "username"
|
|
||||||
// SSHAuthPrivateKey is the key of the passphrase for SecretTypeSSHAuth secrets
|
|
||||||
SSHAuthPassphraseKey = "passphrase"
|
|
||||||
// SSHAuthPrivateKey is the key of the privatekey for SecretTypeSSHAuth secrets
|
|
||||||
SSHAuthPrivateKey = "private_key"
|
|
||||||
|
|
||||||
// SecretTypeSecretText contains data.
|
|
||||||
//
|
|
||||||
// Required at least one of fields:
|
|
||||||
// - Secret.Data["secret"] - secret
|
|
||||||
SecretTypeSecretText v1.SecretType = DevOpsCredentialPrefix + "secret-text"
|
|
||||||
// SecretTextSecretKey is the key of the secret for SecretTypeSecretText secrets
|
|
||||||
SecretTextSecretKey = "secret"
|
|
||||||
|
|
||||||
// SecretTypeKubeConfig contains data.
|
|
||||||
//
|
|
||||||
// Required at least one of fields:
|
|
||||||
// - Secret.Data["secret"] - secret
|
|
||||||
SecretTypeKubeConfig v1.SecretType = DevOpsCredentialPrefix + "kubeconfig"
|
|
||||||
// KubeConfigSecretKey is the key of the secret for SecretTypeKubeConfig secrets
|
|
||||||
KubeConfigSecretKey = "content"
|
|
||||||
// CredentialAutoSyncAnnoKey is used to indicate whether the secret is automatically synchronized to devops.
|
|
||||||
// In the old version, the credential is stored in jenkins and cannot be obtained.
|
|
||||||
// This field is set to ensure that the secret is not overwritten by a nil value.
|
|
||||||
CredentialAutoSyncAnnoKey = DevOpsCredentialPrefix + "autosync"
|
|
||||||
CredentialSyncStatusAnnoKey = DevOpsCredentialPrefix + "syncstatus"
|
|
||||||
CredentialSyncTimeAnnoKey = DevOpsCredentialPrefix + "synctime"
|
|
||||||
CredentialSyncMsgAnnoKey = DevOpsCredentialPrefix + "syncmsg"
|
|
||||||
)
|
|
||||||
78
vendor/kubesphere.io/api/devops/v1alpha3/devopsproject_types.go
generated
vendored
78
vendor/kubesphere.io/api/devops/v1alpha3/devopsproject_types.go
generated
vendored
@@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
const DevOpsProjectFinalizerName = "devopsproject.finalizers.kubesphere.io"
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindDevOpsProject = "DevOpsProject"
|
|
||||||
ResourceSingularDevOpsProject = "devopsproject"
|
|
||||||
ResourcePluralDevOpsProject = "devopsprojects"
|
|
||||||
DevOpsProjectPrefix = "devopsproject.devops.kubesphere.io/"
|
|
||||||
DevOpeProjectSyncStatusAnnoKey = DevOpsProjectPrefix + "syncstatus"
|
|
||||||
DevOpeProjectSyncTimeAnnoKey = DevOpsProjectPrefix + "synctime"
|
|
||||||
DevOpeProjectSyncMsgAnnoKey = DevOpsProjectPrefix + "syncmsg"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DevOpsProjectSpec defines the desired state of DevOpsProject
|
|
||||||
type DevOpsProjectSpec struct {
|
|
||||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// DevOpsProjectStatus defines the observed state of DevOpsProject
|
|
||||||
type DevOpsProjectStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
AdminNamespace string `json:"adminNamespace,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// DevOpsProject is the Schema for the devopsprojects API
|
|
||||||
// +kubebuilder:resource:categories="devops",scope="Cluster"
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type DevOpsProject struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec DevOpsProjectSpec `json:"spec,omitempty"`
|
|
||||||
Status DevOpsProjectStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// DevOpsProjectList contains a list of DevOpsProject
|
|
||||||
type DevOpsProjectList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []DevOpsProject `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&DevOpsProject{}, &DevOpsProjectList{})
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/devops/v1alpha3/doc.go
generated
vendored
23
vendor/kubesphere.io/api/devops/v1alpha3/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha3 contains API Schema definitions for the devops v1alpha3 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/devops
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=devops.kubesphere.io
|
|
||||||
package v1alpha3
|
|
||||||
3411
vendor/kubesphere.io/api/devops/v1alpha3/openapi_generated.go
generated
vendored
3411
vendor/kubesphere.io/api/devops/v1alpha3/openapi_generated.go
generated
vendored
File diff suppressed because it is too large
Load Diff
230
vendor/kubesphere.io/api/devops/v1alpha3/pipeline_types.go
generated
vendored
230
vendor/kubesphere.io/api/devops/v1alpha3/pipeline_types.go
generated
vendored
@@ -1,230 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
const PipelineFinalizerName = "pipeline.finalizers.kubesphere.io"
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindPipeline = "Pipeline"
|
|
||||||
ResourceSingularPipeline = "pipeline"
|
|
||||||
ResourcePluralPipeline = "pipelines"
|
|
||||||
PipelinePrefix = "pipeline.devops.kubesphere.io/"
|
|
||||||
PipelineSpecHash = PipelinePrefix + "spechash"
|
|
||||||
PipelineSyncStatusAnnoKey = PipelinePrefix + "syncstatus"
|
|
||||||
PipelineSyncTimeAnnoKey = PipelinePrefix + "synctime"
|
|
||||||
PipelineSyncMsgAnnoKey = PipelinePrefix + "syncmsg"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PipelineSpec defines the desired state of Pipeline
|
|
||||||
type PipelineSpec struct {
|
|
||||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
Type string `json:"type" description:"type of devops pipeline, in scm or no scm"`
|
|
||||||
Pipeline *NoScmPipeline `json:"pipeline,omitempty" description:"no scm pipeline structs"`
|
|
||||||
MultiBranchPipeline *MultiBranchPipeline `json:"multi_branch_pipeline,omitempty" description:"in scm pipeline structs"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PipelineStatus defines the observed state of Pipeline
|
|
||||||
type PipelineStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// Pipeline is the Schema for the pipelines API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type Pipeline struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec PipelineSpec `json:"spec,omitempty"`
|
|
||||||
Status PipelineStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// PipelineList contains a list of Pipeline
|
|
||||||
type PipelineList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Pipeline `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Pipeline{}, &PipelineList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
NoScmPipelineType = "pipeline"
|
|
||||||
MultiBranchPipelineType = "multi-branch-pipeline"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
SourceTypeSVN = "svn"
|
|
||||||
SourceTypeGit = "git"
|
|
||||||
SourceTypeSingleSVN = "single_svn"
|
|
||||||
SourceTypeGitlab = "gitlab"
|
|
||||||
SourceTypeGithub = "github"
|
|
||||||
SourceTypeBitbucket = "bitbucket_server"
|
|
||||||
)
|
|
||||||
|
|
||||||
type NoScmPipeline struct {
|
|
||||||
Name string `json:"name" description:"name of pipeline"`
|
|
||||||
Description string `json:"description,omitempty" description:"description of pipeline"`
|
|
||||||
Discarder *DiscarderProperty `json:"discarder,omitempty" description:"Discarder of pipeline, managing when to drop a pipeline"`
|
|
||||||
Parameters []Parameter `json:"parameters,omitempty" description:"Parameters define of pipeline,user could pass param when run pipeline"`
|
|
||||||
DisableConcurrent bool `json:"disable_concurrent,omitempty" mapstructure:"disable_concurrent" description:"Whether to prohibit the pipeline from running in parallel"`
|
|
||||||
TimerTrigger *TimerTrigger `json:"timer_trigger,omitempty" mapstructure:"timer_trigger" description:"Timer to trigger pipeline run"`
|
|
||||||
RemoteTrigger *RemoteTrigger `json:"remote_trigger,omitempty" mapstructure:"remote_trigger" description:"Remote api define to trigger pipeline run"`
|
|
||||||
Jenkinsfile string `json:"jenkinsfile,omitempty" description:"Jenkinsfile's content'"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type MultiBranchPipeline struct {
|
|
||||||
Name string `json:"name" description:"name of pipeline"`
|
|
||||||
Description string `json:"description,omitempty" description:"description of pipeline"`
|
|
||||||
Discarder *DiscarderProperty `json:"discarder,omitempty" description:"Discarder of pipeline, managing when to drop a pipeline"`
|
|
||||||
TimerTrigger *TimerTrigger `json:"timer_trigger,omitempty" mapstructure:"timer_trigger" description:"Timer to trigger pipeline run"`
|
|
||||||
SourceType string `json:"source_type" description:"type of scm, such as github/git/svn"`
|
|
||||||
GitSource *GitSource `json:"git_source,omitempty" description:"git scm define"`
|
|
||||||
GitHubSource *GithubSource `json:"github_source,omitempty" description:"github scm define"`
|
|
||||||
GitlabSource *GitlabSource `json:"gitlab_source,omitempty" description:"gitlab scm define"`
|
|
||||||
SvnSource *SvnSource `json:"svn_source,omitempty" description:"multi branch svn scm define"`
|
|
||||||
SingleSvnSource *SingleSvnSource `json:"single_svn_source,omitempty" description:"single branch svn scm define"`
|
|
||||||
BitbucketServerSource *BitbucketServerSource `json:"bitbucket_server_source,omitempty" description:"bitbucket server scm defile"`
|
|
||||||
ScriptPath string `json:"script_path" mapstructure:"script_path" description:"script path in scm"`
|
|
||||||
MultiBranchJobTrigger *MultiBranchJobTrigger `json:"multibranch_job_trigger,omitempty" mapstructure:"multibranch_job_trigger" description:"Pipeline tasks that need to be triggered when branch creation/deletion"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GitSource struct {
|
|
||||||
ScmId string `json:"scm_id,omitempty" description:"uid of scm"`
|
|
||||||
Url string `json:"url,omitempty" mapstructure:"url" description:"url of git source"`
|
|
||||||
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access git source"`
|
|
||||||
DiscoverBranches bool `json:"discover_branches,omitempty" mapstructure:"discover_branches" description:"Whether to discover a branch"`
|
|
||||||
DiscoverTags bool `json:"discover_tags,omitempty" mapstructure:"discover_tags" description:"Discover tags configuration"`
|
|
||||||
CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option" description:"advavced git clone options"`
|
|
||||||
RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter" description:"Regex used to match the name of the branch that needs to be run"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// GithubSource and BitbucketServerSource have the same structure, but we don't use one due to crd errors
|
|
||||||
type GithubSource struct {
|
|
||||||
ScmId string `json:"scm_id,omitempty" description:"uid of scm"`
|
|
||||||
Owner string `json:"owner,omitempty" mapstructure:"owner" description:"owner of github repo"`
|
|
||||||
Repo string `json:"repo,omitempty" mapstructure:"repo" description:"repo name of github repo"`
|
|
||||||
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access github source"`
|
|
||||||
ApiUri string `json:"api_uri,omitempty" mapstructure:"api_uri" description:"The api url can specify the location of the github apiserver.For private cloud configuration"`
|
|
||||||
DiscoverBranches int `json:"discover_branches,omitempty" mapstructure:"discover_branches" description:"Discover branch configuration"`
|
|
||||||
DiscoverPRFromOrigin int `json:"discover_pr_from_origin,omitempty" mapstructure:"discover_pr_from_origin" description:"Discover origin PR configuration"`
|
|
||||||
DiscoverPRFromForks *DiscoverPRFromForks `json:"discover_pr_from_forks,omitempty" mapstructure:"discover_pr_from_forks" description:"Discover fork PR configuration"`
|
|
||||||
DiscoverTags bool `json:"discover_tags,omitempty" mapstructure:"discover_tags" description:"Discover tag configuration"`
|
|
||||||
CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option" description:"advavced git clone options"`
|
|
||||||
RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter" description:"Regex used to match the name of the branch that needs to be run"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GitlabSource struct {
|
|
||||||
ScmId string `json:"scm_id,omitempty" description:"uid of scm"`
|
|
||||||
Owner string `json:"owner,omitempty" mapstructure:"owner" description:"owner of gitlab repo"`
|
|
||||||
Repo string `json:"repo,omitempty" mapstructure:"repo" description:"repo name of gitlab repo"`
|
|
||||||
ServerName string `json:"server_name,omitempty" description:"the name of gitlab server which was configured in jenkins"`
|
|
||||||
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access gitlab source"`
|
|
||||||
ApiUri string `json:"api_uri,omitempty" mapstructure:"api_uri" description:"The api url can specify the location of the gitlab apiserver.For private cloud configuration"`
|
|
||||||
DiscoverBranches int `json:"discover_branches,omitempty" mapstructure:"discover_branches" description:"Discover branch configuration"`
|
|
||||||
DiscoverPRFromOrigin int `json:"discover_pr_from_origin,omitempty" mapstructure:"discover_pr_from_origin" description:"Discover origin PR configuration"`
|
|
||||||
DiscoverPRFromForks *DiscoverPRFromForks `json:"discover_pr_from_forks,omitempty" mapstructure:"discover_pr_from_forks" description:"Discover fork PR configuration"`
|
|
||||||
DiscoverTags bool `json:"discover_tags,omitempty" mapstructure:"discover_tags" description:"Discover tags configuration"`
|
|
||||||
CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option" description:"advavced git clone options"`
|
|
||||||
RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter" description:"Regex used to match the name of the branch that needs to be run"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BitbucketServerSource struct {
|
|
||||||
ScmId string `json:"scm_id,omitempty" description:"uid of scm"`
|
|
||||||
Owner string `json:"owner,omitempty" mapstructure:"owner" description:"owner of github repo"`
|
|
||||||
Repo string `json:"repo,omitempty" mapstructure:"repo" description:"repo name of github repo"`
|
|
||||||
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access github source"`
|
|
||||||
ApiUri string `json:"api_uri,omitempty" mapstructure:"api_uri" description:"The api url can specify the location of the github apiserver.For private cloud configuration"`
|
|
||||||
DiscoverBranches int `json:"discover_branches,omitempty" mapstructure:"discover_branches" description:"Discover branch configuration"`
|
|
||||||
DiscoverPRFromOrigin int `json:"discover_pr_from_origin,omitempty" mapstructure:"discover_pr_from_origin" description:"Discover origin PR configuration"`
|
|
||||||
DiscoverPRFromForks *DiscoverPRFromForks `json:"discover_pr_from_forks,omitempty" mapstructure:"discover_pr_from_forks" description:"Discover fork PR configuration"`
|
|
||||||
DiscoverTags bool `json:"discover_tags,omitempty" mapstructure:"discover_tags" description:"Discover tag configuration"`
|
|
||||||
CloneOption *GitCloneOption `json:"git_clone_option,omitempty" mapstructure:"git_clone_option" description:"advavced git clone options"`
|
|
||||||
RegexFilter string `json:"regex_filter,omitempty" mapstructure:"regex_filter" description:"Regex used to match the name of the branch that needs to be run"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type MultiBranchJobTrigger struct {
|
|
||||||
CreateActionJobsToTrigger string `json:"create_action_job_to_trigger,omitempty" description:"pipeline name to trigger"`
|
|
||||||
DeleteActionJobsToTrigger string `json:"delete_action_job_to_trigger,omitempty" description:"pipeline name to trigger"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GitCloneOption struct {
|
|
||||||
Shallow bool `json:"shallow,omitempty" mapstructure:"shallow" description:"Whether to use git shallow clone"`
|
|
||||||
Timeout int `json:"timeout,omitempty" mapstructure:"timeout" description:"git clone timeout mins"`
|
|
||||||
Depth int `json:"depth,omitempty" mapstructure:"depth" description:"git clone depth"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SvnSource struct {
|
|
||||||
ScmId string `json:"scm_id,omitempty" description:"uid of scm"`
|
|
||||||
Remote string `json:"remote,omitempty" description:"remote address url"`
|
|
||||||
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access svn source"`
|
|
||||||
Includes string `json:"includes,omitempty" description:"branches to run pipeline"`
|
|
||||||
Excludes string `json:"excludes,omitempty" description:"branches do not run pipeline"`
|
|
||||||
}
|
|
||||||
type SingleSvnSource struct {
|
|
||||||
ScmId string `json:"scm_id,omitempty" description:"uid of scm"`
|
|
||||||
Remote string `json:"remote,omitempty" description:"remote address url"`
|
|
||||||
CredentialId string `json:"credential_id,omitempty" mapstructure:"credential_id" description:"credential id to access svn source"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DiscoverPRFromForks struct {
|
|
||||||
Strategy int `json:"strategy,omitempty" mapstructure:"strategy" description:"github discover strategy"`
|
|
||||||
Trust int `json:"trust,omitempty" mapstructure:"trust" description:"trust user type"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DiscarderProperty struct {
|
|
||||||
DaysToKeep string `json:"days_to_keep,omitempty" mapstructure:"days_to_keep" description:"days to keep pipeline"`
|
|
||||||
NumToKeep string `json:"num_to_keep,omitempty" mapstructure:"num_to_keep" description:"nums to keep pipeline"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Parameter struct {
|
|
||||||
Name string `json:"name" description:"name of param"`
|
|
||||||
DefaultValue string `json:"default_value,omitempty" mapstructure:"default_value" description:"default value of param"`
|
|
||||||
Type string `json:"type" description:"type of param"`
|
|
||||||
Description string `json:"description,omitempty" description:"description of pipeline"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type TimerTrigger struct {
|
|
||||||
// user in no scm job
|
|
||||||
Cron string `json:"cron,omitempty" description:"jenkins cron script"`
|
|
||||||
|
|
||||||
// use in multi-branch job
|
|
||||||
Interval string `json:"interval,omitempty" description:"interval ms"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type RemoteTrigger struct {
|
|
||||||
Token string `json:"token,omitempty" description:"remote trigger token"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Pipeline{}, &PipelineList{})
|
|
||||||
}
|
|
||||||
46
vendor/kubesphere.io/api/devops/v1alpha3/register.go
generated
vendored
46
vendor/kubesphere.io/api/devops/v1alpha3/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha3 contains API Schema definitions for the devops v1alpha3 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/devops
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=devops.kubesphere.io
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "devops.kubesphere.io", Version: "v1alpha3"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
561
vendor/kubesphere.io/api/devops/v1alpha3/zz_generated.deepcopy.go
generated
vendored
561
vendor/kubesphere.io/api/devops/v1alpha3/zz_generated.deepcopy.go
generated
vendored
@@ -1,561 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *BitbucketServerSource) DeepCopyInto(out *BitbucketServerSource) {
|
|
||||||
*out = *in
|
|
||||||
if in.DiscoverPRFromForks != nil {
|
|
||||||
in, out := &in.DiscoverPRFromForks, &out.DiscoverPRFromForks
|
|
||||||
*out = new(DiscoverPRFromForks)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.CloneOption != nil {
|
|
||||||
in, out := &in.CloneOption, &out.CloneOption
|
|
||||||
*out = new(GitCloneOption)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitbucketServerSource.
|
|
||||||
func (in *BitbucketServerSource) DeepCopy() *BitbucketServerSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(BitbucketServerSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DevOpsProject) DeepCopyInto(out *DevOpsProject) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevOpsProject.
|
|
||||||
func (in *DevOpsProject) DeepCopy() *DevOpsProject {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DevOpsProject)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *DevOpsProject) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DevOpsProjectList) DeepCopyInto(out *DevOpsProjectList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]DevOpsProject, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevOpsProjectList.
|
|
||||||
func (in *DevOpsProjectList) DeepCopy() *DevOpsProjectList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DevOpsProjectList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *DevOpsProjectList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DevOpsProjectSpec) DeepCopyInto(out *DevOpsProjectSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevOpsProjectSpec.
|
|
||||||
func (in *DevOpsProjectSpec) DeepCopy() *DevOpsProjectSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DevOpsProjectSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DevOpsProjectStatus) DeepCopyInto(out *DevOpsProjectStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevOpsProjectStatus.
|
|
||||||
func (in *DevOpsProjectStatus) DeepCopy() *DevOpsProjectStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DevOpsProjectStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DiscarderProperty) DeepCopyInto(out *DiscarderProperty) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscarderProperty.
|
|
||||||
func (in *DiscarderProperty) DeepCopy() *DiscarderProperty {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DiscarderProperty)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DiscoverPRFromForks) DeepCopyInto(out *DiscoverPRFromForks) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoverPRFromForks.
|
|
||||||
func (in *DiscoverPRFromForks) DeepCopy() *DiscoverPRFromForks {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DiscoverPRFromForks)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GitCloneOption) DeepCopyInto(out *GitCloneOption) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitCloneOption.
|
|
||||||
func (in *GitCloneOption) DeepCopy() *GitCloneOption {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GitCloneOption)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GitSource) DeepCopyInto(out *GitSource) {
|
|
||||||
*out = *in
|
|
||||||
if in.CloneOption != nil {
|
|
||||||
in, out := &in.CloneOption, &out.CloneOption
|
|
||||||
*out = new(GitCloneOption)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSource.
|
|
||||||
func (in *GitSource) DeepCopy() *GitSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GitSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GithubSource) DeepCopyInto(out *GithubSource) {
|
|
||||||
*out = *in
|
|
||||||
if in.DiscoverPRFromForks != nil {
|
|
||||||
in, out := &in.DiscoverPRFromForks, &out.DiscoverPRFromForks
|
|
||||||
*out = new(DiscoverPRFromForks)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.CloneOption != nil {
|
|
||||||
in, out := &in.CloneOption, &out.CloneOption
|
|
||||||
*out = new(GitCloneOption)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubSource.
|
|
||||||
func (in *GithubSource) DeepCopy() *GithubSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GithubSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GitlabSource) DeepCopyInto(out *GitlabSource) {
|
|
||||||
*out = *in
|
|
||||||
if in.DiscoverPRFromForks != nil {
|
|
||||||
in, out := &in.DiscoverPRFromForks, &out.DiscoverPRFromForks
|
|
||||||
*out = new(DiscoverPRFromForks)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.CloneOption != nil {
|
|
||||||
in, out := &in.CloneOption, &out.CloneOption
|
|
||||||
*out = new(GitCloneOption)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitlabSource.
|
|
||||||
func (in *GitlabSource) DeepCopy() *GitlabSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GitlabSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *MultiBranchJobTrigger) DeepCopyInto(out *MultiBranchJobTrigger) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiBranchJobTrigger.
|
|
||||||
func (in *MultiBranchJobTrigger) DeepCopy() *MultiBranchJobTrigger {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(MultiBranchJobTrigger)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *MultiBranchPipeline) DeepCopyInto(out *MultiBranchPipeline) {
|
|
||||||
*out = *in
|
|
||||||
if in.Discarder != nil {
|
|
||||||
in, out := &in.Discarder, &out.Discarder
|
|
||||||
*out = new(DiscarderProperty)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.TimerTrigger != nil {
|
|
||||||
in, out := &in.TimerTrigger, &out.TimerTrigger
|
|
||||||
*out = new(TimerTrigger)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.GitSource != nil {
|
|
||||||
in, out := &in.GitSource, &out.GitSource
|
|
||||||
*out = new(GitSource)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.GitHubSource != nil {
|
|
||||||
in, out := &in.GitHubSource, &out.GitHubSource
|
|
||||||
*out = new(GithubSource)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.GitlabSource != nil {
|
|
||||||
in, out := &in.GitlabSource, &out.GitlabSource
|
|
||||||
*out = new(GitlabSource)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.SvnSource != nil {
|
|
||||||
in, out := &in.SvnSource, &out.SvnSource
|
|
||||||
*out = new(SvnSource)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.SingleSvnSource != nil {
|
|
||||||
in, out := &in.SingleSvnSource, &out.SingleSvnSource
|
|
||||||
*out = new(SingleSvnSource)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.BitbucketServerSource != nil {
|
|
||||||
in, out := &in.BitbucketServerSource, &out.BitbucketServerSource
|
|
||||||
*out = new(BitbucketServerSource)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.MultiBranchJobTrigger != nil {
|
|
||||||
in, out := &in.MultiBranchJobTrigger, &out.MultiBranchJobTrigger
|
|
||||||
*out = new(MultiBranchJobTrigger)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiBranchPipeline.
|
|
||||||
func (in *MultiBranchPipeline) DeepCopy() *MultiBranchPipeline {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(MultiBranchPipeline)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NoScmPipeline) DeepCopyInto(out *NoScmPipeline) {
|
|
||||||
*out = *in
|
|
||||||
if in.Discarder != nil {
|
|
||||||
in, out := &in.Discarder, &out.Discarder
|
|
||||||
*out = new(DiscarderProperty)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.Parameters != nil {
|
|
||||||
in, out := &in.Parameters, &out.Parameters
|
|
||||||
*out = make([]Parameter, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.TimerTrigger != nil {
|
|
||||||
in, out := &in.TimerTrigger, &out.TimerTrigger
|
|
||||||
*out = new(TimerTrigger)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.RemoteTrigger != nil {
|
|
||||||
in, out := &in.RemoteTrigger, &out.RemoteTrigger
|
|
||||||
*out = new(RemoteTrigger)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NoScmPipeline.
|
|
||||||
func (in *NoScmPipeline) DeepCopy() *NoScmPipeline {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NoScmPipeline)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Parameter) DeepCopyInto(out *Parameter) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.
|
|
||||||
func (in *Parameter) DeepCopy() *Parameter {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Parameter)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Pipeline) DeepCopyInto(out *Pipeline) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pipeline.
|
|
||||||
func (in *Pipeline) DeepCopy() *Pipeline {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Pipeline)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Pipeline) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PipelineList) DeepCopyInto(out *PipelineList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Pipeline, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineList.
|
|
||||||
func (in *PipelineList) DeepCopy() *PipelineList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PipelineList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *PipelineList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Pipeline != nil {
|
|
||||||
in, out := &in.Pipeline, &out.Pipeline
|
|
||||||
*out = new(NoScmPipeline)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.MultiBranchPipeline != nil {
|
|
||||||
in, out := &in.MultiBranchPipeline, &out.MultiBranchPipeline
|
|
||||||
*out = new(MultiBranchPipeline)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSpec.
|
|
||||||
func (in *PipelineSpec) DeepCopy() *PipelineSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PipelineSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStatus.
|
|
||||||
func (in *PipelineStatus) DeepCopy() *PipelineStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PipelineStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RemoteTrigger) DeepCopyInto(out *RemoteTrigger) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteTrigger.
|
|
||||||
func (in *RemoteTrigger) DeepCopy() *RemoteTrigger {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RemoteTrigger)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *SingleSvnSource) DeepCopyInto(out *SingleSvnSource) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SingleSvnSource.
|
|
||||||
func (in *SingleSvnSource) DeepCopy() *SingleSvnSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(SingleSvnSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *SvnSource) DeepCopyInto(out *SvnSource) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SvnSource.
|
|
||||||
func (in *SvnSource) DeepCopy() *SvnSource {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(SvnSource)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *TimerTrigger) DeepCopyInto(out *TimerTrigger) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimerTrigger.
|
|
||||||
func (in *TimerTrigger) DeepCopy() *TimerTrigger {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(TimerTrigger)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/iam/v1alpha2/doc.go
generated
vendored
23
vendor/kubesphere.io/api/iam/v1alpha2/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the iam v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/iam
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=iam.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
174
vendor/kubesphere.io/api/iam/v1alpha2/federated_types.go
generated
vendored
174
vendor/kubesphere.io/api/iam/v1alpha2/federated_types.go
generated
vendored
@@ -1,174 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
rbacv1 "k8s.io/api/rbac/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcesSingularFedUser = "federateduser"
|
|
||||||
ResourcesSingularFedGlobalRoleBinding = "federatedglobalrolebinding"
|
|
||||||
ResourcesSingularFedWorkspaceRoleBinding = "federatedworkspacerolebinding"
|
|
||||||
ResourcesSingularFedGlobalRole = "federatedglobalrole"
|
|
||||||
ResourcesSingularFedWorkspaceRole = "federatedworkspacerole"
|
|
||||||
ResourcesPluralFedUser = "federatedusers"
|
|
||||||
ResourcesPluralFedGlobalRoleBinding = "federatedglobalrolebindings"
|
|
||||||
ResourcesPluralFedWorkspaceRoleBinding = "federatedworkspacerolebindings"
|
|
||||||
ResourcesPluralFedGlobalRole = "federatedglobalroles"
|
|
||||||
ResourcesPluralFedWorkspaceRole = "federatedworkspaceroles"
|
|
||||||
FedClusterRoleBindingKind = "FederatedClusterRoleBinding"
|
|
||||||
FedClusterRoleKind = "FederatedClusterRole"
|
|
||||||
FedGlobalRoleKind = "FederatedGlobalRole"
|
|
||||||
FedWorkspaceRoleKind = "FederatedWorkspaceRole"
|
|
||||||
FedGlobalRoleBindingKind = "FederatedGlobalRoleBinding"
|
|
||||||
FedWorkspaceRoleBindingKind = "FederatedWorkspaceRoleBinding"
|
|
||||||
fedResourceGroup = "types.kubefed.io"
|
|
||||||
fedResourceVersion = "v1beta1"
|
|
||||||
FedUserKind = "FederatedUser"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
FedUserResource = metav1.APIResource{
|
|
||||||
Name: ResourcesPluralFedUser,
|
|
||||||
SingularName: ResourcesSingularFedUser,
|
|
||||||
Namespaced: false,
|
|
||||||
Group: fedResourceGroup,
|
|
||||||
Version: fedResourceVersion,
|
|
||||||
Kind: FedUserKind,
|
|
||||||
}
|
|
||||||
FedGlobalRoleBindingResource = metav1.APIResource{
|
|
||||||
Name: ResourcesPluralFedGlobalRoleBinding,
|
|
||||||
SingularName: ResourcesSingularFedGlobalRoleBinding,
|
|
||||||
Namespaced: false,
|
|
||||||
Group: fedResourceGroup,
|
|
||||||
Version: fedResourceVersion,
|
|
||||||
Kind: FedGlobalRoleBindingKind,
|
|
||||||
}
|
|
||||||
FedWorkspaceRoleBindingResource = metav1.APIResource{
|
|
||||||
Name: ResourcesPluralFedWorkspaceRoleBinding,
|
|
||||||
SingularName: ResourcesSingularFedWorkspaceRoleBinding,
|
|
||||||
Namespaced: false,
|
|
||||||
Group: fedResourceGroup,
|
|
||||||
Version: fedResourceVersion,
|
|
||||||
Kind: FedWorkspaceRoleBindingKind,
|
|
||||||
}
|
|
||||||
FedGlobalRoleResource = metav1.APIResource{
|
|
||||||
Name: ResourcesPluralFedGlobalRole,
|
|
||||||
SingularName: ResourcesSingularFedGlobalRole,
|
|
||||||
Namespaced: false,
|
|
||||||
Group: fedResourceGroup,
|
|
||||||
Version: fedResourceVersion,
|
|
||||||
Kind: FedGlobalRoleKind,
|
|
||||||
}
|
|
||||||
|
|
||||||
FedWorkspaceRoleResource = metav1.APIResource{
|
|
||||||
Name: ResourcesPluralFedWorkspaceRole,
|
|
||||||
SingularName: ResourcesSingularFedWorkspaceRole,
|
|
||||||
Namespaced: false,
|
|
||||||
Group: fedResourceGroup,
|
|
||||||
Version: fedResourceVersion,
|
|
||||||
Kind: FedWorkspaceRoleKind,
|
|
||||||
}
|
|
||||||
|
|
||||||
FederatedClusterRoleBindingResource = schema.GroupVersionResource{
|
|
||||||
Group: fedResourceGroup,
|
|
||||||
Version: fedResourceVersion,
|
|
||||||
Resource: "federatedclusterrolebindings",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type FederatedRoleBinding struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedRoleBindingSpec `json:"spec"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type FederatedRoleBindingSpec struct {
|
|
||||||
Template RoleBindingTemplate `json:"template"`
|
|
||||||
Placement Placement `json:"placement"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type RoleBindingTemplate struct {
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Subjects []rbacv1.Subject `json:"subjects,omitempty"`
|
|
||||||
RoleRef rbacv1.RoleRef `json:"roleRef"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type FederatedRole struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedRoleSpec `json:"spec"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type FederatedRoleSpec struct {
|
|
||||||
Template RoleTemplate `json:"template"`
|
|
||||||
Placement Placement `json:"placement"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type RoleTemplate struct {
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
// +optional
|
|
||||||
Rules []rbacv1.PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type FederatedUser struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedUserSpec `json:"spec"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type FederatedUserSpec struct {
|
|
||||||
Template UserTemplate `json:"template"`
|
|
||||||
Placement Placement `json:"placement"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type UserTemplate struct {
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec UserSpec `json:"spec"`
|
|
||||||
// +optional
|
|
||||||
Status UserStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type Placement struct {
|
|
||||||
Clusters []Cluster `json:"clusters,omitempty"`
|
|
||||||
ClusterSelector ClusterSelector `json:"clusterSelector,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
//+kubebuilder:object:generate=true
|
|
||||||
type ClusterSelector struct {
|
|
||||||
MatchLabels map[string]string `json:"matchLabels,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:generate=false
|
|
||||||
type Cluster struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
}
|
|
||||||
63
vendor/kubesphere.io/api/iam/v1alpha2/group_types.go
generated
vendored
63
vendor/kubesphere.io/api/iam/v1alpha2/group_types.go
generated
vendored
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcePluralGroup = "groups"
|
|
||||||
GroupReferenceLabel = "iam.kubesphere.io/group-ref"
|
|
||||||
GroupParent = "iam.kubesphere.io/group-parent"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GroupSpec defines the desired state of Group
|
|
||||||
type GroupSpec struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupStatus defines the observed state of Group
|
|
||||||
type GroupStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace"
|
|
||||||
// +kubebuilder:resource:categories="group",scope="Cluster"
|
|
||||||
|
|
||||||
// Group is the Schema for the groups API
|
|
||||||
type Group struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec GroupSpec `json:"spec,omitempty"`
|
|
||||||
Status GroupStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// GroupList contains a list of Group
|
|
||||||
type GroupList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Group `json:"items"`
|
|
||||||
}
|
|
||||||
59
vendor/kubesphere.io/api/iam/v1alpha2/groupbinding_types.go
generated
vendored
59
vendor/kubesphere.io/api/iam/v1alpha2/groupbinding_types.go
generated
vendored
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcePluralGroupBinding = "groupbindings"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GroupRef defines the desired relation of GroupBinding
|
|
||||||
type GroupRef struct {
|
|
||||||
APIGroup string `json:"apiGroup,omitempty"`
|
|
||||||
Kind string `json:"kind,omitempty"`
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:printcolumn:name="Group",type="string",JSONPath=".groupRef.name"
|
|
||||||
// +kubebuilder:printcolumn:name="Users",type="string",JSONPath=".users"
|
|
||||||
// +kubebuilder:resource:categories="group",scope="Cluster"
|
|
||||||
|
|
||||||
// GroupBinding is the Schema for the groupbindings API
|
|
||||||
type GroupBinding struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
GroupRef GroupRef `json:"groupRef,omitempty"`
|
|
||||||
Users []string `json:"users,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// GroupBindingList contains a list of GroupBinding
|
|
||||||
type GroupBindingList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []GroupBinding `json:"items"`
|
|
||||||
}
|
|
||||||
71
vendor/kubesphere.io/api/iam/v1alpha2/register.go
generated
vendored
71
vendor/kubesphere.io/api/iam/v1alpha2/register.go
generated
vendored
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the iam v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:object:generate=true
|
|
||||||
// +groupName=iam.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "iam.kubesphere.io", Version: "v1alpha2"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adds the list of known types to the given scheme.
|
|
||||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
|
||||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
|
||||||
&User{},
|
|
||||||
&UserList{},
|
|
||||||
&LoginRecord{},
|
|
||||||
&LoginRecordList{},
|
|
||||||
&GlobalRole{},
|
|
||||||
&GlobalRoleList{},
|
|
||||||
&GlobalRoleBinding{},
|
|
||||||
&GlobalRoleBindingList{},
|
|
||||||
&WorkspaceRole{},
|
|
||||||
&WorkspaceRoleList{},
|
|
||||||
&WorkspaceRoleBinding{},
|
|
||||||
&WorkspaceRoleBindingList{},
|
|
||||||
&RoleBase{},
|
|
||||||
&RoleBaseList{},
|
|
||||||
&Group{},
|
|
||||||
&GroupList{},
|
|
||||||
&GroupBinding{},
|
|
||||||
&GroupBindingList{},
|
|
||||||
)
|
|
||||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
349
vendor/kubesphere.io/api/iam/v1alpha2/types.go
generated
vendored
349
vendor/kubesphere.io/api/iam/v1alpha2/types.go
generated
vendored
@@ -1,349 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
rbacv1 "k8s.io/api/rbac/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindUser = "User"
|
|
||||||
ResourcesSingularUser = "user"
|
|
||||||
ResourcesPluralUser = "users"
|
|
||||||
ResourceKindLoginRecord = "LoginRecord"
|
|
||||||
ResourcesSingularLoginRecord = "loginrecord"
|
|
||||||
ResourcesPluralLoginRecord = "loginrecords"
|
|
||||||
ResourceKindGlobalRoleBinding = "GlobalRoleBinding"
|
|
||||||
ResourcesSingularGlobalRoleBinding = "globalrolebinding"
|
|
||||||
ResourcesPluralGlobalRoleBinding = "globalrolebindings"
|
|
||||||
ResourceKindClusterRoleBinding = "ClusterRoleBinding"
|
|
||||||
ResourcesSingularClusterRoleBinding = "clusterrolebinding"
|
|
||||||
ResourcesPluralClusterRoleBinding = "clusterrolebindings"
|
|
||||||
ResourceKindRoleBinding = "RoleBinding"
|
|
||||||
ResourcesSingularRoleBinding = "rolebinding"
|
|
||||||
ResourcesPluralRoleBinding = "rolebindings"
|
|
||||||
ResourceKindGlobalRole = "GlobalRole"
|
|
||||||
ResourcesSingularGlobalRole = "globalrole"
|
|
||||||
ResourcesPluralGlobalRole = "globalroles"
|
|
||||||
ResourceKindWorkspaceRoleBinding = "WorkspaceRoleBinding"
|
|
||||||
ResourcesSingularWorkspaceRoleBinding = "workspacerolebinding"
|
|
||||||
ResourcesPluralWorkspaceRoleBinding = "workspacerolebindings"
|
|
||||||
ResourceKindWorkspaceRole = "WorkspaceRole"
|
|
||||||
ResourcesSingularWorkspaceRole = "workspacerole"
|
|
||||||
ResourcesPluralWorkspaceRole = "workspaceroles"
|
|
||||||
ResourceKindClusterRole = "ClusterRole"
|
|
||||||
ResourcesSingularClusterRole = "clusterrole"
|
|
||||||
ResourcesPluralClusterRole = "clusterroles"
|
|
||||||
ResourceKindRole = "Role"
|
|
||||||
ResourcesSingularRole = "role"
|
|
||||||
ResourcesPluralRole = "roles"
|
|
||||||
RegoOverrideAnnotation = "iam.kubesphere.io/rego-override"
|
|
||||||
AggregationRolesAnnotation = "iam.kubesphere.io/aggregation-roles"
|
|
||||||
GlobalRoleAnnotation = "iam.kubesphere.io/globalrole"
|
|
||||||
WorkspaceRoleAnnotation = "iam.kubesphere.io/workspacerole"
|
|
||||||
ClusterRoleAnnotation = "iam.kubesphere.io/clusterrole"
|
|
||||||
UninitializedAnnotation = "iam.kubesphere.io/uninitialized"
|
|
||||||
LastPasswordChangeTimeAnnotation = "iam.kubesphere.io/last-password-change-time"
|
|
||||||
RoleAnnotation = "iam.kubesphere.io/role"
|
|
||||||
RoleTemplateLabel = "iam.kubesphere.io/role-template"
|
|
||||||
ScopeLabelFormat = "scope.kubesphere.io/%s"
|
|
||||||
UserReferenceLabel = "iam.kubesphere.io/user-ref"
|
|
||||||
IdentifyProviderLabel = "iam.kubesphere.io/identify-provider"
|
|
||||||
OriginUIDLabel = "iam.kubesphere.io/origin-uid"
|
|
||||||
ServiceAccountReferenceLabel = "iam.kubesphere.io/serviceaccount-ref"
|
|
||||||
FieldEmail = "email"
|
|
||||||
ExtraEmail = FieldEmail
|
|
||||||
ExtraIdentityProvider = "idp"
|
|
||||||
ExtraUID = "uid"
|
|
||||||
ExtraUsername = "username"
|
|
||||||
ExtraDisplayName = "displayName"
|
|
||||||
ExtraUninitialized = "uninitialized"
|
|
||||||
InGroup = "ingroup"
|
|
||||||
NotInGroup = "notingroup"
|
|
||||||
AggregateTo = "aggregateTo"
|
|
||||||
ScopeWorkspace = "workspace"
|
|
||||||
ScopeCluster = "cluster"
|
|
||||||
ScopeNamespace = "namespace"
|
|
||||||
ScopeDevOps = "devops"
|
|
||||||
PlatformAdmin = "platform-admin"
|
|
||||||
NamespaceAdmin = "admin"
|
|
||||||
ClusterAdmin = "cluster-admin"
|
|
||||||
PreRegistrationUser = "system:pre-registration"
|
|
||||||
PreRegistrationUserGroup = "pre-registration"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
|
|
||||||
// User is the Schema for the users API
|
|
||||||
// +kubebuilder:printcolumn:name="Email",type="string",JSONPath=".spec.email"
|
|
||||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.state"
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type User struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec UserSpec `json:"spec"`
|
|
||||||
// +optional
|
|
||||||
Status UserStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FinalizerName string
|
|
||||||
|
|
||||||
// UserSpec defines the desired state of User
|
|
||||||
type UserSpec struct {
|
|
||||||
// Unique email address(https://www.ietf.org/rfc/rfc5322.txt).
|
|
||||||
Email string `json:"email"`
|
|
||||||
// The preferred written or spoken language for the user.
|
|
||||||
// +optional
|
|
||||||
Lang string `json:"lang,omitempty"`
|
|
||||||
// Description of the user.
|
|
||||||
// +optional
|
|
||||||
Description string `json:"description,omitempty"`
|
|
||||||
// +optional
|
|
||||||
DisplayName string `json:"displayName,omitempty"`
|
|
||||||
// +optional
|
|
||||||
Groups []string `json:"groups,omitempty"`
|
|
||||||
// password will be encrypted by mutating admission webhook
|
|
||||||
EncryptedPassword string `json:"password,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserState string
|
|
||||||
|
|
||||||
// These are the valid phases of a user.
|
|
||||||
const (
|
|
||||||
// UserActive means the user is available.
|
|
||||||
UserActive UserState = "Active"
|
|
||||||
// UserDisabled means the user is disabled.
|
|
||||||
UserDisabled UserState = "Disabled"
|
|
||||||
// UserAuthLimitExceeded means restrict user login.
|
|
||||||
UserAuthLimitExceeded UserState = "AuthLimitExceeded"
|
|
||||||
|
|
||||||
AuthenticatedSuccessfully = "authenticated successfully"
|
|
||||||
)
|
|
||||||
|
|
||||||
// UserStatus defines the observed state of User
|
|
||||||
type UserStatus struct {
|
|
||||||
// The user status
|
|
||||||
// +optional
|
|
||||||
State *UserState `json:"state,omitempty"`
|
|
||||||
// +optional
|
|
||||||
Reason string `json:"reason,omitempty"`
|
|
||||||
// +optional
|
|
||||||
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
|
|
||||||
// Last login attempt timestamp
|
|
||||||
// +optional
|
|
||||||
LastLoginTime *metav1.Time `json:"lastLoginTime,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// UserList contains a list of User
|
|
||||||
type UserList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// Standard object's metadata.
|
|
||||||
// +optional
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []User `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type GlobalRole struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// Rules holds all the PolicyRules for this GlobalRole
|
|
||||||
// +optional
|
|
||||||
Rules []rbacv1.PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// GlobalRoleList contains a list of GlobalRole
|
|
||||||
type GlobalRoleList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []GlobalRole `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// GlobalRoleBinding is the Schema for the globalrolebindings API
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type GlobalRoleBinding struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// Subjects holds references to the objects the role applies to.
|
|
||||||
// +optional
|
|
||||||
Subjects []rbacv1.Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"`
|
|
||||||
|
|
||||||
// RoleRef can only reference a GlobalRole.
|
|
||||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
|
||||||
RoleRef rbacv1.RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// GlobalRoleBindingList contains a list of GlobalRoleBinding
|
|
||||||
type GlobalRoleBindingList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// Standard object's metadata.
|
|
||||||
// +optional
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []GlobalRoleBinding `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace"
|
|
||||||
// +kubebuilder:printcolumn:name="Alias",type="string",JSONPath=".metadata.annotations.kubesphere\\.io/alias-name"
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type WorkspaceRole struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// Rules holds all the PolicyRules for this WorkspaceRole
|
|
||||||
// +optional
|
|
||||||
Rules []rbacv1.PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// WorkspaceRoleList contains a list of WorkspaceRole
|
|
||||||
type WorkspaceRoleList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []WorkspaceRole `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace"
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// WorkspaceRoleBinding is the Schema for the workspacerolebindings API
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type WorkspaceRoleBinding struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// Subjects holds references to the objects the role applies to.
|
|
||||||
// +optional
|
|
||||||
Subjects []rbacv1.Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"`
|
|
||||||
|
|
||||||
// RoleRef can only reference a WorkspaceRole.
|
|
||||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
|
||||||
RoleRef rbacv1.RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// WorkspaceRoleBindingList contains a list of WorkspaceRoleBinding
|
|
||||||
type WorkspaceRoleBindingList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []WorkspaceRoleBinding `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type RoleBase struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
|
||||||
// +kubebuilder:validation:EmbeddedResource
|
|
||||||
Role runtime.RawExtension `json:"role"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// RoleBaseList contains a list of RoleBase
|
|
||||||
type RoleBaseList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []RoleBase `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type"
|
|
||||||
// +kubebuilder:printcolumn:name="Provider",type="string",JSONPath=".spec.provider"
|
|
||||||
// +kubebuilder:printcolumn:name="From",type="string",JSONPath=".spec.sourceIP"
|
|
||||||
// +kubebuilder:printcolumn:name="Success",type="string",JSONPath=".spec.success"
|
|
||||||
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".spec.reason"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +kubebuilder:resource:categories="iam",scope="Cluster"
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type LoginRecord struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec LoginRecordSpec `json:"spec"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LoginRecordSpec struct {
|
|
||||||
// Which authentication method used, BasicAuth/OAuth
|
|
||||||
Type LoginType `json:"type"`
|
|
||||||
// Provider of authentication, Ldap/Github etc.
|
|
||||||
Provider string `json:"provider"`
|
|
||||||
// Source IP of client
|
|
||||||
SourceIP string `json:"sourceIP"`
|
|
||||||
// User agent of login attempt
|
|
||||||
UserAgent string `json:"userAgent,omitempty"`
|
|
||||||
// Successful login attempt or not
|
|
||||||
Success bool `json:"success"`
|
|
||||||
// States failed login attempt reason
|
|
||||||
Reason string `json:"reason"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LoginType string
|
|
||||||
|
|
||||||
const (
|
|
||||||
BasicAuth LoginType = "Basic"
|
|
||||||
OAuth LoginType = "OAuth"
|
|
||||||
Token LoginType = "Token"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// LoginRecordList contains a list of LoginRecord
|
|
||||||
type LoginRecordList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []LoginRecord `json:"items"`
|
|
||||||
}
|
|
||||||
947
vendor/kubesphere.io/api/iam/v1alpha2/zz_generated.deepcopy.go
generated
vendored
947
vendor/kubesphere.io/api/iam/v1alpha2/zz_generated.deepcopy.go
generated
vendored
@@ -1,947 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/rbac/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Cluster) DeepCopyInto(out *Cluster) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
|
|
||||||
func (in *Cluster) DeepCopy() *Cluster {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Cluster)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector) {
|
|
||||||
*out = *in
|
|
||||||
if in.MatchLabels != nil {
|
|
||||||
in, out := &in.MatchLabels, &out.MatchLabels
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSelector.
|
|
||||||
func (in *ClusterSelector) DeepCopy() *ClusterSelector {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ClusterSelector)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *FederatedRole) DeepCopyInto(out *FederatedRole) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRole.
|
|
||||||
func (in *FederatedRole) DeepCopy() *FederatedRole {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(FederatedRole)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *FederatedRoleBinding) DeepCopyInto(out *FederatedRoleBinding) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRoleBinding.
|
|
||||||
func (in *FederatedRoleBinding) DeepCopy() *FederatedRoleBinding {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(FederatedRoleBinding)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *FederatedRoleBindingSpec) DeepCopyInto(out *FederatedRoleBindingSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.Template.DeepCopyInto(&out.Template)
|
|
||||||
in.Placement.DeepCopyInto(&out.Placement)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRoleBindingSpec.
|
|
||||||
func (in *FederatedRoleBindingSpec) DeepCopy() *FederatedRoleBindingSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(FederatedRoleBindingSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *FederatedRoleSpec) DeepCopyInto(out *FederatedRoleSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.Template.DeepCopyInto(&out.Template)
|
|
||||||
in.Placement.DeepCopyInto(&out.Placement)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedRoleSpec.
|
|
||||||
func (in *FederatedRoleSpec) DeepCopy() *FederatedRoleSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(FederatedRoleSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *FederatedUser) DeepCopyInto(out *FederatedUser) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedUser.
|
|
||||||
func (in *FederatedUser) DeepCopy() *FederatedUser {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(FederatedUser)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *FederatedUserSpec) DeepCopyInto(out *FederatedUserSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.Template.DeepCopyInto(&out.Template)
|
|
||||||
in.Placement.DeepCopyInto(&out.Placement)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FederatedUserSpec.
|
|
||||||
func (in *FederatedUserSpec) DeepCopy() *FederatedUserSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(FederatedUserSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GlobalRole) DeepCopyInto(out *GlobalRole) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
if in.Rules != nil {
|
|
||||||
in, out := &in.Rules, &out.Rules
|
|
||||||
*out = make([]v1.PolicyRule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRole.
|
|
||||||
func (in *GlobalRole) DeepCopy() *GlobalRole {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GlobalRole)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GlobalRole) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GlobalRoleBinding) DeepCopyInto(out *GlobalRoleBinding) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
if in.Subjects != nil {
|
|
||||||
in, out := &in.Subjects, &out.Subjects
|
|
||||||
*out = make([]v1.Subject, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
out.RoleRef = in.RoleRef
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBinding.
|
|
||||||
func (in *GlobalRoleBinding) DeepCopy() *GlobalRoleBinding {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GlobalRoleBinding)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GlobalRoleBinding) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GlobalRoleBindingList) DeepCopyInto(out *GlobalRoleBindingList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]GlobalRoleBinding, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleBindingList.
|
|
||||||
func (in *GlobalRoleBindingList) DeepCopy() *GlobalRoleBindingList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GlobalRoleBindingList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GlobalRoleBindingList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GlobalRoleList) DeepCopyInto(out *GlobalRoleList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]GlobalRole, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRoleList.
|
|
||||||
func (in *GlobalRoleList) DeepCopy() *GlobalRoleList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GlobalRoleList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GlobalRoleList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Group) DeepCopyInto(out *Group) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group.
|
|
||||||
func (in *Group) DeepCopy() *Group {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Group)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Group) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GroupBinding) DeepCopyInto(out *GroupBinding) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.GroupRef = in.GroupRef
|
|
||||||
if in.Users != nil {
|
|
||||||
in, out := &in.Users, &out.Users
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupBinding.
|
|
||||||
func (in *GroupBinding) DeepCopy() *GroupBinding {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GroupBinding)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GroupBinding) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GroupBindingList) DeepCopyInto(out *GroupBindingList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]GroupBinding, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupBindingList.
|
|
||||||
func (in *GroupBindingList) DeepCopy() *GroupBindingList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GroupBindingList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GroupBindingList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GroupList) DeepCopyInto(out *GroupList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Group, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupList.
|
|
||||||
func (in *GroupList) DeepCopy() *GroupList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GroupList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *GroupList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GroupRef) DeepCopyInto(out *GroupRef) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupRef.
|
|
||||||
func (in *GroupRef) DeepCopy() *GroupRef {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GroupRef)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GroupSpec) DeepCopyInto(out *GroupSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSpec.
|
|
||||||
func (in *GroupSpec) DeepCopy() *GroupSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GroupSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GroupStatus) DeepCopyInto(out *GroupStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupStatus.
|
|
||||||
func (in *GroupStatus) DeepCopy() *GroupStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GroupStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *LoginRecord) DeepCopyInto(out *LoginRecord) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRecord.
|
|
||||||
func (in *LoginRecord) DeepCopy() *LoginRecord {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(LoginRecord)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *LoginRecord) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *LoginRecordList) DeepCopyInto(out *LoginRecordList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]LoginRecord, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRecordList.
|
|
||||||
func (in *LoginRecordList) DeepCopy() *LoginRecordList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(LoginRecordList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *LoginRecordList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *LoginRecordSpec) DeepCopyInto(out *LoginRecordSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginRecordSpec.
|
|
||||||
func (in *LoginRecordSpec) DeepCopy() *LoginRecordSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(LoginRecordSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Placement) DeepCopyInto(out *Placement) {
|
|
||||||
*out = *in
|
|
||||||
if in.Clusters != nil {
|
|
||||||
in, out := &in.Clusters, &out.Clusters
|
|
||||||
*out = make([]Cluster, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
in.ClusterSelector.DeepCopyInto(&out.ClusterSelector)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
|
|
||||||
func (in *Placement) DeepCopy() *Placement {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Placement)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RoleBase) DeepCopyInto(out *RoleBase) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Role.DeepCopyInto(&out.Role)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBase.
|
|
||||||
func (in *RoleBase) DeepCopy() *RoleBase {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RoleBase)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *RoleBase) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RoleBaseList) DeepCopyInto(out *RoleBaseList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]RoleBase, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBaseList.
|
|
||||||
func (in *RoleBaseList) DeepCopy() *RoleBaseList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RoleBaseList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *RoleBaseList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RoleBindingTemplate) DeepCopyInto(out *RoleBindingTemplate) {
|
|
||||||
*out = *in
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
if in.Subjects != nil {
|
|
||||||
in, out := &in.Subjects, &out.Subjects
|
|
||||||
*out = make([]v1.Subject, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
out.RoleRef = in.RoleRef
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingTemplate.
|
|
||||||
func (in *RoleBindingTemplate) DeepCopy() *RoleBindingTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RoleBindingTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) {
|
|
||||||
*out = *in
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
if in.Rules != nil {
|
|
||||||
in, out := &in.Rules, &out.Rules
|
|
||||||
*out = make([]v1.PolicyRule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleTemplate.
|
|
||||||
func (in *RoleTemplate) DeepCopy() *RoleTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(RoleTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *User) DeepCopyInto(out *User) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.
|
|
||||||
func (in *User) DeepCopy() *User {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(User)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *User) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *UserList) DeepCopyInto(out *UserList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]User, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList.
|
|
||||||
func (in *UserList) DeepCopy() *UserList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(UserList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *UserList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *UserSpec) DeepCopyInto(out *UserSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Groups != nil {
|
|
||||||
in, out := &in.Groups, &out.Groups
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec.
|
|
||||||
func (in *UserSpec) DeepCopy() *UserSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(UserSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *UserStatus) DeepCopyInto(out *UserStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.State != nil {
|
|
||||||
in, out := &in.State, &out.State
|
|
||||||
*out = new(UserState)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.LastTransitionTime != nil {
|
|
||||||
in, out := &in.LastTransitionTime, &out.LastTransitionTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.LastLoginTime != nil {
|
|
||||||
in, out := &in.LastLoginTime, &out.LastLoginTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus.
|
|
||||||
func (in *UserStatus) DeepCopy() *UserStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(UserStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *UserTemplate) DeepCopyInto(out *UserTemplate) {
|
|
||||||
*out = *in
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserTemplate.
|
|
||||||
func (in *UserTemplate) DeepCopy() *UserTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(UserTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceRole) DeepCopyInto(out *WorkspaceRole) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
if in.Rules != nil {
|
|
||||||
in, out := &in.Rules, &out.Rules
|
|
||||||
*out = make([]v1.PolicyRule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRole.
|
|
||||||
func (in *WorkspaceRole) DeepCopy() *WorkspaceRole {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceRole)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceRole) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceRoleBinding) DeepCopyInto(out *WorkspaceRoleBinding) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
if in.Subjects != nil {
|
|
||||||
in, out := &in.Subjects, &out.Subjects
|
|
||||||
*out = make([]v1.Subject, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
out.RoleRef = in.RoleRef
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRoleBinding.
|
|
||||||
func (in *WorkspaceRoleBinding) DeepCopy() *WorkspaceRoleBinding {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceRoleBinding)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceRoleBinding) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceRoleBindingList) DeepCopyInto(out *WorkspaceRoleBindingList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]WorkspaceRoleBinding, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRoleBindingList.
|
|
||||||
func (in *WorkspaceRoleBindingList) DeepCopy() *WorkspaceRoleBindingList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceRoleBindingList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceRoleBindingList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceRoleList) DeepCopyInto(out *WorkspaceRoleList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]WorkspaceRole, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceRoleList.
|
|
||||||
func (in *WorkspaceRoleList) DeepCopy() *WorkspaceRoleList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceRoleList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceRoleList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
41
vendor/kubesphere.io/api/network/calicov3/block_affinity_types.go
generated
vendored
41
vendor/kubesphere.io/api/network/calicov3/block_affinity_types.go
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
// Copyright (c) 2019-2020 Tigera, Inc. All rights reserved.
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
package calicov3
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
v3 "github.com/projectcalico/libcalico-go/lib/apis/v3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
type BlockAffinity struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec v3.BlockAffinitySpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// BlockAffinityList contains a list of BlockAffinity resources.
|
|
||||||
type BlockAffinityList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []BlockAffinity `json:"items"`
|
|
||||||
}
|
|
||||||
4
vendor/kubesphere.io/api/network/calicov3/doc.go
generated
vendored
4
vendor/kubesphere.io/api/network/calicov3/doc.go
generated
vendored
@@ -1,4 +0,0 @@
|
|||||||
// API Schema definitions for configuring the installation of Calico and Calico Enterprise
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +groupName=crd.projectcalico.org
|
|
||||||
package calicov3
|
|
||||||
86
vendor/kubesphere.io/api/network/calicov3/ipamblock_types.go
generated
vendored
86
vendor/kubesphere.io/api/network/calicov3/ipamblock_types.go
generated
vendored
@@ -1,86 +0,0 @@
|
|||||||
// Copyright (c) 2019-2020 Tigera, Inc. All rights reserved.
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
package calicov3
|
|
||||||
|
|
||||||
import (
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
v3 "github.com/projectcalico/libcalico-go/lib/apis/v3"
|
|
||||||
cnet "github.com/projectcalico/libcalico-go/lib/net"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
type IPAMBlock struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec v3.IPAMBlockSpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// IPAMBlockList contains a list of IPAMBlock resources.
|
|
||||||
type IPAMBlockList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []IPAMBlock `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) NumReservedAddresses() int {
|
|
||||||
sum := 0
|
|
||||||
for _, attrIdx := range b.Spec.Allocations {
|
|
||||||
if attrIdx == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
attrs := b.Spec.Attributes[*attrIdx]
|
|
||||||
if attrs.AttrPrimary == nil || strings.ToLower(*attrs.AttrPrimary) == WindowsReservedHandle {
|
|
||||||
sum += 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sum
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get number of addresses covered by the block
|
|
||||||
func (b *IPAMBlock) NumAddresses() int {
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
ones, size := cidr.Mask.Size()
|
|
||||||
numAddresses := 1 << uint(size-ones)
|
|
||||||
return numAddresses
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) NumFreeAddresses() int {
|
|
||||||
return len(b.Spec.Unallocated)
|
|
||||||
}
|
|
||||||
|
|
||||||
// windwowsReservedHandle is the handle used to reserve addresses required for Windows
|
|
||||||
// networking so that workloads do not get assigned these addresses.
|
|
||||||
const WindowsReservedHandle = "windows-reserved-ipam-handle"
|
|
||||||
|
|
||||||
func (b *IPAMBlock) Empty() bool {
|
|
||||||
for _, attrIdx := range b.Spec.Allocations {
|
|
||||||
if attrIdx == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
attrs := b.Spec.Attributes[*attrIdx]
|
|
||||||
if attrs.AttrPrimary == nil || strings.ToLower(*attrs.AttrPrimary) != WindowsReservedHandle {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
49
vendor/kubesphere.io/api/network/calicov3/ippool_types.go
generated
vendored
49
vendor/kubesphere.io/api/network/calicov3/ippool_types.go
generated
vendored
@@ -1,49 +0,0 @@
|
|||||||
// Copyright (c) 2017-2020 Tigera, Inc. All rights reserved.
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
package calicov3
|
|
||||||
|
|
||||||
import (
|
|
||||||
cnet "github.com/projectcalico/libcalico-go/lib/net"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
v3 "github.com/projectcalico/libcalico-go/lib/apis/v3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
type IPPool struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec v3.IPPoolSpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// IPPoolList contains a list of IPPool resources.
|
|
||||||
type IPPoolList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []IPPool `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p IPPool) NumAddresses() int {
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(p.Spec.CIDR)
|
|
||||||
ones, size := cidr.Mask.Size()
|
|
||||||
numAddresses := 1 << uint(size-ones)
|
|
||||||
return numAddresses
|
|
||||||
}
|
|
||||||
42
vendor/kubesphere.io/api/network/calicov3/register.go
generated
vendored
42
vendor/kubesphere.io/api/network/calicov3/register.go
generated
vendored
@@ -1,42 +0,0 @@
|
|||||||
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
package calicov3
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "crd.projectcalico.org", Version: "v1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&BlockAffinity{}, &BlockAffinityList{})
|
|
||||||
SchemeBuilder.Register(&IPAMBlock{}, &IPAMBlockList{})
|
|
||||||
SchemeBuilder.Register(&IPPool{}, &IPPoolList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
199
vendor/kubesphere.io/api/network/calicov3/zz_generated.deepcopy.go
generated
vendored
199
vendor/kubesphere.io/api/network/calicov3/zz_generated.deepcopy.go
generated
vendored
@@ -1,199 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by controller-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package calicov3
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *BlockAffinity) DeepCopyInto(out *BlockAffinity) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinity.
|
|
||||||
func (in *BlockAffinity) DeepCopy() *BlockAffinity {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(BlockAffinity)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *BlockAffinity) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *BlockAffinityList) DeepCopyInto(out *BlockAffinityList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]BlockAffinity, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinityList.
|
|
||||||
func (in *BlockAffinityList) DeepCopy() *BlockAffinityList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(BlockAffinityList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *BlockAffinityList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlock.
|
|
||||||
func (in *IPAMBlock) DeepCopy() *IPAMBlock {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMBlock)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPAMBlock) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMBlockList) DeepCopyInto(out *IPAMBlockList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]IPAMBlock, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockList.
|
|
||||||
func (in *IPAMBlockList) DeepCopy() *IPAMBlockList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMBlockList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPAMBlockList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPPool) DeepCopyInto(out *IPPool) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPool.
|
|
||||||
func (in *IPPool) DeepCopy() *IPPool {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPPool)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPPool) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPPoolList) DeepCopyInto(out *IPPoolList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]IPPool, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolList.
|
|
||||||
func (in *IPPoolList) DeepCopy() *IPPoolList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPPoolList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPPoolList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
29
vendor/kubesphere.io/api/network/crdinstall/install.go
generated
vendored
29
vendor/kubesphere.io/api/network/crdinstall/install.go
generated
vendored
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package crdinstall
|
|
||||||
|
|
||||||
import (
|
|
||||||
k8sruntime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
|
|
||||||
|
|
||||||
networkv1alpha1 "kubesphere.io/api/network/v1alpha1"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Install(scheme *k8sruntime.Scheme) {
|
|
||||||
urlruntime.Must(networkv1alpha1.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(scheme.SetVersionPriority(networkv1alpha1.SchemeGroupVersion))
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/network/v1alpha1/doc.go
generated
vendored
23
vendor/kubesphere.io/api/network/v1alpha1/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the network v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/network
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=network.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
340
vendor/kubesphere.io/api/network/v1alpha1/ipamblock_types.go
generated
vendored
340
vendor/kubesphere.io/api/network/v1alpha1/ipamblock_types.go
generated
vendored
@@ -1,340 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"math/big"
|
|
||||||
"reflect"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/projectcalico/libcalico-go/lib/names"
|
|
||||||
cnet "github.com/projectcalico/libcalico-go/lib/net"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindIPAMBlock = "IPAMBlock"
|
|
||||||
ResourceSingularIPAMBlock = "ipamblock"
|
|
||||||
ResourcePluralIPAMBlock = "ipamblocks"
|
|
||||||
|
|
||||||
IPAMBlockAttributePod = "pod"
|
|
||||||
IPAMBlockAttributeVm = "vm"
|
|
||||||
IPAMBlockAttributeWorkloadType = "workload-type"
|
|
||||||
IPAMBlockAttributeNamespace = "namespace"
|
|
||||||
IPAMBlockAttributeWorkspace = "workspace"
|
|
||||||
IPAMBlockAttributeNode = "node"
|
|
||||||
IPAMBlockAttributePool = "pool-name"
|
|
||||||
IPAMBlockAttributeType = "pool-type"
|
|
||||||
|
|
||||||
ReservedHandle = "kubesphere-reserved-handle"
|
|
||||||
ReservedNote = "kubesphere reserved"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
type IPAMBlock struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
// Specification of the IPAMBlock.
|
|
||||||
Spec IPAMBlockSpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// IPAMBlockSpec contains the specification for an IPAMBlock resource.
|
|
||||||
type IPAMBlockSpec struct {
|
|
||||||
ID uint32 `json:"id"`
|
|
||||||
CIDR string `json:"cidr"`
|
|
||||||
Allocations []*int `json:"allocations"`
|
|
||||||
Unallocated []int `json:"unallocated"`
|
|
||||||
Attributes []AllocationAttribute `json:"attributes"`
|
|
||||||
Deleted bool `json:"deleted"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AllocationAttribute struct {
|
|
||||||
AttrPrimary string `json:"handle_id,omitempty"`
|
|
||||||
AttrSecondary map[string]string `json:"secondary,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
type IPAMBlockList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []IPAMBlock `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// The caller needs to check that the returned slice length is correct.
|
|
||||||
func (b *IPAMBlock) AutoAssign(
|
|
||||||
num int, handleID string, attrs map[string]string) []cnet.IPNet {
|
|
||||||
|
|
||||||
// Walk the allocations until we find enough addresses.
|
|
||||||
ordinals := []int{}
|
|
||||||
for len(b.Spec.Unallocated) > 0 && len(ordinals) < num {
|
|
||||||
ordinals = append(ordinals, b.Spec.Unallocated[0])
|
|
||||||
b.Spec.Unallocated = b.Spec.Unallocated[1:]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create slice of IPs and perform the allocations.
|
|
||||||
ips := []cnet.IPNet{}
|
|
||||||
ip, mask, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
for _, o := range ordinals {
|
|
||||||
attrIndex := b.findOrAddAttribute(handleID, attrs)
|
|
||||||
b.Spec.Allocations[o] = &attrIndex
|
|
||||||
ipNets := cnet.IPNet(*mask)
|
|
||||||
ipNets.IP = cnet.IncrementIP(*ip, big.NewInt(int64(o))).IP
|
|
||||||
ips = append(ips, ipNets)
|
|
||||||
}
|
|
||||||
|
|
||||||
return ips
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) String() string {
|
|
||||||
return fmt.Sprintf("%d-%s", b.Spec.ID, b.Spec.CIDR)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) ID() uint32 {
|
|
||||||
return b.Spec.ID
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) BlockName() string {
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
return fmt.Sprintf("%d-%s", b.ID(), names.CIDRToName(*cidr))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get number of addresses covered by the block
|
|
||||||
func (b *IPAMBlock) NumAddresses() int {
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
ones, size := cidr.Mask.Size()
|
|
||||||
numAddresses := 1 << uint(size-ones)
|
|
||||||
return numAddresses
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the ordinal (i.e. how far into the block) a given IP lies. Returns an error if the IP is outside the block.
|
|
||||||
func (b *IPAMBlock) IPToOrdinal(ip cnet.IP) (int, error) {
|
|
||||||
netIP, _, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
ipAsInt := cnet.IPToBigInt(ip)
|
|
||||||
baseInt := cnet.IPToBigInt(*netIP)
|
|
||||||
ord := big.NewInt(0).Sub(ipAsInt, baseInt).Int64()
|
|
||||||
if ord < 0 || ord >= int64(b.NumAddresses()) {
|
|
||||||
return 0, fmt.Errorf("IP %s not in block %d-%s", ip, b.Spec.ID, b.Spec.CIDR)
|
|
||||||
}
|
|
||||||
return int(ord), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) NumFreeAddresses() int {
|
|
||||||
return len(b.Spec.Unallocated)
|
|
||||||
}
|
|
||||||
|
|
||||||
// empty returns true if the block has released all of its assignable addresses,
|
|
||||||
// and returns false if any assignable addresses are in use.
|
|
||||||
func (b *IPAMBlock) Empty() bool {
|
|
||||||
return b.containsOnlyReservedIPs()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) MarkDeleted() {
|
|
||||||
b.Spec.Deleted = true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) IsDeleted() bool {
|
|
||||||
return b.Spec.Deleted
|
|
||||||
}
|
|
||||||
|
|
||||||
// containsOnlyReservedIPs returns true if the block is empty excepted for
|
|
||||||
// expected "reserved" IP addresses.
|
|
||||||
func (b *IPAMBlock) containsOnlyReservedIPs() bool {
|
|
||||||
for _, attrIdx := range b.Spec.Allocations {
|
|
||||||
if attrIdx == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
attrs := b.Spec.Attributes[*attrIdx]
|
|
||||||
if strings.ToLower(attrs.AttrPrimary) != ReservedHandle {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) NumReservedAddresses() int {
|
|
||||||
sum := 0
|
|
||||||
for _, attrIdx := range b.Spec.Allocations {
|
|
||||||
if attrIdx == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
attrs := b.Spec.Attributes[*attrIdx]
|
|
||||||
if strings.ToLower(attrs.AttrPrimary) == ReservedHandle {
|
|
||||||
sum += 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sum
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b IPAMBlock) attributeIndexesByHandle(handleID string) []int {
|
|
||||||
indexes := []int{}
|
|
||||||
for i, attr := range b.Spec.Attributes {
|
|
||||||
if attr.AttrPrimary == handleID {
|
|
||||||
indexes = append(indexes, i)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return indexes
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) deleteAttributes(delIndexes, ordinals []int) {
|
|
||||||
newIndexes := make([]*int, len(b.Spec.Attributes))
|
|
||||||
newAttrs := []AllocationAttribute{}
|
|
||||||
y := 0 // Next free slot in the new attributes list.
|
|
||||||
for x := range b.Spec.Attributes {
|
|
||||||
if !intInSlice(x, delIndexes) {
|
|
||||||
// Attribute at x is not being deleted. Build a mapping
|
|
||||||
// of old attribute index (x) to new attribute index (y).
|
|
||||||
newIndex := y
|
|
||||||
newIndexes[x] = &newIndex
|
|
||||||
y += 1
|
|
||||||
newAttrs = append(newAttrs, b.Spec.Attributes[x])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
b.Spec.Attributes = newAttrs
|
|
||||||
|
|
||||||
// Update attribute indexes for all allocations in this block.
|
|
||||||
for i := 0; i < b.NumAddresses(); i++ {
|
|
||||||
if b.Spec.Allocations[i] != nil {
|
|
||||||
// Get the new index that corresponds to the old index
|
|
||||||
// and update the allocation.
|
|
||||||
newIndex := newIndexes[*b.Spec.Allocations[i]]
|
|
||||||
b.Spec.Allocations[i] = newIndex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) ReleaseByHandle(handleID string) int {
|
|
||||||
attrIndexes := b.attributeIndexesByHandle(handleID)
|
|
||||||
if len(attrIndexes) == 0 {
|
|
||||||
// Nothing to release.
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// There are addresses to release.
|
|
||||||
ordinals := []int{}
|
|
||||||
var o int
|
|
||||||
for o = 0; o < b.NumAddresses(); o++ {
|
|
||||||
// Only check allocated ordinals.
|
|
||||||
if b.Spec.Allocations[o] != nil && intInSlice(*b.Spec.Allocations[o], attrIndexes) {
|
|
||||||
// Release this ordinal.
|
|
||||||
ordinals = append(ordinals, o)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean and reorder attributes.
|
|
||||||
b.deleteAttributes(attrIndexes, ordinals)
|
|
||||||
|
|
||||||
// Release the addresses.
|
|
||||||
for _, o := range ordinals {
|
|
||||||
b.Spec.Allocations[o] = nil
|
|
||||||
b.Spec.Unallocated = append(b.Spec.Unallocated, o)
|
|
||||||
}
|
|
||||||
return len(ordinals)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *IPAMBlock) findOrAddAttribute(handleID string, attrs map[string]string) int {
|
|
||||||
attr := AllocationAttribute{handleID, attrs}
|
|
||||||
for idx, existing := range b.Spec.Attributes {
|
|
||||||
if reflect.DeepEqual(attr, existing) {
|
|
||||||
return idx
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Does not exist - add it.
|
|
||||||
attrIndex := len(b.Spec.Attributes)
|
|
||||||
b.Spec.Attributes = append(b.Spec.Attributes, attr)
|
|
||||||
return attrIndex
|
|
||||||
}
|
|
||||||
|
|
||||||
func intInSlice(searchInt int, slice []int) bool {
|
|
||||||
for _, v := range slice {
|
|
||||||
if v == searchInt {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
//This just initializes the data structure and does not call the api to create
|
|
||||||
func NewBlock(pool *IPPool, cidr cnet.IPNet, rsvdAttr *ReservedAttr) *IPAMBlock {
|
|
||||||
b := IPAMBlock{}
|
|
||||||
|
|
||||||
b.Labels = map[string]string{
|
|
||||||
IPPoolNameLabel: pool.Name,
|
|
||||||
}
|
|
||||||
b.Spec.CIDR = cidr.String()
|
|
||||||
b.Spec.ID = pool.ID()
|
|
||||||
b.Name = b.BlockName()
|
|
||||||
|
|
||||||
numAddresses := b.NumAddresses()
|
|
||||||
b.Spec.Allocations = make([]*int, numAddresses)
|
|
||||||
b.Spec.Unallocated = make([]int, numAddresses)
|
|
||||||
|
|
||||||
// Initialize unallocated ordinals.
|
|
||||||
for i := 0; i < numAddresses; i++ {
|
|
||||||
b.Spec.Unallocated[i] = i
|
|
||||||
}
|
|
||||||
|
|
||||||
if rsvdAttr != nil {
|
|
||||||
// Reserve IPs based on host reserved attributes.
|
|
||||||
// For example, with windows OS, the following IP addresses of the block are
|
|
||||||
// reserved. This is done by pre-allocating them during initialization
|
|
||||||
// time only.
|
|
||||||
// IPs : x.0, x.1, x.2 and x.bcastAddr (e.g. x.255 for /24 subnet)
|
|
||||||
|
|
||||||
// nil attributes
|
|
||||||
attrs := make(map[string]string)
|
|
||||||
attrs["note"] = rsvdAttr.Note
|
|
||||||
handleID := rsvdAttr.Handle
|
|
||||||
b.Spec.Unallocated = b.Spec.Unallocated[rsvdAttr.StartOfBlock : numAddresses-rsvdAttr.EndOfBlock]
|
|
||||||
attrIndex := len(b.Spec.Attributes)
|
|
||||||
for i := 0; i < rsvdAttr.StartOfBlock; i++ {
|
|
||||||
b.Spec.Allocations[i] = &attrIndex
|
|
||||||
}
|
|
||||||
for i := 1; i <= rsvdAttr.EndOfBlock; i++ {
|
|
||||||
b.Spec.Allocations[numAddresses-i] = &attrIndex
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create slice of IPs and perform the allocations.
|
|
||||||
attr := AllocationAttribute{
|
|
||||||
AttrPrimary: handleID,
|
|
||||||
AttrSecondary: attrs,
|
|
||||||
}
|
|
||||||
b.Spec.Attributes = append(b.Spec.Attributes, attr)
|
|
||||||
}
|
|
||||||
|
|
||||||
return &b
|
|
||||||
}
|
|
||||||
|
|
||||||
type ReservedAttr struct {
|
|
||||||
// Number of addresses reserved from start of the block.
|
|
||||||
StartOfBlock int
|
|
||||||
|
|
||||||
// Number of addresses reserved from end of the block.
|
|
||||||
EndOfBlock int
|
|
||||||
|
|
||||||
// Handle for reserved addresses.
|
|
||||||
Handle string
|
|
||||||
|
|
||||||
// A description about the reserves.
|
|
||||||
Note string
|
|
||||||
}
|
|
||||||
110
vendor/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go
generated
vendored
110
vendor/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go
generated
vendored
@@ -1,110 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/projectcalico/libcalico-go/lib/names"
|
|
||||||
cnet "github.com/projectcalico/libcalico-go/lib/net"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindIPAMHandle = "IPAMHandle"
|
|
||||||
ResourceSingularIPAMHandle = "ipamhandle"
|
|
||||||
ResourcePluralIPAMHandle = "ipamhandles"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
type IPAMHandle struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
// Specification of the IPAMHandle.
|
|
||||||
Spec IPAMHandleSpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// IPAMHandleSpec contains the specification for an IPAMHandle resource.
|
|
||||||
type IPAMHandleSpec struct {
|
|
||||||
HandleID string `json:"handleID"`
|
|
||||||
Block map[string]int `json:"block"`
|
|
||||||
Deleted bool `json:"deleted"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
type IPAMHandleList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []IPAMHandle `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *IPAMHandle) IncrementBlock(block *IPAMBlock, num int) int {
|
|
||||||
newNum := num
|
|
||||||
if val, ok := h.Spec.Block[block.String()]; ok {
|
|
||||||
// An entry exists for this block, increment the number
|
|
||||||
// of allocations.
|
|
||||||
newNum = val + num
|
|
||||||
}
|
|
||||||
h.Spec.Block[block.String()] = newNum
|
|
||||||
return newNum
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *IPAMHandle) Empty() bool {
|
|
||||||
return len(h.Spec.Block) == 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *IPAMHandle) MarkDeleted() {
|
|
||||||
h.Spec.Deleted = true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *IPAMHandle) IsDeleted() bool {
|
|
||||||
return h.Spec.Deleted
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *IPAMHandle) DecrementBlock(block *IPAMBlock, num int) (*int, error) {
|
|
||||||
if current, ok := h.Spec.Block[block.String()]; !ok {
|
|
||||||
// This entry doesn't exist.
|
|
||||||
return nil, fmt.Errorf("Tried to decrement block %s by %v but it isn't linked to handle %s", block.BlockName(), num, h.Spec.HandleID)
|
|
||||||
} else {
|
|
||||||
newNum := current - num
|
|
||||||
if newNum < 0 {
|
|
||||||
return nil, fmt.Errorf("Tried to decrement block %s by %v but it only has %v addresses on handle %s", block.BlockName(), num, current, h.Spec.HandleID)
|
|
||||||
}
|
|
||||||
|
|
||||||
if newNum == 0 {
|
|
||||||
delete(h.Spec.Block, block.String())
|
|
||||||
} else {
|
|
||||||
h.Spec.Block[block.String()] = newNum
|
|
||||||
}
|
|
||||||
return &newNum, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func ConvertToBlockName(k string) string {
|
|
||||||
strs := strings.SplitN(k, "-", 2)
|
|
||||||
id, _ := strconv.Atoi(strs[0])
|
|
||||||
_, blockCIDR, _ := cnet.ParseCIDR(strs[1])
|
|
||||||
|
|
||||||
return fmt.Sprintf("%d-%s", id, names.CIDRToName(*blockCIDR))
|
|
||||||
}
|
|
||||||
230
vendor/kubesphere.io/api/network/v1alpha1/ippool_types.go
generated
vendored
230
vendor/kubesphere.io/api/network/v1alpha1/ippool_types.go
generated
vendored
@@ -1,230 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"math/big"
|
|
||||||
|
|
||||||
cnet "github.com/projectcalico/libcalico-go/lib/net"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindIPPool = "IPPool"
|
|
||||||
ResourceSingularIPPool = "ippool"
|
|
||||||
ResourcePluralIPPool = "ippools"
|
|
||||||
|
|
||||||
// scope type > id > name
|
|
||||||
// id used to detect cidr overlap
|
|
||||||
IPPoolTypeLabel = "ippool.network.kubesphere.io/type"
|
|
||||||
IPPoolNameLabel = "ippool.network.kubesphere.io/name"
|
|
||||||
IPPoolIDLabel = "ippool.network.kubesphere.io/id"
|
|
||||||
IPPoolDefaultLabel = "ippool.network.kubesphere.io/default"
|
|
||||||
|
|
||||||
IPPoolTypeNone = "none"
|
|
||||||
IPPoolTypeLocal = "local"
|
|
||||||
IPPoolTypeCalico = "calico"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +kubebuilder:resource:scope=Cluster
|
|
||||||
type IPPool struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// +optional
|
|
||||||
Spec IPPoolSpec `json:"spec,omitempty"`
|
|
||||||
// +optional
|
|
||||||
Status IPPoolStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type VLANConfig struct {
|
|
||||||
VlanId uint32 `json:"vlanId"`
|
|
||||||
Master string `json:"master"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Route struct {
|
|
||||||
Dst string `json:"dst,omitempty"`
|
|
||||||
GW string `json:"gateway,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DNS contains values interesting for DNS resolvers
|
|
||||||
type DNS struct {
|
|
||||||
Nameservers []string `json:"nameservers,omitempty"`
|
|
||||||
Domain string `json:"domain,omitempty"`
|
|
||||||
Search []string `json:"search,omitempty"`
|
|
||||||
Options []string `json:"options,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WorkspaceStatus struct {
|
|
||||||
Allocations int `json:"allocations"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type IPPoolStatus struct {
|
|
||||||
Unallocated int `json:"unallocated"`
|
|
||||||
Allocations int `json:"allocations"`
|
|
||||||
Capacity int `json:"capacity"`
|
|
||||||
Reserved int `json:"reserved,omitempty"`
|
|
||||||
Synced bool `json:"synced,omitempty"`
|
|
||||||
Workspaces map[string]WorkspaceStatus `json:"workspaces,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type IPPoolSpec struct {
|
|
||||||
Type string `json:"type"`
|
|
||||||
|
|
||||||
// The pool CIDR.
|
|
||||||
CIDR string `json:"cidr"`
|
|
||||||
|
|
||||||
// The first ip, inclusive
|
|
||||||
RangeStart string `json:"rangeStart,omitempty"`
|
|
||||||
|
|
||||||
// The last ip, inclusive
|
|
||||||
RangeEnd string `json:"rangeEnd,omitempty"`
|
|
||||||
|
|
||||||
// When disabled is true, IPAM will not assign addresses from this pool.
|
|
||||||
Disabled bool `json:"disabled,omitempty"`
|
|
||||||
|
|
||||||
// The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 112 for IPv6.
|
|
||||||
BlockSize int `json:"blockSize,omitempty"`
|
|
||||||
|
|
||||||
VLAN VLANConfig `json:"vlanConfig,omitempty"`
|
|
||||||
|
|
||||||
Gateway string `json:"gateway,omitempty"`
|
|
||||||
Routes []Route `json:"routes,omitempty"`
|
|
||||||
DNS DNS `json:"dns,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
type IPPoolList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []IPPool `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
VLAN = "vlan"
|
|
||||||
Calico = "calico"
|
|
||||||
Porter = "porter"
|
|
||||||
Pod = "pod"
|
|
||||||
VLANIDStart = 1
|
|
||||||
VLANIDEnd = 4097
|
|
||||||
PorterID = 4098
|
|
||||||
CalicoID = 4099
|
|
||||||
PodID = 0
|
|
||||||
)
|
|
||||||
|
|
||||||
// Find the ordinal (i.e. how far into the block) a given IP lies. Returns an error if the IP is outside the block.
|
|
||||||
func (b IPPool) IPToOrdinal(ip cnet.IP) (int, error) {
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
ipAsInt := cnet.IPToBigInt(ip)
|
|
||||||
baseInt := cnet.IPToBigInt(cnet.IP{IP: cidr.IP})
|
|
||||||
ord := big.NewInt(0).Sub(ipAsInt, baseInt).Int64()
|
|
||||||
if ord < 0 || ord >= int64(b.NumAddresses()) {
|
|
||||||
return 0, fmt.Errorf("IP %s not in pool %s", ip, b.Spec.CIDR)
|
|
||||||
}
|
|
||||||
return int(ord), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get number of addresses covered by the block
|
|
||||||
func (b IPPool) NumAddresses() int {
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
ones, size := cidr.Mask.Size()
|
|
||||||
numAddresses := 1 << uint(size-ones)
|
|
||||||
return numAddresses
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b IPPool) Type() string {
|
|
||||||
if b.Spec.Type == VLAN {
|
|
||||||
return IPPoolTypeLocal
|
|
||||||
}
|
|
||||||
|
|
||||||
return b.Spec.Type
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b IPPool) NumReservedAddresses() int {
|
|
||||||
return b.StartReservedAddressed() + b.EndReservedAddressed()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b IPPool) StartReservedAddressed() int {
|
|
||||||
if b.Spec.RangeStart == "" {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
start, _ := b.IPToOrdinal(*cnet.ParseIP(b.Spec.RangeStart))
|
|
||||||
return start
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b IPPool) EndReservedAddressed() int {
|
|
||||||
if b.Spec.RangeEnd == "" {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
total := b.NumAddresses()
|
|
||||||
end, _ := b.IPToOrdinal(*cnet.ParseIP(b.Spec.RangeEnd))
|
|
||||||
return total - end - 1
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b IPPool) Overlapped(dst IPPool) bool {
|
|
||||||
if b.ID() != dst.ID() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
_, cidr, _ := cnet.ParseCIDR(b.Spec.CIDR)
|
|
||||||
_, cidrDst, _ := cnet.ParseCIDR(dst.Spec.CIDR)
|
|
||||||
|
|
||||||
return cidr.IsNetOverlap(cidrDst.IPNet)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (pool IPPool) ID() uint32 {
|
|
||||||
switch pool.Spec.Type {
|
|
||||||
case VLAN:
|
|
||||||
return pool.Spec.VLAN.VlanId + VLANIDStart
|
|
||||||
case Porter:
|
|
||||||
return PorterID
|
|
||||||
case Calico:
|
|
||||||
return CalicoID
|
|
||||||
}
|
|
||||||
|
|
||||||
return PodID
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p IPPool) TypeInvalid() bool {
|
|
||||||
typeStr := p.Spec.Type
|
|
||||||
if typeStr == VLAN || typeStr == Porter || typeStr == Pod {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p IPPool) Disabled() bool {
|
|
||||||
return p.Spec.Disabled
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p IPPool) V4() bool {
|
|
||||||
ip, _, _ := cnet.ParseCIDR(p.Spec.CIDR)
|
|
||||||
if ip.To4() != nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
const IPPoolFinalizer = "finalizers.network.kubesphere.io/ippool"
|
|
||||||
154
vendor/kubesphere.io/api/network/v1alpha1/namespacenetworkpolicy_types.go
generated
vendored
154
vendor/kubesphere.io/api/network/v1alpha1/namespacenetworkpolicy_types.go
generated
vendored
@@ -1,154 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
k8snet "k8s.io/api/networking/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindNamespaceNetworkPolicy = "NamespaceNetworkPolicy"
|
|
||||||
ResourceSingularNamespaceNetworkPolicy = "namespacenetworkpolicy"
|
|
||||||
ResourcePluralNamespaceNetworkPolicy = "namespacenetworkpolicies"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NamespaceNetworkPolicySpec provides the specification of a NamespaceNetworkPolicy
|
|
||||||
type NamespaceNetworkPolicySpec struct {
|
|
||||||
// List of ingress rules to be applied to the selected pods. Traffic is allowed to
|
|
||||||
// a pod if there are no NetworkPolicies selecting the pod
|
|
||||||
// (and cluster policy otherwise allows the traffic), OR if the traffic source is
|
|
||||||
// the pod's local node, OR if the traffic matches at least one ingress rule
|
|
||||||
// across all of the NetworkPolicy objects whose podSelector matches the pod. If
|
|
||||||
// this field is empty then this NetworkPolicy does not allow any traffic (and serves
|
|
||||||
// solely to ensure that the pods it selects are isolated by default)
|
|
||||||
// +optional
|
|
||||||
Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"`
|
|
||||||
|
|
||||||
// List of egress rules to be applied to the selected pods. Outgoing traffic is
|
|
||||||
// allowed if there are no NetworkPolicies selecting the pod (and cluster policy
|
|
||||||
// otherwise allows the traffic), OR if the traffic matches at least one egress rule
|
|
||||||
// across all of the NetworkPolicy objects whose podSelector matches the pod. If
|
|
||||||
// this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
|
|
||||||
// solely to ensure that the pods it selects are isolated by default).
|
|
||||||
// This field is beta-level in 1.8
|
|
||||||
// +optional
|
|
||||||
Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,2,rep,name=egress"`
|
|
||||||
|
|
||||||
// List of rule types that the NetworkPolicy relates to.
|
|
||||||
// Valid options are "Ingress", "Egress", or "Ingress,Egress".
|
|
||||||
// If this field is not specified, it will default based on the existence of Ingress or Egress rules;
|
|
||||||
// policies that contain an Egress section are assumed to affect Egress, and all policies
|
|
||||||
// (whether or not they contain an Ingress section) are assumed to affect Ingress.
|
|
||||||
// If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
|
|
||||||
// Likewise, if you want to write a policy that specifies that no egress is allowed,
|
|
||||||
// you must specify a policyTypes value that include "Egress" (since such a policy would not include
|
|
||||||
// an Egress section and would otherwise default to just [ "Ingress" ]).
|
|
||||||
// This field is beta-level in 1.8
|
|
||||||
// +optional
|
|
||||||
PolicyTypes []k8snet.PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,3,rep,name=policyTypes,casttype=PolicyType"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
|
|
||||||
// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
|
|
||||||
type NetworkPolicyIngressRule struct {
|
|
||||||
// List of ports which should be made accessible on the pods selected for this
|
|
||||||
// rule. Each item in this list is combined using a logical OR. If this field is
|
|
||||||
// empty or missing, this rule matches all ports (traffic not restricted by port).
|
|
||||||
// If this field is present and contains at least one item, then this rule allows
|
|
||||||
// traffic only if the traffic matches at least one port in the list.
|
|
||||||
// +optional
|
|
||||||
Ports []k8snet.NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
|
|
||||||
|
|
||||||
// List of sources which should be able to access the pods selected for this rule.
|
|
||||||
// Items in this list are combined using a logical OR operation. If this field is
|
|
||||||
// empty or missing, this rule matches all sources (traffic not restricted by
|
|
||||||
// source). If this field is present and contains at least one item, this rule
|
|
||||||
// allows traffic only if the traffic matches at least one item in the from list.
|
|
||||||
// +optional
|
|
||||||
From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
|
|
||||||
// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
|
|
||||||
// This type is beta-level in 1.8
|
|
||||||
type NetworkPolicyEgressRule struct {
|
|
||||||
// List of destination ports for outgoing traffic.
|
|
||||||
// Each item in this list is combined using a logical OR. If this field is
|
|
||||||
// empty or missing, this rule matches all ports (traffic not restricted by port).
|
|
||||||
// If this field is present and contains at least one item, then this rule allows
|
|
||||||
// traffic only if the traffic matches at least one port in the list.
|
|
||||||
// +optional
|
|
||||||
Ports []k8snet.NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
|
|
||||||
|
|
||||||
// List of destinations for outgoing traffic of pods selected for this rule.
|
|
||||||
// Items in this list are combined using a logical OR operation. If this field is
|
|
||||||
// empty or missing, this rule matches all destinations (traffic not restricted by
|
|
||||||
// destination). If this field is present and contains at least one item, this rule
|
|
||||||
// allows traffic only if the traffic matches at least one item in the to list.
|
|
||||||
// +optional
|
|
||||||
To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type NamespaceSelector struct {
|
|
||||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ServiceSelector struct {
|
|
||||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
|
||||||
Namespace string `json:"namespace" protobuf:"bytes,2,name=namespace"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of
|
|
||||||
// fields are allowed
|
|
||||||
type NetworkPolicyPeer struct {
|
|
||||||
// +optional
|
|
||||||
NamespaceSelector *NamespaceSelector `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
|
|
||||||
|
|
||||||
// IPBlock defines policy on a particular IPBlock. If this field is set then
|
|
||||||
// neither of the other fields can be.
|
|
||||||
// +optional
|
|
||||||
IPBlock *k8snet.IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,2,rep,name=ipBlock"`
|
|
||||||
|
|
||||||
ServiceSelector *ServiceSelector `json:"service,omitempty" protobuf:"bytes,3,opt,name=service"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// NamespaceNetworkPolicy is the Schema for the namespacenetworkpolicies API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:categories="networking",shortName="nsnp"
|
|
||||||
type NamespaceNetworkPolicy struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec NamespaceNetworkPolicySpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// NamespaceNetworkPolicyList contains a list of NamespaceNetworkPolicy
|
|
||||||
type NamespaceNetworkPolicyList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []NamespaceNetworkPolicy `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
NSNPPrefix = "nsnp-"
|
|
||||||
)
|
|
||||||
4408
vendor/kubesphere.io/api/network/v1alpha1/openapi_generated.go
generated
vendored
4408
vendor/kubesphere.io/api/network/v1alpha1/openapi_generated.go
generated
vendored
File diff suppressed because it is too large
Load Diff
53
vendor/kubesphere.io/api/network/v1alpha1/register.go
generated
vendored
53
vendor/kubesphere.io/api/network/v1alpha1/register.go
generated
vendored
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the network v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/network
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=network.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "network.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&IPAMHandle{}, &IPAMHandleList{})
|
|
||||||
SchemeBuilder.Register(&IPAMBlock{}, &IPAMBlockList{})
|
|
||||||
SchemeBuilder.Register(&IPPool{}, &IPPoolList{})
|
|
||||||
SchemeBuilder.Register(&NamespaceNetworkPolicy{}, &NamespaceNetworkPolicyList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
651
vendor/kubesphere.io/api/network/v1alpha1/zz_generated.deepcopy.go
generated
vendored
651
vendor/kubesphere.io/api/network/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,651 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/networking/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *AllocationAttribute) DeepCopyInto(out *AllocationAttribute) {
|
|
||||||
*out = *in
|
|
||||||
if in.AttrSecondary != nil {
|
|
||||||
in, out := &in.AttrSecondary, &out.AttrSecondary
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationAttribute.
|
|
||||||
func (in *AllocationAttribute) DeepCopy() *AllocationAttribute {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(AllocationAttribute)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DNS) DeepCopyInto(out *DNS) {
|
|
||||||
*out = *in
|
|
||||||
if in.Nameservers != nil {
|
|
||||||
in, out := &in.Nameservers, &out.Nameservers
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Search != nil {
|
|
||||||
in, out := &in.Search, &out.Search
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Options != nil {
|
|
||||||
in, out := &in.Options, &out.Options
|
|
||||||
*out = make([]string, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNS.
|
|
||||||
func (in *DNS) DeepCopy() *DNS {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DNS)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlock.
|
|
||||||
func (in *IPAMBlock) DeepCopy() *IPAMBlock {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMBlock)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPAMBlock) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMBlockList) DeepCopyInto(out *IPAMBlockList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]IPAMBlock, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockList.
|
|
||||||
func (in *IPAMBlockList) DeepCopy() *IPAMBlockList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMBlockList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPAMBlockList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMBlockSpec) DeepCopyInto(out *IPAMBlockSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Allocations != nil {
|
|
||||||
in, out := &in.Allocations, &out.Allocations
|
|
||||||
*out = make([]*int, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
if (*in)[i] != nil {
|
|
||||||
in, out := &(*in)[i], &(*out)[i]
|
|
||||||
*out = new(int)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Unallocated != nil {
|
|
||||||
in, out := &in.Unallocated, &out.Unallocated
|
|
||||||
*out = make([]int, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
if in.Attributes != nil {
|
|
||||||
in, out := &in.Attributes, &out.Attributes
|
|
||||||
*out = make([]AllocationAttribute, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockSpec.
|
|
||||||
func (in *IPAMBlockSpec) DeepCopy() *IPAMBlockSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMBlockSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMHandle) DeepCopyInto(out *IPAMHandle) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandle.
|
|
||||||
func (in *IPAMHandle) DeepCopy() *IPAMHandle {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMHandle)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPAMHandle) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMHandleList) DeepCopyInto(out *IPAMHandleList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]IPAMHandle, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleList.
|
|
||||||
func (in *IPAMHandleList) DeepCopy() *IPAMHandleList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMHandleList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPAMHandleList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPAMHandleSpec) DeepCopyInto(out *IPAMHandleSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Block != nil {
|
|
||||||
in, out := &in.Block, &out.Block
|
|
||||||
*out = make(map[string]int, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleSpec.
|
|
||||||
func (in *IPAMHandleSpec) DeepCopy() *IPAMHandleSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPAMHandleSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPPool) DeepCopyInto(out *IPPool) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPool.
|
|
||||||
func (in *IPPool) DeepCopy() *IPPool {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPPool)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPPool) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPPoolList) DeepCopyInto(out *IPPoolList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]IPPool, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolList.
|
|
||||||
func (in *IPPoolList) DeepCopy() *IPPoolList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPPoolList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *IPPoolList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) {
|
|
||||||
*out = *in
|
|
||||||
out.VLAN = in.VLAN
|
|
||||||
if in.Routes != nil {
|
|
||||||
in, out := &in.Routes, &out.Routes
|
|
||||||
*out = make([]Route, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
in.DNS.DeepCopyInto(&out.DNS)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec.
|
|
||||||
func (in *IPPoolSpec) DeepCopy() *IPPoolSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPPoolSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *IPPoolStatus) DeepCopyInto(out *IPPoolStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.Workspaces != nil {
|
|
||||||
in, out := &in.Workspaces, &out.Workspaces
|
|
||||||
*out = make(map[string]WorkspaceStatus, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolStatus.
|
|
||||||
func (in *IPPoolStatus) DeepCopy() *IPPoolStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(IPPoolStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NamespaceNetworkPolicy) DeepCopyInto(out *NamespaceNetworkPolicy) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceNetworkPolicy.
|
|
||||||
func (in *NamespaceNetworkPolicy) DeepCopy() *NamespaceNetworkPolicy {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NamespaceNetworkPolicy)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *NamespaceNetworkPolicy) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NamespaceNetworkPolicyList) DeepCopyInto(out *NamespaceNetworkPolicyList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]NamespaceNetworkPolicy, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceNetworkPolicyList.
|
|
||||||
func (in *NamespaceNetworkPolicyList) DeepCopy() *NamespaceNetworkPolicyList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NamespaceNetworkPolicyList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *NamespaceNetworkPolicyList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NamespaceNetworkPolicySpec) DeepCopyInto(out *NamespaceNetworkPolicySpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Ingress != nil {
|
|
||||||
in, out := &in.Ingress, &out.Ingress
|
|
||||||
*out = make([]NetworkPolicyIngressRule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.Egress != nil {
|
|
||||||
in, out := &in.Egress, &out.Egress
|
|
||||||
*out = make([]NetworkPolicyEgressRule, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.PolicyTypes != nil {
|
|
||||||
in, out := &in.PolicyTypes, &out.PolicyTypes
|
|
||||||
*out = make([]v1.PolicyType, len(*in))
|
|
||||||
copy(*out, *in)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceNetworkPolicySpec.
|
|
||||||
func (in *NamespaceNetworkPolicySpec) DeepCopy() *NamespaceNetworkPolicySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NamespaceNetworkPolicySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
|
|
||||||
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NamespaceSelector)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NetworkPolicyEgressRule) DeepCopyInto(out *NetworkPolicyEgressRule) {
|
|
||||||
*out = *in
|
|
||||||
if in.Ports != nil {
|
|
||||||
in, out := &in.Ports, &out.Ports
|
|
||||||
*out = make([]v1.NetworkPolicyPort, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.To != nil {
|
|
||||||
in, out := &in.To, &out.To
|
|
||||||
*out = make([]NetworkPolicyPeer, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyEgressRule.
|
|
||||||
func (in *NetworkPolicyEgressRule) DeepCopy() *NetworkPolicyEgressRule {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NetworkPolicyEgressRule)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NetworkPolicyIngressRule) DeepCopyInto(out *NetworkPolicyIngressRule) {
|
|
||||||
*out = *in
|
|
||||||
if in.Ports != nil {
|
|
||||||
in, out := &in.Ports, &out.Ports
|
|
||||||
*out = make([]v1.NetworkPolicyPort, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.From != nil {
|
|
||||||
in, out := &in.From, &out.From
|
|
||||||
*out = make([]NetworkPolicyPeer, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyIngressRule.
|
|
||||||
func (in *NetworkPolicyIngressRule) DeepCopy() *NetworkPolicyIngressRule {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NetworkPolicyIngressRule)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) {
|
|
||||||
*out = *in
|
|
||||||
if in.NamespaceSelector != nil {
|
|
||||||
in, out := &in.NamespaceSelector, &out.NamespaceSelector
|
|
||||||
*out = new(NamespaceSelector)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
if in.IPBlock != nil {
|
|
||||||
in, out := &in.IPBlock, &out.IPBlock
|
|
||||||
*out = new(v1.IPBlock)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
if in.ServiceSelector != nil {
|
|
||||||
in, out := &in.ServiceSelector, &out.ServiceSelector
|
|
||||||
*out = new(ServiceSelector)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPeer.
|
|
||||||
func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(NetworkPolicyPeer)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ReservedAttr) DeepCopyInto(out *ReservedAttr) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservedAttr.
|
|
||||||
func (in *ReservedAttr) DeepCopy() *ReservedAttr {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ReservedAttr)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Route) DeepCopyInto(out *Route) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
|
|
||||||
func (in *Route) DeepCopy() *Route {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Route)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServiceSelector) DeepCopyInto(out *ServiceSelector) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSelector.
|
|
||||||
func (in *ServiceSelector) DeepCopy() *ServiceSelector {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServiceSelector)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *VLANConfig) DeepCopyInto(out *VLANConfig) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANConfig.
|
|
||||||
func (in *VLANConfig) DeepCopy() *VLANConfig {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(VLANConfig)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.
|
|
||||||
func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
161
vendor/kubesphere.io/api/notification/v2beta1/config_types.go
generated
vendored
161
vendor/kubesphere.io/api/notification/v2beta1/config_types.go
generated
vendored
@@ -1,161 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v2beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Configuration of conversation
|
|
||||||
type DingTalkApplicationConfig struct {
|
|
||||||
// The key of the application with which to send messages.
|
|
||||||
AppKey *SecretKeySelector `json:"appkey,omitempty"`
|
|
||||||
// The key in the secret to be used. Must be a valid secret key.
|
|
||||||
AppSecret *SecretKeySelector `json:"appsecret,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DingTalkConfig struct {
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
// Only needed when send alerts to the conversation.
|
|
||||||
Conversation *DingTalkApplicationConfig `json:"conversation,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ClientCertificate struct {
|
|
||||||
// The client cert file for the targets.
|
|
||||||
Cert *SecretKeySelector `json:"cert,omitempty"`
|
|
||||||
// The client key file for the targets.
|
|
||||||
Key *SecretKeySelector `json:"key,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TLSConfig configures the options for TLS connections.
|
|
||||||
type TLSConfig struct {
|
|
||||||
// RootCA defines the root certificate authorities
|
|
||||||
// that clients use when verifying server certificates.
|
|
||||||
RootCA *SecretKeySelector `json:"rootCA,omitempty"`
|
|
||||||
// The certificate of the client.
|
|
||||||
*ClientCertificate `json:"clientCertificate,omitempty"`
|
|
||||||
// Used to verify the hostname for the targets.
|
|
||||||
ServerName string `json:"serverName,omitempty"`
|
|
||||||
// Disable target certificate validation.
|
|
||||||
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BasicAuth contains basic HTTP authentication credentials.
|
|
||||||
type BasicAuth struct {
|
|
||||||
Username string `json:"username"`
|
|
||||||
Password *SecretKeySelector `json:"password,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTTPClientConfig configures an HTTP client.
|
|
||||||
type HTTPClientConfig struct {
|
|
||||||
// The HTTP basic authentication credentials for the targets.
|
|
||||||
BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
|
|
||||||
// The bearer token for the targets.
|
|
||||||
BearerToken *SecretKeySelector `json:"bearerToken,omitempty"`
|
|
||||||
// HTTP proxy server to use to connect to the targets.
|
|
||||||
ProxyURL string `json:"proxyUrl,omitempty"`
|
|
||||||
// TLSConfig to use to connect to the targets.
|
|
||||||
TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type HostPort struct {
|
|
||||||
Host string `json:"host"`
|
|
||||||
Port int `json:"port"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type EmailConfig struct {
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
// The sender address.
|
|
||||||
From string `json:"from"`
|
|
||||||
// The address of the SMTP server.
|
|
||||||
SmartHost HostPort `json:"smartHost"`
|
|
||||||
// The hostname to use when identifying to the SMTP server.
|
|
||||||
Hello *string `json:"hello,omitempty"`
|
|
||||||
// The username for CRAM-MD5, LOGIN and PLAIN authentications.
|
|
||||||
AuthUsername *string `json:"authUsername,omitempty"`
|
|
||||||
// The identity for PLAIN authentication.
|
|
||||||
AuthIdentify *string `json:"authIdentify,omitempty"`
|
|
||||||
// The secret contains the SMTP password for LOGIN and PLAIN authentications.
|
|
||||||
AuthPassword *SecretKeySelector `json:"authPassword,omitempty"`
|
|
||||||
// The secret contains the SMTP secret for CRAM-MD5 authentication.
|
|
||||||
AuthSecret *SecretKeySelector `json:"authSecret,omitempty"`
|
|
||||||
// The default SMTP TLS requirement.
|
|
||||||
RequireTLS *bool `json:"requireTLS,omitempty"`
|
|
||||||
TLS *TLSConfig `json:"tls,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SlackConfig struct {
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
// The token of user or bot.
|
|
||||||
SlackTokenSecret *SecretKeySelector `json:"slackTokenSecret,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WebhookConfig struct {
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WechatConfig struct {
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
// The WeChat API URL.
|
|
||||||
WechatApiUrl string `json:"wechatApiUrl,omitempty"`
|
|
||||||
// The corp id for authentication.
|
|
||||||
WechatApiCorpId string `json:"wechatApiCorpId"`
|
|
||||||
// The id of the application which sending message.
|
|
||||||
WechatApiAgentId string `json:"wechatApiAgentId"`
|
|
||||||
// The API key to use when talking to the WeChat API.
|
|
||||||
WechatApiSecret *SecretKeySelector `json:"wechatApiSecret"`
|
|
||||||
}
|
|
||||||
|
|
||||||
//ConfigSpec defines the desired state of Config
|
|
||||||
type ConfigSpec struct {
|
|
||||||
DingTalk *DingTalkConfig `json:"dingtalk,omitempty"`
|
|
||||||
Email *EmailConfig `json:"email,omitempty"`
|
|
||||||
Slack *SlackConfig `json:"slack,omitempty"`
|
|
||||||
Webhook *WebhookConfig `json:"webhook,omitempty"`
|
|
||||||
Wechat *WechatConfig `json:"wechat,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ConfigStatus defines the observed state of Config
|
|
||||||
type ConfigStatus struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=nc,categories=notification-manager
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// DingTalkConfig is the Schema for the dingtalkconfigs API
|
|
||||||
type Config struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec ConfigSpec `json:"spec,omitempty"`
|
|
||||||
Status ConfigStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
|
|
||||||
// ConfigList contains a list of Config
|
|
||||||
type ConfigList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Config `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Config{}, &ConfigList{})
|
|
||||||
}
|
|
||||||
21
vendor/kubesphere.io/api/notification/v2beta1/doc.go
generated
vendored
21
vendor/kubesphere.io/api/notification/v2beta1/doc.go
generated
vendored
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v2beta1 contains API Schema definitions for the notification v2beta1 API group
|
|
||||||
// +groupName=notification.kubesphere.io
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
package v2beta1
|
|
||||||
214
vendor/kubesphere.io/api/notification/v2beta1/notificationmanager_types.go
generated
vendored
214
vendor/kubesphere.io/api/notification/v2beta1/notificationmanager_types.go
generated
vendored
@@ -1,214 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v2beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SecretKeySelector selects a key of a Secret.
|
|
||||||
type SecretKeySelector struct {
|
|
||||||
// The namespace of the secret, default to the pod's namespace.
|
|
||||||
// +optional
|
|
||||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
|
|
||||||
// Name of the secret.
|
|
||||||
// +optional
|
|
||||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
|
||||||
// The key of the secret to select from. Must be a valid secret key.
|
|
||||||
Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NotificationManagerSpec defines the desired state of NotificationManager
|
|
||||||
type NotificationManagerSpec struct {
|
|
||||||
// Compute Resources required by container.
|
|
||||||
Resources v1.ResourceRequirements `json:"resources,omitempty"`
|
|
||||||
// Docker Image used to start Notification Manager container,
|
|
||||||
// for example kubesphere/notification-manager:v0.1.0
|
|
||||||
Image *string `json:"image,omitempty"`
|
|
||||||
// Image pull policy. One of Always, Never, IfNotPresent.
|
|
||||||
// Defaults to IfNotPresent if not specified
|
|
||||||
ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"`
|
|
||||||
// Number of instances to deploy for Notification Manager deployment.
|
|
||||||
Replicas *int32 `json:"replicas,omitempty"`
|
|
||||||
// Define which Nodes the Pods will be scheduled to.
|
|
||||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
|
||||||
// Pod's scheduling constraints.
|
|
||||||
Affinity *v1.Affinity `json:"affinity,omitempty"`
|
|
||||||
// Pod's tolerations.
|
|
||||||
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
|
|
||||||
// ServiceAccountName is the name of the ServiceAccount to use to run Notification Manager Pods.
|
|
||||||
// ServiceAccount 'default' in notification manager's namespace will be used if not specified.
|
|
||||||
ServiceAccountName string `json:"serviceAccountName,omitempty"`
|
|
||||||
// Port name used for the pods and service, defaults to webhook
|
|
||||||
PortName string `json:"portName,omitempty"`
|
|
||||||
// Default Email/Wechat/Slack/Webhook Config to be selected
|
|
||||||
DefaultConfigSelector *metav1.LabelSelector `json:"defaultConfigSelector,omitempty"`
|
|
||||||
// Receivers to send notifications to
|
|
||||||
Receivers *ReceiversSpec `json:"receivers"`
|
|
||||||
// The default namespace to which notification manager secrets belong.
|
|
||||||
DefaultSecretNamespace string `json:"defaultSecretNamespace,omitempty"`
|
|
||||||
// List of volumes that can be mounted by containers belonging to the pod.
|
|
||||||
Volumes []v1.Volume `json:"volumes,omitempty"`
|
|
||||||
// Pod volumes to mount into the container's filesystem.
|
|
||||||
// Cannot be updated.
|
|
||||||
VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
|
|
||||||
// Arguments to the entrypoint.
|
|
||||||
// The docker image's CMD is used if this is not provided.
|
|
||||||
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
|
|
||||||
// cannot be resolved, the reference in the input string will remain unchanged. The $(VAR_NAME) syntax
|
|
||||||
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
|
|
||||||
// regardless of whether the variable exists or not.
|
|
||||||
// Cannot be updated.
|
|
||||||
// +optional
|
|
||||||
Args []string `json:"args,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ReceiversSpec struct {
|
|
||||||
// Key used to identify tenant, default to be "namespace" if not specified
|
|
||||||
TenantKey string `json:"tenantKey"`
|
|
||||||
// Selector to find global notification receivers
|
|
||||||
// which will be used when tenant receivers cannot be found.
|
|
||||||
// Only matchLabels expression is allowed.
|
|
||||||
GlobalReceiverSelector *metav1.LabelSelector `json:"globalReceiverSelector"`
|
|
||||||
// Selector to find tenant notification receivers.
|
|
||||||
// Only matchLabels expression is allowed.
|
|
||||||
TenantReceiverSelector *metav1.LabelSelector `json:"tenantReceiverSelector"`
|
|
||||||
// Various receiver options
|
|
||||||
Options *Options `json:"options,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GlobalOptions struct {
|
|
||||||
// Template file path, must be a absolute path.
|
|
||||||
TemplateFiles []string `json:"templateFile,omitempty"`
|
|
||||||
// The name of the template to generate message.
|
|
||||||
// If the receiver dose not setup template, it will use this.
|
|
||||||
Template string `json:"template,omitempty"`
|
|
||||||
// The name of the cluster in which the notification manager is deployed.
|
|
||||||
Cluster string `json:"cluster,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type EmailOptions struct {
|
|
||||||
// Notification Sending Timeout
|
|
||||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
|
||||||
// Type of sending email, bulk or single
|
|
||||||
DeliveryType string `json:"deliveryType,omitempty"`
|
|
||||||
// The maximum size of receivers in one email.
|
|
||||||
MaxEmailReceivers int `json:"maxEmailReceivers,omitempty"`
|
|
||||||
// The name of the template to generate email message.
|
|
||||||
// If the global template is not set, it will use default.
|
|
||||||
Template string `json:"template,omitempty"`
|
|
||||||
// The name of the template to generate email subject
|
|
||||||
SubjectTemplate string `json:"subjectTemplate,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WechatOptions struct {
|
|
||||||
// Notification Sending Timeout
|
|
||||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
|
||||||
// The name of the template to generate wechat message.
|
|
||||||
Template string `json:"template,omitempty"`
|
|
||||||
// The maximum message size that can be sent in a request.
|
|
||||||
MessageMaxSize int `json:"messageMaxSize,omitempty"`
|
|
||||||
// The time of token expired.
|
|
||||||
TokenExpires time.Duration `json:"tokenExpires,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SlackOptions struct {
|
|
||||||
// Notification Sending Timeout
|
|
||||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
|
||||||
// The name of the template to generate slack message.
|
|
||||||
// If the global template is not set, it will use default.
|
|
||||||
Template string `json:"template,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WebhookOptions struct {
|
|
||||||
// Notification Sending Timeout
|
|
||||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
|
||||||
// The name of the template to generate webhook message.
|
|
||||||
// If the global template is not set, it will use default.
|
|
||||||
Template string `json:"template,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// The config of flow control.
|
|
||||||
type Throttle struct {
|
|
||||||
// The maximum calls in `Unit`.
|
|
||||||
Threshold int `json:"threshold,omitempty"`
|
|
||||||
Unit time.Duration `json:"unit,omitempty"`
|
|
||||||
// The maximum tolerable waiting time when the calls trigger flow control, if the actual waiting time is more than this time, it will
|
|
||||||
// return a error, else it will wait for the flow restriction lifted, and send the message.
|
|
||||||
// Nil means do not wait, the maximum value is `Unit`.
|
|
||||||
MaxWaitTime time.Duration `json:"maxWaitTime,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DingTalkOptions struct {
|
|
||||||
// Notification Sending Timeout
|
|
||||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
|
||||||
// The name of the template to generate DingTalk message.
|
|
||||||
// If the global template is not set, it will use default.
|
|
||||||
Template string `json:"template,omitempty"`
|
|
||||||
// The time of token expired.
|
|
||||||
TokenExpires time.Duration `json:"tokenExpires,omitempty"`
|
|
||||||
// The maximum message size that can be sent to conversation in a request.
|
|
||||||
ConversationMessageMaxSize int `json:"conversationMessageMaxSize,omitempty"`
|
|
||||||
// The maximum message size that can be sent to chatbot in a request.
|
|
||||||
ChatbotMessageMaxSize int `json:"chatbotMessageMaxSize,omitempty"`
|
|
||||||
// The flow control fo chatbot.
|
|
||||||
ChatBotThrottle *Throttle `json:"chatBotThrottle,omitempty"`
|
|
||||||
// The flow control fo conversation.
|
|
||||||
ConversationThrottle *Throttle `json:"conversationThrottle,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Options struct {
|
|
||||||
Global *GlobalOptions `json:"global,omitempty"`
|
|
||||||
Email *EmailOptions `json:"email,omitempty"`
|
|
||||||
Wechat *WechatOptions `json:"wechat,omitempty"`
|
|
||||||
Slack *SlackOptions `json:"slack,omitempty"`
|
|
||||||
Webhook *WebhookOptions `json:"webhook,omitempty"`
|
|
||||||
DingTalk *DingTalkOptions `json:"dingtalk,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NotificationManagerStatus defines the observed state of NotificationManager
|
|
||||||
type NotificationManagerStatus struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=nm,categories=notification-manager
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
|
|
||||||
// NotificationManager is the Schema for the notificationmanagers API
|
|
||||||
type NotificationManager struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec NotificationManagerSpec `json:"spec,omitempty"`
|
|
||||||
Status NotificationManagerStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
|
|
||||||
// NotificationManagerList contains a list of NotificationManager
|
|
||||||
type NotificationManagerList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []NotificationManager `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&NotificationManager{}, &NotificationManagerList{})
|
|
||||||
}
|
|
||||||
197
vendor/kubesphere.io/api/notification/v2beta1/receiver_types.go
generated
vendored
197
vendor/kubesphere.io/api/notification/v2beta1/receiver_types.go
generated
vendored
@@ -1,197 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v2beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Configuration of ChatBot
|
|
||||||
type DingTalkChatBot struct {
|
|
||||||
// The webhook of ChatBot which the message will send to.
|
|
||||||
Webhook *SecretKeySelector `json:"webhook"`
|
|
||||||
|
|
||||||
// Custom keywords of ChatBot
|
|
||||||
Keywords []string `json:"keywords,omitempty"`
|
|
||||||
|
|
||||||
// Secret of ChatBot, you can get it after enabled Additional Signature of ChatBot.
|
|
||||||
Secret *SecretKeySelector `json:"secret,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configuration of conversation
|
|
||||||
type DingTalkConversation struct {
|
|
||||||
ChatIDs []string `json:"chatids"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DingTalkReceiver struct {
|
|
||||||
// whether the receiver is enabled
|
|
||||||
Enabled *bool `json:"enabled,omitempty"`
|
|
||||||
// DingTalkConfig to be selected for this receiver
|
|
||||||
DingTalkConfigSelector *metav1.LabelSelector `json:"dingtalkConfigSelector,omitempty"`
|
|
||||||
// Selector to filter alerts.
|
|
||||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
|
||||||
// Be careful, a ChatBot only can send 20 message per minute.
|
|
||||||
ChatBot *DingTalkChatBot `json:"chatbot,omitempty"`
|
|
||||||
// The conversation which message will send to.
|
|
||||||
Conversation *DingTalkConversation `json:"conversation,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type EmailReceiver struct {
|
|
||||||
// whether the receiver is enabled
|
|
||||||
Enabled *bool `json:"enabled,omitempty"`
|
|
||||||
// Receivers' email addresses
|
|
||||||
To []string `json:"to"`
|
|
||||||
// EmailConfig to be selected for this receiver
|
|
||||||
EmailConfigSelector *metav1.LabelSelector `json:"emailConfigSelector,omitempty"`
|
|
||||||
// Selector to filter alerts.
|
|
||||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SlackReceiver struct {
|
|
||||||
// whether the receiver is enabled
|
|
||||||
Enabled *bool `json:"enabled,omitempty"`
|
|
||||||
// SlackConfig to be selected for this receiver
|
|
||||||
SlackConfigSelector *metav1.LabelSelector `json:"slackConfigSelector,omitempty"`
|
|
||||||
// Selector to filter alerts.
|
|
||||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
|
||||||
// The channel or user to send notifications to.
|
|
||||||
Channels []string `json:"channels"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
|
||||||
type ServiceReference struct {
|
|
||||||
// `namespace` is the namespace of the service.
|
|
||||||
// Required
|
|
||||||
Namespace string `json:"namespace"`
|
|
||||||
|
|
||||||
// `name` is the name of the service.
|
|
||||||
// Required
|
|
||||||
Name string `json:"name"`
|
|
||||||
|
|
||||||
// `path` is an optional URL path which will be sent in any request to
|
|
||||||
// this service.
|
|
||||||
// +optional
|
|
||||||
Path *string `json:"path,omitempty"`
|
|
||||||
|
|
||||||
// If specified, the port on the service that hosting webhook.
|
|
||||||
// Default to 443 for backward compatibility.
|
|
||||||
// `port` should be a valid port number (1-65535, inclusive).
|
|
||||||
// +optional
|
|
||||||
Port *int32 `json:"port,omitempty"`
|
|
||||||
|
|
||||||
// Http scheme, default is http.
|
|
||||||
// +optional
|
|
||||||
Scheme *string `json:"scheme,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WebhookReceiver struct {
|
|
||||||
// whether the receiver is enabled
|
|
||||||
Enabled *bool `json:"enabled,omitempty"`
|
|
||||||
// WebhookConfig to be selected for this receiver
|
|
||||||
WebhookConfigSelector *metav1.LabelSelector `json:"webhookConfigSelector,omitempty"`
|
|
||||||
// Selector to filter alerts.
|
|
||||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
|
||||||
// `url` gives the location of the webhook, in standard URL form
|
|
||||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
|
||||||
// must be specified.
|
|
||||||
//
|
|
||||||
// The `host` should not refer to a service running in the cluster; use
|
|
||||||
// the `service` field instead. The host might be resolved via external
|
|
||||||
// DNS in some api servers (e.g., `kube-apiserver` cannot resolve
|
|
||||||
// in-cluster DNS as that would be a layering violation). `host` may
|
|
||||||
// also be an IP address.
|
|
||||||
//
|
|
||||||
// Please note that using `localhost` or `127.0.0.1` as a `host` is
|
|
||||||
// risky unless you take great care to run this webhook on all hosts
|
|
||||||
// which run an apiserver which might need to make calls to this
|
|
||||||
// webhook. Such installs are likely to be non-portable, i.e., not easy
|
|
||||||
// to turn up in a new cluster.
|
|
||||||
//
|
|
||||||
// A path is optional, and if present may be any string permissible in
|
|
||||||
// a URL. You may use the path to pass an arbitrary string to the
|
|
||||||
// webhook, for example, a cluster identifier.
|
|
||||||
//
|
|
||||||
// Attempting to use a user or basic auth e.g. "user:password@" is not
|
|
||||||
// allowed. Fragments ("#...") and query parameters ("?...") are not
|
|
||||||
// allowed, either.
|
|
||||||
//
|
|
||||||
// +optional
|
|
||||||
URL *string `json:"url,omitempty"`
|
|
||||||
|
|
||||||
// `service` is a reference to the service for this webhook. Either
|
|
||||||
// `service` or `url` must be specified.
|
|
||||||
//
|
|
||||||
// If the webhook is running within the cluster, then you should use `service`.
|
|
||||||
//
|
|
||||||
// +optional
|
|
||||||
Service *ServiceReference `json:"service,omitempty"`
|
|
||||||
|
|
||||||
HTTPConfig *HTTPClientConfig `json:"httpConfig,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type WechatReceiver struct {
|
|
||||||
// whether the receiver is enabled
|
|
||||||
Enabled *bool `json:"enabled,omitempty"`
|
|
||||||
// WechatConfig to be selected for this receiver
|
|
||||||
WechatConfigSelector *metav1.LabelSelector `json:"wechatConfigSelector,omitempty"`
|
|
||||||
// Selector to filter alerts.
|
|
||||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
|
||||||
// +optional
|
|
||||||
ToUser []string `json:"toUser,omitempty"`
|
|
||||||
ToParty []string `json:"toParty,omitempty"`
|
|
||||||
ToTag []string `json:"toTag,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
//ReceiverSpec defines the desired state of Receiver
|
|
||||||
type ReceiverSpec struct {
|
|
||||||
DingTalk *DingTalkReceiver `json:"dingtalk,omitempty"`
|
|
||||||
Email *EmailReceiver `json:"email,omitempty"`
|
|
||||||
Slack *SlackReceiver `json:"slack,omitempty"`
|
|
||||||
Webhook *WebhookReceiver `json:"webhook,omitempty"`
|
|
||||||
Wechat *WechatReceiver `json:"wechat,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReceiverStatus defines the observed state of Receiver
|
|
||||||
type ReceiverStatus struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:scope=Cluster,shortName=nr,categories=notification-manager
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// Receiver is the Schema for the receivers API
|
|
||||||
type Receiver struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec ReceiverSpec `json:"spec,omitempty"`
|
|
||||||
Status ReceiverStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
|
|
||||||
// ReceiverList contains a list of Receiver
|
|
||||||
type ReceiverList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Receiver `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Receiver{}, &ReceiverList{})
|
|
||||||
}
|
|
||||||
41
vendor/kubesphere.io/api/notification/v2beta1/register.go
generated
vendored
41
vendor/kubesphere.io/api/notification/v2beta1/register.go
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v2beta1 contains API Schema definitions for the notification v2beta1 API group
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +groupName=notification.kubesphere.io
|
|
||||||
package v2beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2beta1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
27
vendor/kubesphere.io/api/notification/v2beta1/types.go
generated
vendored
27
vendor/kubesphere.io/api/notification/v2beta1/types.go
generated
vendored
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v2beta1
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindConfig = "Configs"
|
|
||||||
ResourcesSingularConfig = "config"
|
|
||||||
ResourcesPluralConfig = "configs"
|
|
||||||
|
|
||||||
ResourceKindReceiver = "Receiver"
|
|
||||||
ResourcesSingularReceiver = "receiver"
|
|
||||||
ResourcesPluralReceiver = "receivers"
|
|
||||||
)
|
|
||||||
1224
vendor/kubesphere.io/api/notification/v2beta1/zz_generated.deepcopy.go
generated
vendored
1224
vendor/kubesphere.io/api/notification/v2beta1/zz_generated.deepcopy.go
generated
vendored
File diff suppressed because it is too large
Load Diff
23
vendor/kubesphere.io/api/quota/v1alpha2/doc.go
generated
vendored
23
vendor/kubesphere.io/api/quota/v1alpha2/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the quotas v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/quota
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=quota.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
46
vendor/kubesphere.io/api/quota/v1alpha2/register.go
generated
vendored
46
vendor/kubesphere.io/api/quota/v1alpha2/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the quotas v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/quota
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=quota.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "quota.kubesphere.io", Version: "v1alpha2"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
98
vendor/kubesphere.io/api/quota/v1alpha2/types.go
generated
vendored
98
vendor/kubesphere.io/api/quota/v1alpha2/types.go
generated
vendored
@@ -1,98 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindCluster = "ResourceQuota"
|
|
||||||
ResourcesSingularCluster = "resourcequota"
|
|
||||||
ResourcesPluralCluster = "resourcequotas"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&ResourceQuota{}, &ResourceQuotaList{})
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +kubebuilder:resource:categories="quota",scope="Cluster",path=resourcequotas
|
|
||||||
// +kubebuilder:subresource:status
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// WorkspaceResourceQuota sets aggregate quota restrictions enforced per workspace
|
|
||||||
type ResourceQuota struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
|
||||||
|
|
||||||
// Spec defines the desired quota
|
|
||||||
Spec ResourceQuotaSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
|
||||||
|
|
||||||
// Status defines the actual enforced quota and its current usage
|
|
||||||
// +optional
|
|
||||||
Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceQuotaSpec defines the desired quota restrictions
|
|
||||||
type ResourceQuotaSpec struct {
|
|
||||||
// LabelSelector is used to select projects by label.
|
|
||||||
LabelSelector map[string]string `json:"selector" protobuf:"bytes,1,opt,name=selector"`
|
|
||||||
|
|
||||||
// Quota defines the desired quota
|
|
||||||
Quota corev1.ResourceQuotaSpec `json:"quota" protobuf:"bytes,2,opt,name=quota"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceQuotaStatus defines the actual enforced quota and its current usage
|
|
||||||
type ResourceQuotaStatus struct {
|
|
||||||
// Total defines the actual enforced quota and its current usage across all projects
|
|
||||||
Total corev1.ResourceQuotaStatus `json:"total" protobuf:"bytes,1,opt,name=total"`
|
|
||||||
|
|
||||||
// Namespaces slices the usage by project.
|
|
||||||
Namespaces ResourceQuotasStatusByNamespace `json:"namespaces" protobuf:"bytes,2,rep,name=namespaces"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceQuotasStatusByNamespace bundles multiple ResourceQuotaStatusByNamespace
|
|
||||||
type ResourceQuotasStatusByNamespace []ResourceQuotaStatusByNamespace
|
|
||||||
|
|
||||||
// ResourceQuotaStatusByNamespace gives status for a particular project
|
|
||||||
type ResourceQuotaStatusByNamespace struct {
|
|
||||||
corev1.ResourceQuotaStatus `json:",inline"`
|
|
||||||
|
|
||||||
// Namespace the project this status applies to
|
|
||||||
Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// ResourceQuotaList is a list of WorkspaceResourceQuota items.
|
|
||||||
type ResourceQuotaList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
// Standard list metadata.
|
|
||||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
||||||
// +optional
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
|
||||||
|
|
||||||
// Items is a list of WorkspaceResourceQuota objects.
|
|
||||||
// More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
|
|
||||||
Items []ResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"`
|
|
||||||
}
|
|
||||||
173
vendor/kubesphere.io/api/quota/v1alpha2/zz_generated.deepcopy.go
generated
vendored
173
vendor/kubesphere.io/api/quota/v1alpha2/zz_generated.deepcopy.go
generated
vendored
@@ -1,173 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuota.
|
|
||||||
func (in *ResourceQuota) DeepCopy() *ResourceQuota {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceQuota)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ResourceQuota) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]ResourceQuota, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaList.
|
|
||||||
func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceQuotaList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ResourceQuotaList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ResourceQuotaSpec) DeepCopyInto(out *ResourceQuotaSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.LabelSelector != nil {
|
|
||||||
in, out := &in.LabelSelector, &out.LabelSelector
|
|
||||||
*out = make(map[string]string, len(*in))
|
|
||||||
for key, val := range *in {
|
|
||||||
(*out)[key] = val
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.Quota.DeepCopyInto(&out.Quota)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaSpec.
|
|
||||||
func (in *ResourceQuotaSpec) DeepCopy() *ResourceQuotaSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceQuotaSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ResourceQuotaStatus) DeepCopyInto(out *ResourceQuotaStatus) {
|
|
||||||
*out = *in
|
|
||||||
in.Total.DeepCopyInto(&out.Total)
|
|
||||||
if in.Namespaces != nil {
|
|
||||||
in, out := &in.Namespaces, &out.Namespaces
|
|
||||||
*out = make(ResourceQuotasStatusByNamespace, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatus.
|
|
||||||
func (in *ResourceQuotaStatus) DeepCopy() *ResourceQuotaStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceQuotaStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ResourceQuotaStatusByNamespace) DeepCopyInto(out *ResourceQuotaStatusByNamespace) {
|
|
||||||
*out = *in
|
|
||||||
in.ResourceQuotaStatus.DeepCopyInto(&out.ResourceQuotaStatus)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatusByNamespace.
|
|
||||||
func (in *ResourceQuotaStatusByNamespace) DeepCopy() *ResourceQuotaStatusByNamespace {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceQuotaStatusByNamespace)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in ResourceQuotasStatusByNamespace) DeepCopyInto(out *ResourceQuotasStatusByNamespace) {
|
|
||||||
{
|
|
||||||
in := &in
|
|
||||||
*out = make(ResourceQuotasStatusByNamespace, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotasStatusByNamespace.
|
|
||||||
func (in ResourceQuotasStatusByNamespace) DeepCopy() ResourceQuotasStatusByNamespace {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceQuotasStatusByNamespace)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return *out
|
|
||||||
}
|
|
||||||
29
vendor/kubesphere.io/api/servicemesh/crdinstall/install.go
generated
vendored
29
vendor/kubesphere.io/api/servicemesh/crdinstall/install.go
generated
vendored
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package crdinstall
|
|
||||||
|
|
||||||
import (
|
|
||||||
k8sruntime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
|
|
||||||
|
|
||||||
servicemeshv1alpha2 "kubesphere.io/api/servicemesh/v1alpha2"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Install(scheme *k8sruntime.Scheme) {
|
|
||||||
urlruntime.Must(servicemeshv1alpha2.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(scheme.SetVersionPriority(servicemeshv1alpha2.SchemeGroupVersion))
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/servicemesh/v1alpha2/doc.go
generated
vendored
23
vendor/kubesphere.io/api/servicemesh/v1alpha2/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the servicemesh v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/servicemesh
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=servicemesh.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
2865
vendor/kubesphere.io/api/servicemesh/v1alpha2/openapi_generated.go
generated
vendored
2865
vendor/kubesphere.io/api/servicemesh/v1alpha2/openapi_generated.go
generated
vendored
File diff suppressed because it is too large
Load Diff
46
vendor/kubesphere.io/api/servicemesh/v1alpha2/register.go
generated
vendored
46
vendor/kubesphere.io/api/servicemesh/v1alpha2/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the servicemesh v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/servicemesh
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=servicemesh.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "servicemesh.kubesphere.io", Version: "v1alpha2"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
133
vendor/kubesphere.io/api/servicemesh/v1alpha2/servicepolicy_types.go
generated
vendored
133
vendor/kubesphere.io/api/servicemesh/v1alpha2/servicepolicy_types.go
generated
vendored
@@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"istio.io/api/networking/v1alpha3"
|
|
||||||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindServicePolicy = "ServicePolicy"
|
|
||||||
ResourceSingularServicePolicy = "servicepolicy"
|
|
||||||
ResourcePluralServicePolicy = "servicepolicies"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
// ServicePolicySpec defines the desired state of ServicePolicy
|
|
||||||
type ServicePolicySpec struct {
|
|
||||||
|
|
||||||
// Label selector for destination rules.
|
|
||||||
// +optional
|
|
||||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
|
||||||
|
|
||||||
// Template used to create a destination rule
|
|
||||||
// +optional
|
|
||||||
Template DestinationRuleSpecTemplate `json:"template,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type DestinationRuleSpecTemplate struct {
|
|
||||||
|
|
||||||
// Metadata of the virtual services created from this template
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// Spec indicates the behavior of a destination rule.
|
|
||||||
// +optional
|
|
||||||
Spec v1alpha3.DestinationRule `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ServicePolicyConditionType string
|
|
||||||
|
|
||||||
// These are valid conditions of a strategy.
|
|
||||||
const (
|
|
||||||
// StrategyComplete means the strategy has been delivered to istio.
|
|
||||||
ServicePolicyComplete ServicePolicyConditionType = "Complete"
|
|
||||||
|
|
||||||
// StrategyFailed means the strategy has failed its delivery to istio.
|
|
||||||
ServicePolicyFailed ServicePolicyConditionType = "Failed"
|
|
||||||
)
|
|
||||||
|
|
||||||
// StrategyCondition describes current state of a strategy.
|
|
||||||
type ServicePolicyCondition struct {
|
|
||||||
// Type of strategy condition, Complete or Failed.
|
|
||||||
Type ServicePolicyConditionType `json:"type,omitempty"`
|
|
||||||
|
|
||||||
// Status of the condition, one of True, False, Unknown
|
|
||||||
Status apiextensions.ConditionStatus `json:"status,omitempty"`
|
|
||||||
|
|
||||||
// Last time the condition was checked.
|
|
||||||
// +optional
|
|
||||||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
|
|
||||||
|
|
||||||
// Last time the condition transit from one status to another
|
|
||||||
// +optional
|
|
||||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
|
||||||
|
|
||||||
// reason for the condition's last transition
|
|
||||||
Reason string `json:"reason,omitempty"`
|
|
||||||
|
|
||||||
// Human readable message indicating details about last transition.
|
|
||||||
// +optinal
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ServicePolicyStatus defines the observed state of ServicePolicy
|
|
||||||
type ServicePolicyStatus struct {
|
|
||||||
// The latest available observations of an object's current state.
|
|
||||||
// +optional
|
|
||||||
Conditions []ServicePolicyCondition `json:"conditions,omitempty"`
|
|
||||||
|
|
||||||
// Represents time when the strategy was acknowledged by the controller.
|
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
|
||||||
// +optional
|
|
||||||
StartTime *metav1.Time `json:"startTime,omitempty"`
|
|
||||||
|
|
||||||
// Represents time when the strategy was completed.
|
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
|
||||||
// +optional
|
|
||||||
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// ServicePolicy is the Schema for the servicepolicies API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type ServicePolicy struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec ServicePolicySpec `json:"spec,omitempty"`
|
|
||||||
Status ServicePolicyStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// ServicePolicyList contains a list of ServicePolicy
|
|
||||||
type ServicePolicyList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []ServicePolicy `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&ServicePolicy{}, &ServicePolicyList{})
|
|
||||||
}
|
|
||||||
181
vendor/kubesphere.io/api/servicemesh/v1alpha2/strategy_types.go
generated
vendored
181
vendor/kubesphere.io/api/servicemesh/v1alpha2/strategy_types.go
generated
vendored
@@ -1,181 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"istio.io/api/networking/v1alpha3"
|
|
||||||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindStrategy = "Strategy"
|
|
||||||
ResourceSingularStrategy = "strategy"
|
|
||||||
ResourcePluralStrategy = "strategies"
|
|
||||||
)
|
|
||||||
|
|
||||||
type strategyType string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Canary strategy type
|
|
||||||
CanaryType strategyType = "Canary"
|
|
||||||
|
|
||||||
// BlueGreen strategy type
|
|
||||||
BlueGreenType strategyType = "BlueGreen"
|
|
||||||
|
|
||||||
// Mirror strategy type
|
|
||||||
Mirror strategyType = "Mirror"
|
|
||||||
)
|
|
||||||
|
|
||||||
type StrategyPolicy string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// apply strategy only until workload is ready
|
|
||||||
PolicyWaitForWorkloadReady StrategyPolicy = "WaitForWorkloadReady"
|
|
||||||
|
|
||||||
// apply strategy immediately no matter workload status is
|
|
||||||
PolicyImmediately StrategyPolicy = "Immediately"
|
|
||||||
|
|
||||||
// pause strategy
|
|
||||||
PolicyPause StrategyPolicy = "Paused"
|
|
||||||
)
|
|
||||||
|
|
||||||
// StrategySpec defines the desired state of Strategy
|
|
||||||
type StrategySpec struct {
|
|
||||||
// Strategy type
|
|
||||||
Type strategyType `json:"type,omitempty"`
|
|
||||||
|
|
||||||
// Principal version, the one as reference version
|
|
||||||
// label version value
|
|
||||||
// +optional
|
|
||||||
PrincipalVersion string `json:"principal,omitempty"`
|
|
||||||
|
|
||||||
// Governor version, the version takes control of all incoming traffic
|
|
||||||
// label version value
|
|
||||||
// +optional
|
|
||||||
GovernorVersion string `json:"governor,omitempty"`
|
|
||||||
|
|
||||||
// Label selector for virtual services.
|
|
||||||
// +optional
|
|
||||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
|
||||||
|
|
||||||
// Template describes the virtual service that will be created.
|
|
||||||
Template VirtualServiceTemplateSpec `json:"template,omitempty"`
|
|
||||||
|
|
||||||
// strategy policy, how the strategy will be applied
|
|
||||||
// by the strategy controller
|
|
||||||
StrategyPolicy StrategyPolicy `json:"strategyPolicy,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// VirtualServiceTemplateSpec
|
|
||||||
type VirtualServiceTemplateSpec struct {
|
|
||||||
|
|
||||||
// Metadata of the virtual services created from this template
|
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
// Spec indicates the behavior of a virtual service.
|
|
||||||
// +optional
|
|
||||||
Spec v1alpha3.VirtualService `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StrategyStatus defines the observed state of Strategy
|
|
||||||
type StrategyStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
|
|
||||||
// The latest available observations of an object's current state.
|
|
||||||
// +optional
|
|
||||||
Conditions []StrategyCondition `json:"conditions,omitempty"`
|
|
||||||
|
|
||||||
// Represents time when the strategy was acknowledged by the controller.
|
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
|
||||||
// +optional
|
|
||||||
StartTime *metav1.Time `json:"startTime,omitempty"`
|
|
||||||
|
|
||||||
// Represents time when the strategy was completed.
|
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
|
||||||
// +optional
|
|
||||||
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type StrategyConditionType string
|
|
||||||
|
|
||||||
// These are valid conditions of a strategy.
|
|
||||||
const (
|
|
||||||
// StrategyComplete means the strategy has been delivered to istio.
|
|
||||||
StrategyComplete StrategyConditionType = "Complete"
|
|
||||||
|
|
||||||
// StrategyFailed means the strategy has failed its delivery to istio.
|
|
||||||
StrategyFailed StrategyConditionType = "Failed"
|
|
||||||
)
|
|
||||||
|
|
||||||
// StrategyCondition describes current state of a strategy.
|
|
||||||
type StrategyCondition struct {
|
|
||||||
// Type of strategy condition, Complete or Failed.
|
|
||||||
Type StrategyConditionType `json:"type,omitempty"`
|
|
||||||
|
|
||||||
// Status of the condition, one of True, False, Unknown
|
|
||||||
Status apiextensions.ConditionStatus `json:"status,omitempty"`
|
|
||||||
|
|
||||||
// Last time the condition was checked.
|
|
||||||
// +optional
|
|
||||||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
|
|
||||||
|
|
||||||
// Last time the condition transit from one status to another
|
|
||||||
// +optional
|
|
||||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
|
||||||
|
|
||||||
// reason for the condition's last transition
|
|
||||||
Reason string `json:"reason,omitempty"`
|
|
||||||
|
|
||||||
// Human readable message indicating details about last transition.
|
|
||||||
// +optinal
|
|
||||||
Message string `json:"message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// Strategy is the Schema for the strategies API
|
|
||||||
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="type of strategy"
|
|
||||||
// +kubebuilder:printcolumn:name="Hosts",type="string",JSONPath=".spec.template.spec.hosts",description="destination hosts"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type Strategy struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec StrategySpec `json:"spec,omitempty"`
|
|
||||||
Status StrategyStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// StrategyList contains a list of Strategy
|
|
||||||
type StrategyList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Strategy `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Strategy{}, &StrategyList{})
|
|
||||||
}
|
|
||||||
326
vendor/kubesphere.io/api/servicemesh/v1alpha2/zz_generated.deepcopy.go
generated
vendored
326
vendor/kubesphere.io/api/servicemesh/v1alpha2/zz_generated.deepcopy.go
generated
vendored
@@ -1,326 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *DestinationRuleSpecTemplate) DeepCopyInto(out *DestinationRuleSpecTemplate) {
|
|
||||||
*out = *in
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleSpecTemplate.
|
|
||||||
func (in *DestinationRuleSpecTemplate) DeepCopy() *DestinationRuleSpecTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(DestinationRuleSpecTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServicePolicy) DeepCopyInto(out *ServicePolicy) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePolicy.
|
|
||||||
func (in *ServicePolicy) DeepCopy() *ServicePolicy {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServicePolicy)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ServicePolicy) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServicePolicyCondition) DeepCopyInto(out *ServicePolicyCondition) {
|
|
||||||
*out = *in
|
|
||||||
in.LastProbeTime.DeepCopyInto(&out.LastProbeTime)
|
|
||||||
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePolicyCondition.
|
|
||||||
func (in *ServicePolicyCondition) DeepCopy() *ServicePolicyCondition {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServicePolicyCondition)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServicePolicyList) DeepCopyInto(out *ServicePolicyList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]ServicePolicy, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePolicyList.
|
|
||||||
func (in *ServicePolicyList) DeepCopy() *ServicePolicyList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServicePolicyList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ServicePolicyList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServicePolicySpec) DeepCopyInto(out *ServicePolicySpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Selector != nil {
|
|
||||||
in, out := &in.Selector, &out.Selector
|
|
||||||
*out = new(v1.LabelSelector)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
in.Template.DeepCopyInto(&out.Template)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePolicySpec.
|
|
||||||
func (in *ServicePolicySpec) DeepCopy() *ServicePolicySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServicePolicySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ServicePolicyStatus) DeepCopyInto(out *ServicePolicyStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.Conditions != nil {
|
|
||||||
in, out := &in.Conditions, &out.Conditions
|
|
||||||
*out = make([]ServicePolicyCondition, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.StartTime != nil {
|
|
||||||
in, out := &in.StartTime, &out.StartTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.CompletionTime != nil {
|
|
||||||
in, out := &in.CompletionTime, &out.CompletionTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePolicyStatus.
|
|
||||||
func (in *ServicePolicyStatus) DeepCopy() *ServicePolicyStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ServicePolicyStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Strategy) DeepCopyInto(out *Strategy) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Strategy.
|
|
||||||
func (in *Strategy) DeepCopy() *Strategy {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Strategy)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Strategy) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StrategyCondition) DeepCopyInto(out *StrategyCondition) {
|
|
||||||
*out = *in
|
|
||||||
in.LastProbeTime.DeepCopyInto(&out.LastProbeTime)
|
|
||||||
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategyCondition.
|
|
||||||
func (in *StrategyCondition) DeepCopy() *StrategyCondition {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StrategyCondition)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StrategyList) DeepCopyInto(out *StrategyList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Strategy, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategyList.
|
|
||||||
func (in *StrategyList) DeepCopy() *StrategyList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StrategyList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *StrategyList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StrategySpec) DeepCopyInto(out *StrategySpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.Selector != nil {
|
|
||||||
in, out := &in.Selector, &out.Selector
|
|
||||||
*out = new(v1.LabelSelector)
|
|
||||||
(*in).DeepCopyInto(*out)
|
|
||||||
}
|
|
||||||
in.Template.DeepCopyInto(&out.Template)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategySpec.
|
|
||||||
func (in *StrategySpec) DeepCopy() *StrategySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StrategySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StrategyStatus) DeepCopyInto(out *StrategyStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.Conditions != nil {
|
|
||||||
in, out := &in.Conditions, &out.Conditions
|
|
||||||
*out = make([]StrategyCondition, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.StartTime != nil {
|
|
||||||
in, out := &in.StartTime, &out.StartTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
if in.CompletionTime != nil {
|
|
||||||
in, out := &in.CompletionTime, &out.CompletionTime
|
|
||||||
*out = (*in).DeepCopy()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StrategyStatus.
|
|
||||||
func (in *StrategyStatus) DeepCopy() *StrategyStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StrategyStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *VirtualServiceTemplateSpec) DeepCopyInto(out *VirtualServiceTemplateSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceTemplateSpec.
|
|
||||||
func (in *VirtualServiceTemplateSpec) DeepCopy() *VirtualServiceTemplateSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(VirtualServiceTemplateSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
134
vendor/kubesphere.io/api/storage/v1alpha1/capability_types.go
generated
vendored
134
vendor/kubesphere.io/api/storage/v1alpha1/capability_types.go
generated
vendored
@@ -1,134 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ExpandMode string
|
|
||||||
|
|
||||||
const (
|
|
||||||
ExpandModeUnknown ExpandMode = "UNKNOWN"
|
|
||||||
ExpandModeOffline ExpandMode = "OFFLINE"
|
|
||||||
ExpandModeOnline ExpandMode = "ONLINE"
|
|
||||||
)
|
|
||||||
|
|
||||||
// VolumeFeature describe volume features
|
|
||||||
type VolumeFeature struct {
|
|
||||||
Create bool `json:"create"`
|
|
||||||
Attach bool `json:"attach"`
|
|
||||||
List bool `json:"list"`
|
|
||||||
Clone bool `json:"clone"`
|
|
||||||
Stats bool `json:"stats"`
|
|
||||||
Expand ExpandMode `json:"expandMode"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SnapshotFeature describe snapshot features
|
|
||||||
type SnapshotFeature struct {
|
|
||||||
Create bool `json:"create"`
|
|
||||||
List bool `json:"list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CapabilityFeatures describe storage features
|
|
||||||
type CapabilityFeatures struct {
|
|
||||||
Topology bool `json:"topology"`
|
|
||||||
Volume VolumeFeature `json:"volume"`
|
|
||||||
Snapshot SnapshotFeature `json:"snapshot"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PluginInfo describes plugin info
|
|
||||||
type PluginInfo struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Version string `json:"version"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:noStatus
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:printcolumn:name="Provisioner",type="string",JSONPath=".spec.provisioner"
|
|
||||||
// +kubebuilder:printcolumn:name="Volume",type="boolean",JSONPath=".spec.features.volume.create"
|
|
||||||
// +kubebuilder:printcolumn:name="Expand",type="string",JSONPath=".spec.features.volume.expandMode"
|
|
||||||
// +kubebuilder:printcolumn:name="Clone",type="boolean",JSONPath=".spec.features.volume.clone"
|
|
||||||
// +kubebuilder:printcolumn:name="Snapshot",type="boolean",JSONPath=".spec.features.snapshot.create"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +kubebuilder:resource:scope="Cluster"
|
|
||||||
|
|
||||||
// StorageClassCapability is the Schema for the storage class capability API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type StorageClassCapability struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec StorageClassCapabilitySpec `json:"spec"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StorageClassCapabilitySpec defines the desired state of StorageClassCapability
|
|
||||||
type StorageClassCapabilitySpec struct {
|
|
||||||
Provisioner string `json:"provisioner"`
|
|
||||||
Features CapabilityFeatures `json:"features"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// StorageClassCapabilityList contains a list of StorageClassCapability
|
|
||||||
type StorageClassCapabilityList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []StorageClassCapability `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:noStatus
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
// +kubebuilder:printcolumn:name="Provisioner",type="string",JSONPath=".spec.pluginInfo.name"
|
|
||||||
// +kubebuilder:printcolumn:name="Expand",type="string",JSONPath=".spec.features.volume.expandMode"
|
|
||||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
|
||||||
// +kubebuilder:resource:scope="Cluster"
|
|
||||||
|
|
||||||
// ProvisionerCapability is the schema for the provisionercapability API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type ProvisionerCapability struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
|
|
||||||
Spec ProvisionerCapabilitySpec `json:"spec"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ProvisionerCapabilitySpec defines the desired state of ProvisionerCapability
|
|
||||||
type ProvisionerCapabilitySpec struct {
|
|
||||||
PluginInfo PluginInfo `json:"pluginInfo"`
|
|
||||||
Features CapabilityFeatures `json:"features"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
type ProvisionerCapabilityList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata"`
|
|
||||||
Items []ProvisionerCapability `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(
|
|
||||||
&StorageClassCapability{},
|
|
||||||
&StorageClassCapabilityList{},
|
|
||||||
&ProvisionerCapability{},
|
|
||||||
&ProvisionerCapabilityList{})
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/storage/v1alpha1/doc.go
generated
vendored
23
vendor/kubesphere.io/api/storage/v1alpha1/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/storage
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=storage.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
46
vendor/kubesphere.io/api/storage/v1alpha1/register.go
generated
vendored
46
vendor/kubesphere.io/api/storage/v1alpha1/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/storage
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=storage.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "storage.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
246
vendor/kubesphere.io/api/storage/v1alpha1/zz_generated.deepcopy.go
generated
vendored
246
vendor/kubesphere.io/api/storage/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,246 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *CapabilityFeatures) DeepCopyInto(out *CapabilityFeatures) {
|
|
||||||
*out = *in
|
|
||||||
out.Volume = in.Volume
|
|
||||||
out.Snapshot = in.Snapshot
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityFeatures.
|
|
||||||
func (in *CapabilityFeatures) DeepCopy() *CapabilityFeatures {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(CapabilityFeatures)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *PluginInfo) DeepCopyInto(out *PluginInfo) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginInfo.
|
|
||||||
func (in *PluginInfo) DeepCopy() *PluginInfo {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(PluginInfo)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ProvisionerCapability) DeepCopyInto(out *ProvisionerCapability) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionerCapability.
|
|
||||||
func (in *ProvisionerCapability) DeepCopy() *ProvisionerCapability {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ProvisionerCapability)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ProvisionerCapability) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ProvisionerCapabilityList) DeepCopyInto(out *ProvisionerCapabilityList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]ProvisionerCapability, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionerCapabilityList.
|
|
||||||
func (in *ProvisionerCapabilityList) DeepCopy() *ProvisionerCapabilityList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ProvisionerCapabilityList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *ProvisionerCapabilityList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ProvisionerCapabilitySpec) DeepCopyInto(out *ProvisionerCapabilitySpec) {
|
|
||||||
*out = *in
|
|
||||||
out.PluginInfo = in.PluginInfo
|
|
||||||
out.Features = in.Features
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionerCapabilitySpec.
|
|
||||||
func (in *ProvisionerCapabilitySpec) DeepCopy() *ProvisionerCapabilitySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ProvisionerCapabilitySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *SnapshotFeature) DeepCopyInto(out *SnapshotFeature) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotFeature.
|
|
||||||
func (in *SnapshotFeature) DeepCopy() *SnapshotFeature {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(SnapshotFeature)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StorageClassCapability) DeepCopyInto(out *StorageClassCapability) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
out.Spec = in.Spec
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassCapability.
|
|
||||||
func (in *StorageClassCapability) DeepCopy() *StorageClassCapability {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StorageClassCapability)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *StorageClassCapability) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StorageClassCapabilityList) DeepCopyInto(out *StorageClassCapabilityList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]StorageClassCapability, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassCapabilityList.
|
|
||||||
func (in *StorageClassCapabilityList) DeepCopy() *StorageClassCapabilityList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StorageClassCapabilityList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *StorageClassCapabilityList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *StorageClassCapabilitySpec) DeepCopyInto(out *StorageClassCapabilitySpec) {
|
|
||||||
*out = *in
|
|
||||||
out.Features = in.Features
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassCapabilitySpec.
|
|
||||||
func (in *StorageClassCapabilitySpec) DeepCopy() *StorageClassCapabilitySpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(StorageClassCapabilitySpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *VolumeFeature) DeepCopyInto(out *VolumeFeature) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeFeature.
|
|
||||||
func (in *VolumeFeature) DeepCopy() *VolumeFeature {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(VolumeFeature)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
32
vendor/kubesphere.io/api/tenant/crdinstall/install.go
generated
vendored
32
vendor/kubesphere.io/api/tenant/crdinstall/install.go
generated
vendored
@@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package install
|
|
||||||
|
|
||||||
import (
|
|
||||||
k8sruntime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
|
|
||||||
|
|
||||||
tenantv1alpha1 "kubesphere.io/api/tenant/v1alpha1"
|
|
||||||
tenantv1alpha2 "kubesphere.io/api/tenant/v1alpha2"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Install(scheme *k8sruntime.Scheme) {
|
|
||||||
urlruntime.Must(tenantv1alpha1.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(tenantv1alpha2.AddToScheme(scheme))
|
|
||||||
urlruntime.Must(scheme.SetVersionPriority(tenantv1alpha1.SchemeGroupVersion))
|
|
||||||
urlruntime.Must(scheme.SetVersionPriority(tenantv1alpha2.SchemeGroupVersion))
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/tenant/v1alpha1/doc.go
generated
vendored
23
vendor/kubesphere.io/api/tenant/v1alpha1/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the tenant v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/tenant
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=tenant.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
2460
vendor/kubesphere.io/api/tenant/v1alpha1/openapi_generated.go
generated
vendored
2460
vendor/kubesphere.io/api/tenant/v1alpha1/openapi_generated.go
generated
vendored
File diff suppressed because it is too large
Load Diff
46
vendor/kubesphere.io/api/tenant/v1alpha1/register.go
generated
vendored
46
vendor/kubesphere.io/api/tenant/v1alpha1/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the tenant v1alpha1 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/tenant
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=tenant.kubesphere.io
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "tenant.kubesphere.io", Version: "v1alpha1"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
71
vendor/kubesphere.io/api/tenant/v1alpha1/workspace_types.go
generated
vendored
71
vendor/kubesphere.io/api/tenant/v1alpha1/workspace_types.go
generated
vendored
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindWorkspace = "Workspace"
|
|
||||||
ResourceSingularWorkspace = "workspace"
|
|
||||||
ResourcePluralWorkspace = "workspaces"
|
|
||||||
WorkspaceLabel = "kubesphere.io/workspace"
|
|
||||||
)
|
|
||||||
|
|
||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
||||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
||||||
|
|
||||||
// WorkspaceSpec defines the desired state of Workspace
|
|
||||||
type WorkspaceSpec struct {
|
|
||||||
Manager string `json:"manager,omitempty"`
|
|
||||||
NetworkIsolation *bool `json:"networkIsolation,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// WorkspaceStatus defines the observed state of Workspace
|
|
||||||
type WorkspaceStatus struct {
|
|
||||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
||||||
// Important: Run "make" to regenerate code after modifying this file
|
|
||||||
}
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// Workspace is the Schema for the workspaces API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:categories="tenant",scope="Cluster"
|
|
||||||
type Workspace struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec WorkspaceSpec `json:"spec,omitempty"`
|
|
||||||
Status WorkspaceStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// WorkspaceList contains a list of Workspace
|
|
||||||
type WorkspaceList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []Workspace `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&Workspace{}, &WorkspaceList{})
|
|
||||||
}
|
|
||||||
123
vendor/kubesphere.io/api/tenant/v1alpha1/zz_generated.deepcopy.go
generated
vendored
123
vendor/kubesphere.io/api/tenant/v1alpha1/zz_generated.deepcopy.go
generated
vendored
@@ -1,123 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Workspace) DeepCopyInto(out *Workspace) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
out.Status = in.Status
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace.
|
|
||||||
func (in *Workspace) DeepCopy() *Workspace {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Workspace)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Workspace) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Workspace, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList.
|
|
||||||
func (in *WorkspaceList) DeepCopy() *WorkspaceList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceSpec) DeepCopyInto(out *WorkspaceSpec) {
|
|
||||||
*out = *in
|
|
||||||
if in.NetworkIsolation != nil {
|
|
||||||
in, out := &in.NetworkIsolation, &out.NetworkIsolation
|
|
||||||
*out = new(bool)
|
|
||||||
**out = **in
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceSpec.
|
|
||||||
func (in *WorkspaceSpec) DeepCopy() *WorkspaceSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.
|
|
||||||
func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
23
vendor/kubesphere.io/api/tenant/v1alpha2/doc.go
generated
vendored
23
vendor/kubesphere.io/api/tenant/v1alpha2/doc.go
generated
vendored
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the tenant v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/tenant
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=tenant.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
46
vendor/kubesphere.io/api/tenant/v1alpha2/register.go
generated
vendored
46
vendor/kubesphere.io/api/tenant/v1alpha2/register.go
generated
vendored
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
|
||||||
|
|
||||||
// Package v1alpha2 contains API Schema definitions for the tenant v1alpha2 API group
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/tenant
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=tenant.kubesphere.io
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "tenant.kubesphere.io", Version: "v1alpha2"}
|
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
|
||||||
|
|
||||||
// AddToScheme is required by pkg/client/...
|
|
||||||
AddToScheme = SchemeBuilder.AddToScheme
|
|
||||||
)
|
|
||||||
|
|
||||||
// Resource is required by pkg/client/listers/...
|
|
||||||
func Resource(resource string) schema.GroupResource {
|
|
||||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
|
||||||
}
|
|
||||||
56
vendor/kubesphere.io/api/tenant/v1alpha2/workspacetemplate_types.go
generated
vendored
56
vendor/kubesphere.io/api/tenant/v1alpha2/workspacetemplate_types.go
generated
vendored
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
|
|
||||||
typesv1alpha1 "kubesphere.io/api/types/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourceKindWorkspaceTemplate = "WorkspaceTemplate"
|
|
||||||
ResourceSingularWorkspaceTemplate = "workspacetemplate"
|
|
||||||
ResourcePluralWorkspaceTemplate = "workspacetemplates"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// WorkspaceTemplate is the Schema for the workspacetemplates API
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
// +kubebuilder:resource:categories="tenant",scope="Cluster"
|
|
||||||
type WorkspaceTemplate struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec typesv1alpha1.FederatedWorkspaceSpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +genclient:nonNamespaced
|
|
||||||
|
|
||||||
// WorkspaceTemplateList contains a list of WorkspaceTemplate
|
|
||||||
type WorkspaceTemplateList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []WorkspaceTemplate `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
SchemeBuilder.Register(&WorkspaceTemplate{}, &WorkspaceTemplateList{})
|
|
||||||
}
|
|
||||||
85
vendor/kubesphere.io/api/tenant/v1alpha2/zz_generated.deepcopy.go
generated
vendored
85
vendor/kubesphere.io/api/tenant/v1alpha2/zz_generated.deepcopy.go
generated
vendored
@@ -1,85 +0,0 @@
|
|||||||
// +build !ignore_autogenerated
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceTemplate) DeepCopyInto(out *WorkspaceTemplate) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTemplate.
|
|
||||||
func (in *WorkspaceTemplate) DeepCopy() *WorkspaceTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceTemplate) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkspaceTemplateList) DeepCopyInto(out *WorkspaceTemplateList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]WorkspaceTemplate, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTemplateList.
|
|
||||||
func (in *WorkspaceTemplateList) DeepCopy() *WorkspaceTemplateList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkspaceTemplateList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkspaceTemplateList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
22
vendor/kubesphere.io/api/types/v1beta1/doc.go
generated
vendored
22
vendor/kubesphere.io/api/types/v1beta1/doc.go
generated
vendored
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The KubeSphere Authors.
|
|
||||||
|
|
||||||
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:openapi-gen=true
|
|
||||||
// +k8s:deepcopy-gen=package,register
|
|
||||||
// +k8s:conversion-gen=kubesphere.io/api/types
|
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
|
||||||
// +groupName=types.kubefed.io
|
|
||||||
package v1beta1
|
|
||||||
58
vendor/kubesphere.io/api/types/v1beta1/federatedapplication_types.go
generated
vendored
58
vendor/kubesphere.io/api/types/v1beta1/federatedapplication_types.go
generated
vendored
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"sigs.k8s.io/application/api/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcePluralFederatedApplication = "federatedapplications"
|
|
||||||
ResourceSingularFederatedApplication = "federatedapplication"
|
|
||||||
FederatedApplicationKind = "FederatedApplication"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type FederatedApplication struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedApplicationSpec `json:"spec"`
|
|
||||||
|
|
||||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FederatedApplicationSpec struct {
|
|
||||||
Template ApplicationTemplate `json:"template"`
|
|
||||||
Placement GenericPlacementFields `json:"placement"`
|
|
||||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ApplicationTemplate struct {
|
|
||||||
Spec v1beta1.ApplicationSpec `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// FederatedApplicationList contains a list of federatedapplicationlists
|
|
||||||
type FederatedApplicationList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []FederatedApplication `json:"items"`
|
|
||||||
}
|
|
||||||
62
vendor/kubesphere.io/api/types/v1beta1/federatedclusterrole_types.go
generated
vendored
62
vendor/kubesphere.io/api/types/v1beta1/federatedclusterrole_types.go
generated
vendored
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/rbac/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcePluralFederatedClusterRole = "federatedclusterroles"
|
|
||||||
ResourceSingularFederatedClusterRole = "federatedclusterrole"
|
|
||||||
FederatedClusterRoleKind = "FederatedClusterRole"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type FederatedClusterRole struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedClusterRoleSpec `json:"spec"`
|
|
||||||
|
|
||||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FederatedClusterRoleSpec struct {
|
|
||||||
Template ClusterRoleTemplate `json:"template"`
|
|
||||||
Placement GenericPlacementFields `json:"placement"`
|
|
||||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ClusterRoleTemplate struct {
|
|
||||||
// +optional
|
|
||||||
Rules []v1.PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
|
|
||||||
|
|
||||||
// +optional
|
|
||||||
AggregationRule *v1.AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// FederatedClusterRoleList contains a list of federatedclusterrolelists
|
|
||||||
type FederatedClusterRoleList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []FederatedClusterRole `json:"items"`
|
|
||||||
}
|
|
||||||
63
vendor/kubesphere.io/api/types/v1beta1/federatedclusterrolebinding_types.go
generated
vendored
63
vendor/kubesphere.io/api/types/v1beta1/federatedclusterrolebinding_types.go
generated
vendored
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/rbac/v1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcePluralFederatedClusterRoleBindingBinding = "federatedclusterrolebindings"
|
|
||||||
ResourceSingularFederatedClusterRoleBinding = "federatedclusterrolebinding"
|
|
||||||
FederatedClusterRoleBindingKind = "FederatedClusterRoleBinding"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type FederatedClusterRoleBinding struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedClusterRoleBindingSpec `json:"spec"`
|
|
||||||
|
|
||||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FederatedClusterRoleBindingSpec struct {
|
|
||||||
Template ClusterRoleBindingTemplate `json:"template"`
|
|
||||||
Placement GenericPlacementFields `json:"placement"`
|
|
||||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ClusterRoleBindingTemplate struct {
|
|
||||||
// +optional
|
|
||||||
Subjects []v1.Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"`
|
|
||||||
|
|
||||||
// RoleRef can only reference a ClusterRole in the global namespace.
|
|
||||||
// If the RoleRef cannot be resolved, the Authorizer must return an error.
|
|
||||||
RoleRef v1.RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// FederatedClusterRoleBindingList contains a list of federatedclusterrolebindinglists
|
|
||||||
type FederatedClusterRoleBindingList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []FederatedClusterRoleBinding `json:"items"`
|
|
||||||
}
|
|
||||||
62
vendor/kubesphere.io/api/types/v1beta1/federatedconfigmap_types.go
generated
vendored
62
vendor/kubesphere.io/api/types/v1beta1/federatedconfigmap_types.go
generated
vendored
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2020 KubeSphere Authors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ResourcePluralFederatedConfigmap = "federatedconfigmaps"
|
|
||||||
ResourceSingularFederatedConfigmap = "federatedconfigmap"
|
|
||||||
FederatedConfigMapKind = "FederatedConfigMap"
|
|
||||||
)
|
|
||||||
|
|
||||||
// +genclient
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
// +k8s:openapi-gen=true
|
|
||||||
type FederatedConfigMap struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
||||||
Spec FederatedConfigMapSpec `json:"spec"`
|
|
||||||
|
|
||||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type FederatedConfigMapSpec struct {
|
|
||||||
Template ConfigMapTemplate `json:"template"`
|
|
||||||
Placement GenericPlacementFields `json:"placement"`
|
|
||||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ConfigMapTemplate struct {
|
|
||||||
|
|
||||||
// +optional
|
|
||||||
Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
|
|
||||||
|
|
||||||
// +optional
|
|
||||||
BinaryData map[string][]byte `json:"binaryData,omitempty" protobuf:"bytes,3,rep,name=binaryData"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
// FederatedConfigmapList contains a list of federatedconfigmaplists
|
|
||||||
type FederatedConfigMapList struct {
|
|
||||||
metav1.TypeMeta `json:",inline"`
|
|
||||||
metav1.ListMeta `json:"metadata,omitempty"`
|
|
||||||
Items []FederatedConfigMap `json:"items"`
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user