|
| 1 | +package olm |
| 2 | + |
| 3 | +import opsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" |
| 4 | + |
| 5 | +var ( |
| 6 | + capabilityBasicInstall = "basic install" |
| 7 | + capabilitySeamlessUpgrades = "seamless upgrades" |
| 8 | + capabilityFullLifecucle = "full lifecycle" |
| 9 | + capabilityDeepInsights = "deep insights" |
| 10 | + capabilityAutoPilot = "auto pilot" |
| 11 | + |
| 12 | + mediatypeGIF = "image/gif" |
| 13 | + mediatypeJPG = "image/jpeg" |
| 14 | + mediatypePNG = "image/png" |
| 15 | + mediatypeSVG = "image/svg+xml" |
| 16 | +) |
| 17 | + |
| 18 | +// ServiceConfig represents a service controller's OLM configuration |
| 19 | +// input. |
| 20 | +type ServiceConfig struct { |
| 21 | + Annotations Annotations `json:"annotations"` |
| 22 | + Samples []Sample `json:"samples"` |
| 23 | + opsv1alpha1.ClusterServiceVersionSpec |
| 24 | +} |
| 25 | + |
| 26 | +// CommonMetadata represents common metadata for all service controllers |
| 27 | +// generated by this project. |
| 28 | +type CommonMetadata struct { |
| 29 | + Links []opsv1alpha1.AppLink `json:"links"` |
| 30 | + Keywords []string `json:"keywords"` |
| 31 | +} |
| 32 | + |
| 33 | +// CommonLinks are links that are likely to be common across service |
| 34 | +// controllers. |
| 35 | +var CommonLinks = []opsv1alpha1.AppLink{ |
| 36 | + { |
| 37 | + Name: "AWS Controllers for Kubernetes", |
| 38 | + URL: "https://github.com/aws-controllers-k8s/community", |
| 39 | + }, |
| 40 | + { |
| 41 | + Name: "Documentation", |
| 42 | + URL: "https://aws-controllers-k8s.github.io/community/", |
| 43 | + }, |
| 44 | +} |
| 45 | + |
| 46 | +// CommonKeywords are keywords that are likely to be common across |
| 47 | +// service controllers. |
| 48 | +var CommonKeywords = []string{ |
| 49 | + "aws", |
| 50 | + "amazon", |
| 51 | + "ack", |
| 52 | +} |
| 53 | + |
| 54 | +// Annotations represent metadata that is added to the ClusterServiceVersion |
| 55 | +// yaml. These keys inform the OLM graphical user interface. |
| 56 | +type Annotations struct { |
| 57 | + CapabilityLevel string `json:"capabilityLevel"` |
| 58 | + SuggestedNamespace string `json:"suggestedNamespace"` |
| 59 | + Repository string `json:"repository"` |
| 60 | + ContainerImage string `json:"containerImage"` |
| 61 | + ShortDescription string `json:"shortDescription"` |
| 62 | + Support string `json:"support"` |
| 63 | + IsCertified bool `json:"isCertified"` |
| 64 | +} |
| 65 | + |
| 66 | +// Sample is a basic representation of an instance of custom resource |
| 67 | +// managed by a given service controller. |
| 68 | +type Sample struct { |
| 69 | + Kind string `json:"kind"` |
| 70 | + Spec string `json:"spec"` |
| 71 | + DisplayName string `json:"displayName"` |
| 72 | + Description string `json:"description"` |
| 73 | +} |
0 commit comments