|
| 1 | +/* |
| 2 | +Copyright 2023 The Kubernetes Authors. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +package v1alpha1 |
| 18 | + |
| 19 | +import ( |
| 20 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 21 | +) |
| 22 | + |
| 23 | +// ConformanceReport is a report of conformance testing results including the |
| 24 | +// specific conformance profiles that were tested and the results of the tests |
| 25 | +// with summaries and statistics. |
| 26 | +type ConformanceReport struct { |
| 27 | + metav1.TypeMeta `json:",inline"` |
| 28 | + Implementation `json:"implementation"` |
| 29 | + |
| 30 | + // Date indicates the date that this report was generated. |
| 31 | + Date string `json:"date"` |
| 32 | + |
| 33 | + // NetworkPolicyV2APIVersion indicates which release version of NetworkPolicy API this |
| 34 | + // test report was made for. |
| 35 | + NetworkPolicyV2APIVersion string `json:"networkPolicyV2APIVersion"` |
| 36 | + |
| 37 | + // ProfileReports is a list of the individual reports for each conformance |
| 38 | + // profile that was enabled for a test run. |
| 39 | + ProfileReports []ProfileReport `json:"profiles"` |
| 40 | +} |
| 41 | + |
| 42 | +// Implementation provides metadata information on the downstream |
| 43 | +// implementation of Network Policy V2 API which ran conformance tests. |
| 44 | +type Implementation struct { |
| 45 | + // Organization refers to the company, group or individual which maintains |
| 46 | + // the named implementation. Organizations can provide reports for any |
| 47 | + // number of distinct Network Policy API implementations they maintain, but need |
| 48 | + // to identify themselves using this organization field for grouping. |
| 49 | + Organization string `json:"organization"` |
| 50 | + |
| 51 | + // Project indicates the name of the project or repository for a Network Policy API |
| 52 | + // implementation. |
| 53 | + Project string `json:"project"` |
| 54 | + |
| 55 | + // URL indicates a human-usable URL where more information about the |
| 56 | + // implementation can be found. For open source projects this should |
| 57 | + // generally link to the code repository. |
| 58 | + URL string `json:"url"` |
| 59 | + |
| 60 | + // Version indicates the version of the implementation that was used for |
| 61 | + // testing. This should generally be a semver version when applicable. |
| 62 | + Version string `json:"version"` |
| 63 | + |
| 64 | + // Contact is contact information for the maintainers so that Network Policy API |
| 65 | + // maintainers can get ahold of them as needed. Ideally this should be |
| 66 | + // Github usernames (in the form of `@<username>`) or team names (in the |
| 67 | + // form of `@<team>/<name>`), but when that's not possible it can be email |
| 68 | + // addresses. |
| 69 | + // Rather than Github usernames or email addresses you can provide a URL to the relevant |
| 70 | + // support pages for the project. Ideally this would be something like the issue creation page |
| 71 | + // on a repository, but for projects without a publicly exposed repository a general support |
| 72 | + // page URL can be provided. |
| 73 | + Contact []string `json:"contact"` |
| 74 | +} |
0 commit comments