Skip to content

Commit d2e8855

Browse files
authoredMar 25, 2020
Merge pull request operator-framework#224 from kevinrizza/graph-loader
Graph Loader initial implementation
2 parents 100f3bc + 7ca004d commit d2e8855

33 files changed

+18894
-0
lines changed
 

‎go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.13
44

55
require (
66
github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6
7+
github.com/blang/semver v3.5.0+incompatible
78
github.com/docker/distribution v2.7.1+incompatible
89
github.com/ghodss/yaml v1.0.0
910
github.com/golang-migrate/migrate/v4 v4.6.2

‎pkg/registry/empty.go

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ func (EmptyQuery) GetPackage(ctx context.Context, name string) (*PackageManifest
2424
return nil, errors.New("empty querier: cannot get package")
2525
}
2626

27+
func (EmptyQuery) GetDefaultPackage(ctx context.Context, name string) (string, error) {
28+
return "", errors.New("empty querier: cannot get default package")
29+
}
30+
31+
func (EmptyQuery) GetChannelEntriesFromPackage(ctx context.Context, packageName string) ([]ChannelEntryAnnotated, error) {
32+
return nil, errors.New("empty querier: cannot get all channel entries for package")
33+
}
34+
2735
func (EmptyQuery) GetBundle(ctx context.Context, pkgName, channelName, csvName string) (*api.Bundle, error) {
2836
return nil, errors.New("empty querier: cannot get bundle")
2937
}

‎pkg/registry/graph.go

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package registry
2+
3+
type Package struct {
4+
Name string
5+
DefaultChannel string
6+
Channels map[string]Channel
7+
}
8+
9+
type Channel struct {
10+
Head BundleKey
11+
Nodes map[BundleKey]map[BundleKey]struct{}
12+
}
13+
14+
type BundleKey struct {
15+
BundlePath string
16+
Version string //semver string
17+
CsvName string
18+
}
19+
20+
func (b *BundleKey) IsEmpty() bool {
21+
return b.BundlePath == "" && b.Version == "" && b.CsvName == ""
22+
}

‎pkg/registry/interface.go

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ type Query interface {
1818
ListTables(ctx context.Context) ([]string, error)
1919
ListPackages(ctx context.Context) ([]string, error)
2020
GetPackage(ctx context.Context, name string) (*PackageManifest, error)
21+
GetDefaultPackage(ctx context.Context, name string) (string, error)
22+
GetChannelEntriesFromPackage(ctx context.Context, packageName string) ([]ChannelEntryAnnotated, error)
2123
GetBundle(ctx context.Context, pkgName, channelName, csvName string) (*api.Bundle, error)
2224
GetBundleForChannel(ctx context.Context, pkgName string, channelName string) (*api.Bundle, error)
2325
// Get all channel entries that say they replace this one
@@ -47,3 +49,10 @@ type Query interface {
4749
// Get CurrentCSV name for channel and package
4850
GetCurrentCSVNameForChannel(ctx context.Context, pkgName, channel string) (string, error)
4951
}
52+
53+
// GraphLoader generates a graph
54+
// GraphLoader supports multiple different loading schemes
55+
// GraphLoader from SQL, GraphLoader from old format (filesystem), GraphLoader from SQL + input bundles
56+
type GraphLoader interface {
57+
Generate() (*Package, error)
58+
}

‎pkg/registry/types.go

+12
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ type ChannelEntry struct {
7676
Replaces string
7777
}
7878

79+
// ChannelEntryAnnotated is a denormalized node in a channel graph annotated with additional entry level info
80+
type ChannelEntryAnnotated struct {
81+
PackageName string
82+
ChannelName string
83+
BundleName string
84+
BundlePath string
85+
Version string
86+
Replaces string
87+
ReplacesVersion string
88+
ReplacesBundlePath string
89+
}
90+
7991
// AnnotationsFile holds annotation information about a bundle
8092
type AnnotationsFile struct {
8193
// annotations is a list of annotations for a given bundle

‎pkg/sqlite/graphloader.go

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
package sqlite
2+
3+
import (
4+
"context"
5+
"database/sql"
6+
"fmt"
7+
8+
"github.com/operator-framework/operator-registry/pkg/registry"
9+
)
10+
11+
type SQLGraphLoader struct {
12+
Querier registry.Query
13+
PackageName string
14+
}
15+
16+
func NewSQLGraphLoader(dbFilename, name string) (*SQLGraphLoader, error) {
17+
querier, err := NewSQLLiteQuerier(dbFilename)
18+
if err != nil {
19+
return nil, err
20+
}
21+
22+
return &SQLGraphLoader{
23+
Querier: querier,
24+
PackageName: name,
25+
}, nil
26+
}
27+
28+
func NewSQLGraphLoaderFromDB(db *sql.DB, name string) (*SQLGraphLoader, error) {
29+
return &SQLGraphLoader{
30+
Querier: NewSQLLiteQuerierFromDb(db),
31+
PackageName: name,
32+
}, nil
33+
}
34+
35+
func (g *SQLGraphLoader) Generate() (*registry.Package, error) {
36+
ctx := context.TODO()
37+
defaultChannel, err := g.Querier.GetDefaultPackage(ctx, g.PackageName)
38+
if err != nil {
39+
return nil, err
40+
}
41+
42+
channelEntries, err := g.Querier.GetChannelEntriesFromPackage(ctx, g.PackageName)
43+
if err != nil {
44+
return nil, err
45+
}
46+
47+
channels, err := graphFromEntries(channelEntries)
48+
if err != nil {
49+
return nil, err
50+
}
51+
52+
return &registry.Package{
53+
Name: g.PackageName,
54+
DefaultChannel: defaultChannel,
55+
Channels: channels,
56+
}, nil
57+
}
58+
59+
// graphFromEntries builds the graph from a set of channel entries
60+
func graphFromEntries(channelEntries []registry.ChannelEntryAnnotated) (map[string]registry.Channel, error) {
61+
channels := map[string]registry.Channel{}
62+
63+
type replaces map[registry.BundleKey]map[registry.BundleKey]struct{}
64+
65+
channelGraph := map[string]replaces{}
66+
channelHeadCandidates := map[string]map[registry.BundleKey]struct{}{}
67+
68+
// add all channels and nodes to the graph
69+
for _, entry := range channelEntries {
70+
// create channel if we haven't seen it yet
71+
if _, ok := channelGraph[entry.ChannelName]; !ok {
72+
channelGraph[entry.ChannelName] = replaces{}
73+
}
74+
75+
key := registry.BundleKey{
76+
BundlePath: entry.BundlePath,
77+
Version: entry.Version,
78+
CsvName: entry.BundleName,
79+
}
80+
channelGraph[entry.ChannelName][key] = map[registry.BundleKey]struct{}{}
81+
82+
// every bundle in a channel is a potential head of that channel
83+
if _, ok := channelHeadCandidates[entry.ChannelName]; !ok {
84+
channelHeadCandidates[entry.ChannelName] = map[registry.BundleKey]struct{}{key: {}}
85+
} else {
86+
channelHeadCandidates[entry.ChannelName][key] = struct{}{}
87+
}
88+
}
89+
90+
for _, entry := range channelEntries {
91+
key := registry.BundleKey{
92+
BundlePath: entry.BundlePath,
93+
Version: entry.Version,
94+
CsvName: entry.BundleName,
95+
}
96+
replacesKey := registry.BundleKey{
97+
BundlePath: entry.BundlePath,
98+
Version: entry.ReplacesVersion,
99+
CsvName: entry.Replaces,
100+
}
101+
102+
if !replacesKey.IsEmpty() {
103+
channelGraph[entry.ChannelName][key][replacesKey] = struct{}{}
104+
}
105+
106+
delete(channelHeadCandidates[entry.ChannelName], replacesKey)
107+
}
108+
109+
for channelName, candidates := range channelHeadCandidates {
110+
if len(candidates) == 0 {
111+
return nil, fmt.Errorf("no channel head found for %s", channelName)
112+
}
113+
if len(candidates) > 1 {
114+
return nil, fmt.Errorf("multiple candidate channel heads found for %s: %v", channelName, candidates)
115+
}
116+
117+
for head := range candidates {
118+
channel := registry.Channel{
119+
Head: head,
120+
Nodes: channelGraph[channelName],
121+
}
122+
channels[channelName] = channel
123+
}
124+
}
125+
126+
return channels, nil
127+
}

‎pkg/sqlite/graphloader_test.go

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
package sqlite
2+
3+
import (
4+
"context"
5+
"database/sql"
6+
"fmt"
7+
"github.com/operator-framework/operator-registry/pkg/registry"
8+
"math/rand"
9+
"os"
10+
"testing"
11+
12+
"github.com/stretchr/testify/require"
13+
)
14+
15+
func createLoadedTestDb(t *testing.T) (*sql.DB, func()) {
16+
dbName := fmt.Sprintf("test-%d.db", rand.Int())
17+
18+
db, err := sql.Open("sqlite3", dbName)
19+
require.NoError(t, err)
20+
21+
dbLoader, err := NewSQLLiteLoader(db)
22+
require.NoError(t, err)
23+
24+
err = dbLoader.Migrate(context.TODO())
25+
require.NoError(t, err)
26+
27+
loader := NewSQLLoaderForDirectory(dbLoader, "./testdata/loader_data")
28+
err = loader.Populate()
29+
require.NoError(t, err)
30+
31+
return db, func() {
32+
defer func() {
33+
if err := os.Remove(dbName); err != nil {
34+
t.Fatal(err)
35+
}
36+
}()
37+
if err := db.Close(); err != nil {
38+
t.Fatal(err)
39+
}
40+
}
41+
}
42+
43+
func TestLoadPackageGraph_Etcd(t *testing.T) {
44+
expectedGraph := &registry.Package{
45+
Name: "etcd",
46+
DefaultChannel: "alpha",
47+
Channels: map[string]registry.Channel{
48+
"alpha": {
49+
Head: registry.BundleKey{BundlePath: "", Version: "0.9.2", CsvName: "etcdoperator.v0.9.2"},
50+
Nodes: map[registry.BundleKey]map[registry.BundleKey]struct{}{
51+
registry.BundleKey{BundlePath: "", Version: "", CsvName: "etcdoperator.v0.9.1"}: {},
52+
registry.BundleKey{BundlePath: "", Version: "0.6.1", CsvName: "etcdoperator.v0.6.1"}: {},
53+
registry.BundleKey{BundlePath: "", Version: "0.9.0", CsvName: "etcdoperator.v0.9.0"}: {
54+
registry.BundleKey{BundlePath: "", Version: "0.6.1", CsvName: "etcdoperator.v0.6.1"}: struct{}{},
55+
},
56+
registry.BundleKey{BundlePath: "", Version: "0.9.2", CsvName: "etcdoperator.v0.9.2"}: {
57+
registry.BundleKey{BundlePath: "", Version: "", CsvName: "etcdoperator.v0.9.1"}: struct{}{},
58+
registry.BundleKey{BundlePath: "", Version: "0.9.0", CsvName: "etcdoperator.v0.9.0"}: struct{}{},
59+
},
60+
},
61+
},
62+
"beta": {
63+
Head: registry.BundleKey{BundlePath: "", Version: "0.9.0", CsvName: "etcdoperator.v0.9.0"},
64+
Nodes: map[registry.BundleKey]map[registry.BundleKey]struct{}{
65+
registry.BundleKey{BundlePath: "", Version: "0.6.1", CsvName: "etcdoperator.v0.6.1"}: {},
66+
registry.BundleKey{BundlePath: "", Version: "0.9.0", CsvName: "etcdoperator.v0.9.0"}: {
67+
registry.BundleKey{BundlePath: "", Version: "0.6.1", CsvName: "etcdoperator.v0.6.1"}: struct{}{},
68+
},
69+
},
70+
},
71+
"stable": {
72+
Head: registry.BundleKey{BundlePath: "", Version: "0.9.2", CsvName: "etcdoperator.v0.9.2"},
73+
Nodes: map[registry.BundleKey]map[registry.BundleKey]struct{}{
74+
registry.BundleKey{BundlePath: "", Version: "", CsvName: "etcdoperator.v0.9.1"}: {},
75+
registry.BundleKey{BundlePath: "", Version: "0.6.1", CsvName: "etcdoperator.v0.6.1"}: {},
76+
registry.BundleKey{BundlePath: "", Version: "0.9.0", CsvName: "etcdoperator.v0.9.0"}: {
77+
registry.BundleKey{BundlePath: "", Version: "0.6.1", CsvName: "etcdoperator.v0.6.1"}: struct{}{},
78+
},
79+
registry.BundleKey{BundlePath: "", Version: "0.9.2", CsvName: "etcdoperator.v0.9.2"}: {
80+
registry.BundleKey{BundlePath: "", Version: "", CsvName: "etcdoperator.v0.9.1"}: struct{}{},
81+
registry.BundleKey{BundlePath: "", Version: "0.9.0", CsvName: "etcdoperator.v0.9.0"}: struct{}{},
82+
},
83+
},
84+
},
85+
},
86+
}
87+
88+
db, cleanup := createLoadedTestDb(t)
89+
defer cleanup()
90+
91+
graphLoader, err := NewSQLGraphLoaderFromDB(db, "etcd")
92+
require.NoError(t, err)
93+
94+
result, err := graphLoader.Generate()
95+
require.NoError(t, err)
96+
97+
require.Equal(t, "etcd", result.Name)
98+
require.Equal(t, 3, len(result.Channels))
99+
100+
for channelName, channel := range result.Channels {
101+
expectedChannel := expectedGraph.Channels[channelName]
102+
require.Equal(t, expectedChannel.Head, channel.Head)
103+
require.EqualValues(t, expectedChannel.Nodes, channel.Nodes)
104+
}
105+
}

‎pkg/sqlite/query.go

+70
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,76 @@ func (s *SQLQuerier) GetPackage(ctx context.Context, name string) (*registry.Pac
113113
return pkg, nil
114114
}
115115

116+
func (s *SQLQuerier) GetDefaultPackage(ctx context.Context, name string) (string, error) {
117+
query := `SELECT default_channel
118+
FROM package WHERE package.name=?`
119+
rows, err := s.db.QueryContext(ctx, query, name)
120+
if err != nil {
121+
return "", err
122+
}
123+
defer rows.Close()
124+
125+
var defaultChannel sql.NullString
126+
if !rows.Next() {
127+
return "", fmt.Errorf("package %s not found", name)
128+
}
129+
if err := rows.Scan(&defaultChannel); err != nil {
130+
return "", err
131+
}
132+
133+
if !defaultChannel.Valid {
134+
return "", fmt.Errorf("default channel not valid")
135+
}
136+
137+
return defaultChannel.String, nil
138+
}
139+
140+
func (s *SQLQuerier) GetChannelEntriesFromPackage(ctx context.Context, packageName string) ([]registry.ChannelEntryAnnotated, error) {
141+
query := `SELECT channel_entry.package_name, channel_entry.channel_name, channel_entry.operatorbundle_name, op_bundle.version, op_bundle.bundlepath, replaces.operatorbundle_name, replacesbundle.version, replacesbundle.bundlepath
142+
FROM channel_entry
143+
LEFT JOIN channel_entry replaces ON channel_entry.replaces = replaces.entry_id
144+
LEFT JOIN operatorbundle op_bundle ON channel_entry.operatorbundle_name = op_bundle.name
145+
LEFT JOIN operatorbundle replacesbundle ON replaces.operatorbundle_name = replacesbundle.name
146+
WHERE channel_entry.package_name = ?;`
147+
148+
var entries []registry.ChannelEntryAnnotated
149+
rows, err := s.db.QueryContext(ctx, query, packageName)
150+
if err != nil {
151+
return nil, err
152+
}
153+
defer rows.Close()
154+
155+
var pkgName sql.NullString
156+
var channelName sql.NullString
157+
var bundleName sql.NullString
158+
var replaces sql.NullString
159+
var version sql.NullString
160+
var bundlePath sql.NullString
161+
var replacesVersion sql.NullString
162+
var replacesBundlePath sql.NullString
163+
164+
for rows.Next() {
165+
if err := rows.Scan(&pkgName, &channelName, &bundleName, &version, &bundlePath, &replaces, &replacesVersion, &replacesBundlePath); err != nil {
166+
return nil, err
167+
}
168+
169+
channelEntryNode := registry.ChannelEntryAnnotated{
170+
PackageName: pkgName.String,
171+
ChannelName: channelName.String,
172+
BundleName: bundleName.String,
173+
Version: version.String,
174+
BundlePath: bundlePath.String,
175+
Replaces: replaces.String,
176+
ReplacesVersion: replacesVersion.String,
177+
ReplacesBundlePath: replacesBundlePath.String,
178+
}
179+
180+
entries = append(entries, channelEntryNode)
181+
}
182+
183+
return entries, nil
184+
}
185+
116186
func (s *SQLQuerier) GetBundle(ctx context.Context, pkgName, channelName, csvName string) (*api.Bundle, error) {
117187
query := `SELECT DISTINCT channel_entry.entry_id, operatorbundle.name, operatorbundle.bundle, operatorbundle.bundlepath, operatorbundle.version, operatorbundle.skiprange
118188
FROM operatorbundle INNER JOIN channel_entry ON operatorbundle.name=channel_entry.operatorbundle_name

‎pkg/sqlite/test.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
expected:[]registry.OperatorBundle{registry.OperatorBundle{BundlePath: "", Version: semver.Version{Major: 0x0, Minor: 0x9, Patch: 0x2, Pre: []semver.PRVersion(nil), Build: []string(nil)}, CsvName: "etcdoperator.v0.9.2", ReplacesBundles: []registry.OperatorBundle{}, Replaces: []registry.BundleRef{registry.BundleRef{BundlePath: "", Version: semver.Version{Major: 0x0, Minor: 0x9, Patch: 0x0, Pre: []semver.PRVersion(nil), Build: []string(nil)}, CsvName: "etcdoperator.v0.9.0"}}}, registry.OperatorBundle{BundlePath: "", Version: semver.Version{Major: 0x0, Minor: 0x0, Patch: 0x0, Pre: []semver.PRVersion(nil), Build: []string(nil)}, CsvName: "etcdoperator.v0.9.1", ReplacesBundles: []registry.OperatorBundle{}, Replaces: []registry.BundleRef{}}, registry.OperatorBundle{BundlePath: "", Version: semver.Version{Major: 0x0, Minor: 0x9, Patch: 0x0, Pre: []semver.PRVersion(nil), Build: []string(nil)}, CsvName: "etcdoperator.v0.9.0", ReplacesBundles: []registry.OperatorBundle{}, Replaces: []registry.BundleRef{registry.BundleRef{BundlePath: "", Version: semver.Version{Major: 0x0, Minor: 0x6, Patch: 0x1, Pre: []semver.PRVersion(nil), Build: []string(nil)}, CsvName: "etcdoperator.v0.6.1"}}}, registry.OperatorBundle{BundlePath: "", Version: semver.Version{Major: 0x0, Minor: 0x6, Patch: 0x1, Pre: []semver.PRVersion(nil), Build: []string(nil)}, CsvName: "etcdoperator.v0.6.1", ReplacesBundles: []registry.OperatorBundle{}, Replaces: []registry.BundleRef{}}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: etcdclusters.etcd.database.coreos.com
5+
spec:
6+
group: etcd.database.coreos.com
7+
version: v1beta2
8+
scope: Namespaced
9+
names:
10+
plural: etcdclusters
11+
singular: etcdcluster
12+
kind: EtcdCluster
13+
listKind: EtcdClusterList
14+
shortNames:
15+
- etcdclus
16+
- etcd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
#! parse-kind: ClusterServiceVersion
2+
apiVersion: operators.coreos.com/v1alpha1
3+
kind: ClusterServiceVersion
4+
metadata:
5+
name: etcdoperator.v0.6.1
6+
namespace: placeholder
7+
annotations:
8+
tectonic-visibility: ocs
9+
spec:
10+
displayName: etcd
11+
description: |
12+
etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines. It’s open-source and available on GitHub. etcd gracefully handles leader elections during network partitions and will tolerate machine failure, including the leader. Your applications can read and write data into etcd.
13+
A simple use-case is to store database connection details or feature flags within etcd as key value pairs. These values can be watched, allowing your app to reconfigure itself when they change. Advanced uses take advantage of the consistency guarantees to implement database leader elections or do distributed locking across a cluster of workers.
14+
15+
_The etcd Open Cloud Service is Public Alpha. The goal before Beta is to fully implement backup features._
16+
17+
### Reading and writing to etcd
18+
19+
Communicate with etcd though its command line utility `etcdctl` or with the API using the automatically generated Kubernetes Service.
20+
21+
[Read the complete guide to using the etcd Open Cloud Service](https://coreos.com/tectonic/docs/latest/alm/etcd-ocs.html)
22+
23+
### Supported Features
24+
**High availability**
25+
Multiple instances of etcd are networked together and secured. Individual failures or networking issues are transparently handled to keep your cluster up and running.
26+
**Automated updates**
27+
Rolling out a new etcd version works like all Kubernetes rolling updates. Simply declare the desired version, and the etcd service starts a safe rolling update to the new version automatically.
28+
**Backups included**
29+
Coming soon, the ability to schedule backups to happen on or off cluster.
30+
keywords: ['etcd', 'key value', 'database', 'coreos', 'open source']
31+
version: 0.6.1
32+
maturity: alpha
33+
maintainers:
34+
- name: CoreOS, Inc
35+
email: support@coreos.com
36+
37+
provider:
38+
name: CoreOS, Inc
39+
labels:
40+
alm-status-descriptors: etcdoperator.v0.6.1
41+
alm-owner-etcd: etcdoperator
42+
operated-by: etcdoperator
43+
selector:
44+
matchLabels:
45+
alm-owner-etcd: etcdoperator
46+
operated-by: etcdoperator
47+
links:
48+
- name: Blog
49+
url: https://coreos.com/etcd
50+
- name: Documentation
51+
url: https://coreos.com/operators/etcd/docs/latest/
52+
- name: etcd Operator Source Code
53+
url: https://github.com/coreos/etcd-operator
54+
55+
icon:
56+
- base64data: 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
57+
mediatype: image/png
58+
install:
59+
strategy: deployment
60+
spec:
61+
permissions:
62+
- serviceAccountName: etcd-operator
63+
rules:
64+
- apiGroups:
65+
- etcd.database.coreos.com
66+
resources:
67+
- etcdclusters
68+
verbs:
69+
- "*"
70+
- apiGroups:
71+
- storage.k8s.io
72+
resources:
73+
- storageclasses
74+
verbs:
75+
- "*"
76+
- apiGroups:
77+
- ""
78+
resources:
79+
- pods
80+
- services
81+
- endpoints
82+
- persistentvolumeclaims
83+
- events
84+
verbs:
85+
- "*"
86+
- apiGroups:
87+
- apps
88+
resources:
89+
- deployments
90+
verbs:
91+
- "*"
92+
- apiGroups:
93+
- ""
94+
resources:
95+
- secrets
96+
verbs:
97+
- get
98+
deployments:
99+
- name: etcd-operator
100+
spec:
101+
replicas: 1
102+
selector:
103+
matchLabels:
104+
name: etcd-operator-alm-owned
105+
template:
106+
metadata:
107+
name: etcd-operator-alm-owned
108+
labels:
109+
name: etcd-operator-alm-owned
110+
spec:
111+
serviceAccountName: etcd-operator
112+
containers:
113+
- name: etcd-operator
114+
command:
115+
- etcd-operator
116+
- --create-crd=false
117+
image: quay.io/coreos/etcd-operator@sha256:bd944a211eaf8f31da5e6d69e8541e7cada8f16a9f7a5a570b22478997819943
118+
env:
119+
- name: MY_POD_NAMESPACE
120+
valueFrom:
121+
fieldRef:
122+
fieldPath: metadata.namespace
123+
- name: MY_POD_NAME
124+
valueFrom:
125+
fieldRef:
126+
fieldPath: metadata.name
127+
customresourcedefinitions:
128+
owned:
129+
- name: etcdclusters.etcd.database.coreos.com
130+
version: v1beta2
131+
kind: EtcdCluster
132+
displayName: etcd Cluster
133+
description: Represents a cluster of etcd nodes.
134+
resources:
135+
- kind: Service
136+
version: v1
137+
- kind: Pod
138+
version: v1
139+
specDescriptors:
140+
- description: The desired number of member Pods for the etcd cluster.
141+
displayName: Size
142+
path: size
143+
x-descriptors:
144+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
145+
statusDescriptors:
146+
- description: The status of each of the member Pods for the etcd cluster.
147+
displayName: Member Status
148+
path: members
149+
x-descriptors:
150+
- 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
151+
- description: The service at which the running etcd cluster can be accessed.
152+
displayName: Service
153+
path: service
154+
x-descriptors:
155+
- 'urn:alm:descriptor:io.kubernetes:Service'
156+
- description: The current size of the etcd cluster.
157+
displayName: Cluster Size
158+
path: size
159+
- description: The current version of the etcd cluster.
160+
displayName: Current Version
161+
path: currentVersion
162+
- description: 'The target version of the etcd cluster, after upgrading.'
163+
displayName: Target Version
164+
path: targetVersion
165+
- description: The current status of the etcd cluster.
166+
displayName: Status
167+
path: phase
168+
x-descriptors:
169+
- 'urn:alm:descriptor:io.kubernetes.phase'
170+
- description: Explanation for the current status of the cluster.
171+
displayName: Status Details
172+
path: reason
173+
x-descriptors:
174+
- 'urn:alm:descriptor:io.kubernetes.phase:reason'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: etcdbackups.etcd.database.coreos.com
5+
spec:
6+
group: etcd.database.coreos.com
7+
version: v1beta2
8+
scope: Namespaced
9+
names:
10+
kind: EtcdBackup
11+
listKind: EtcdBackupList
12+
plural: etcdbackups
13+
singular: etcdbackup
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: etcdclusters.etcd.database.coreos.com
5+
spec:
6+
group: etcd.database.coreos.com
7+
version: v1beta2
8+
scope: Namespaced
9+
names:
10+
plural: etcdclusters
11+
singular: etcdcluster
12+
kind: EtcdCluster
13+
listKind: EtcdClusterList
14+
shortNames:
15+
- etcdclus
16+
- etcd

‎pkg/sqlite/testdata/loader_data/etcd/0.9.2/etcdoperator.v0.9.0.yaml

+281
Large diffs are not rendered by default.

‎pkg/sqlite/testdata/loader_data/etcd/0.9.2/etcdoperator.v0.9.2.clusterserviceversion.yaml

+306
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: etcdrestores.etcd.database.coreos.com
5+
spec:
6+
group: etcd.database.coreos.com
7+
version: v1beta2
8+
scope: Namespaced
9+
names:
10+
kind: EtcdRestore
11+
listKind: EtcdRestoreList
12+
plural: etcdrestores
13+
singular: etcdrestore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
packageName: etcd
2+
channels:
3+
- name: alpha
4+
currentCSV: etcdoperator.v0.9.2
5+
- name: beta
6+
currentCSV: etcdoperator.v0.9.0
7+
- name: stable
8+
currentCSV: etcdoperator.v0.9.2
9+
defaultChannel: alpha

‎pkg/sqlite/testdata/loader_data/prometheus/0.14.0/alertmanager.crd.yaml

+2,398
Large diffs are not rendered by default.

‎pkg/sqlite/testdata/loader_data/prometheus/0.14.0/prometheus.crd.yaml

+2,971
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
#! parse-kind: ClusterServiceVersion
2+
apiVersion: operators.coreos.com/v1alpha1
3+
kind: ClusterServiceVersion
4+
metadata:
5+
name: prometheusoperator.0.14.0
6+
namespace: placeholder
7+
spec:
8+
displayName: Prometheus
9+
description: |
10+
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
11+
12+
_The Prometheus Open Cloud Service is Public Alpha. The goal before Beta is for additional user testing and minor bug fixes._
13+
14+
### Monitoring applications
15+
16+
Prometheus scrapes your application metrics based on targets maintained in a ServiceMonitor object. When alerts need to be sent, they are processsed by an AlertManager.
17+
18+
[Read the complete guide to monitoring applications with the Prometheus Open Cloud Service](https://coreos.com/tectonic/docs/latest/alm/prometheus-ocs.html)
19+
20+
## Supported Features
21+
22+
**High availability**
23+
Multiple instances are run across failure zones and data is replicated. This keeps your monitoring available during an outage, when you need it most.
24+
**Updates via automated operations**
25+
New Prometheus versions are deployed using a rolling update with no downtime, making it easy to stay up to date.
26+
**Handles the dynamic nature of containers**
27+
Alerting rules are attached to groups of containers instead of individual instances, which is ideal for the highly dynamic nature of container deployment.
28+
29+
keywords: ['prometheus', 'monitoring', 'tsdb', 'alerting']
30+
31+
maintainers:
32+
- name: CoreOS, Inc
33+
email: support@coreos.com
34+
35+
provider:
36+
name: CoreOS, Inc
37+
38+
links:
39+
- name: Prometheus
40+
url: https://www.prometheus.io/
41+
- name: Documentation
42+
url: https://coreos.com/operators/prometheus/docs/latest/
43+
- name: Prometheus Operator Source Code
44+
url: https://github.com/coreos/prometheus-operator
45+
46+
labels:
47+
alm-status-descriptors: prometheusoperator.0.14.0
48+
alm-owner-prometheus: prometheusoperator
49+
50+
selector:
51+
matchLabels:
52+
alm-owner-prometheus: prometheusoperator
53+
54+
icon:
55+
- base64data: PHN2ZyB3aWR0aD0iMjQ5MCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTEyOC4wMDEuNjY3QzU3LjMxMS42NjcgMCA1Ny45NzEgMCAxMjguNjY0YzAgNzAuNjkgNTcuMzExIDEyNy45OTggMTI4LjAwMSAxMjcuOTk4UzI1NiAxOTkuMzU0IDI1NiAxMjguNjY0QzI1NiA1Ny45NyAxOTguNjg5LjY2NyAxMjguMDAxLjY2N3ptMCAyMzkuNTZjLTIwLjExMiAwLTM2LjQxOS0xMy40MzUtMzYuNDE5LTMwLjAwNGg3Mi44MzhjMCAxNi41NjYtMTYuMzA2IDMwLjAwNC0zNi40MTkgMzAuMDA0em02MC4xNTMtMzkuOTRINjcuODQyVjE3OC40N2gxMjAuMzE0djIxLjgxNmgtLjAwMnptLS40MzItMzMuMDQ1SDY4LjE4NWMtLjM5OC0uNDU4LS44MDQtLjkxLTEuMTg4LTEuMzc1LTEyLjMxNS0xNC45NTQtMTUuMjE2LTIyLjc2LTE4LjAzMi0zMC43MTYtLjA0OC0uMjYyIDE0LjkzMyAzLjA2IDI1LjU1NiA1LjQ1IDAgMCA1LjQ2NiAxLjI2NSAxMy40NTggMi43MjItNy42NzMtOC45OTQtMTIuMjMtMjAuNDI4LTEyLjIzLTMyLjExNiAwLTI1LjY1OCAxOS42OC00OC4wNzkgMTIuNTgtNjYuMjAxIDYuOTEuNTYyIDE0LjMgMTQuNTgzIDE0LjggMzYuNTA1IDcuMzQ2LTEwLjE1MiAxMC40Mi0yOC42OSAxMC40Mi00MC4wNTYgMC0xMS43NjkgNy43NTUtMjUuNDQgMTUuNTEyLTI1LjkwNy02LjkxNSAxMS4zOTYgMS43OSAyMS4xNjUgOS41MyA0NS40IDIuOTAyIDkuMTAzIDIuNTMyIDI0LjQyMyA0Ljc3MiAzNC4xMzguNzQ0LTIwLjE3OCA0LjIxMy00OS42MiAxNy4wMTQtNTkuNzg0LTUuNjQ3IDEyLjguODM2IDI4LjgxOCA1LjI3IDM2LjUxOCA3LjE1NCAxMi40MjQgMTEuNDkgMjEuODM2IDExLjQ5IDM5LjYzOCAwIDExLjkzNi00LjQwNyAyMy4xNzMtMTEuODQgMzEuOTU4IDguNDUyLTEuNTg2IDE0LjI4OS0zLjAxNiAxNC4yODktMy4wMTZsMjcuNDUtNS4zNTVjLjAwMi0uMDAyLTMuOTg3IDE2LjQwMS0xOS4zMTQgMzIuMTk3eiIgZmlsbD0iI0RBNEUzMSIvPjwvc3ZnPg==
56+
mediatype: image/svg+xml
57+
58+
install:
59+
strategy: deployment
60+
spec:
61+
permissions:
62+
- serviceAccountName: prometheus-k8s
63+
rules:
64+
- apiGroups: [""]
65+
resources:
66+
- nodes
67+
- services
68+
- endpoints
69+
- pods
70+
verbs: ["get", "list", "watch"]
71+
- apiGroups: [""]
72+
resources:
73+
- configmaps
74+
verbs: ["get"]
75+
- serviceAccountName: prometheus-operator-0-14-0
76+
rules:
77+
- apiGroups:
78+
- apiextensions.k8s.io
79+
resources:
80+
- customresourcedefinitions
81+
verbs: ["get", "list"]
82+
- apiGroups:
83+
- monitoring.coreos.com
84+
resources:
85+
- alertmanagers
86+
- prometheuses
87+
- servicemonitors
88+
verbs:
89+
- "*"
90+
- apiGroups:
91+
- apps
92+
resources:
93+
- statefulsets
94+
verbs: ["*"]
95+
- apiGroups: [""]
96+
resources:
97+
- configmaps
98+
- secrets
99+
verbs: ["*"]
100+
- apiGroups: [""]
101+
resources:
102+
- pods
103+
verbs: ["list", "delete"]
104+
- apiGroups: [""]
105+
resources:
106+
- services
107+
- endpoints
108+
verbs: ["get", "create", "update"]
109+
- apiGroups: [""]
110+
resources:
111+
- nodes
112+
verbs: ["list", "watch"]
113+
- apiGroups: [""]
114+
resources:
115+
- namespaces
116+
verbs: ['list']
117+
deployments:
118+
- name: prometheus-operator
119+
spec:
120+
replicas: 1
121+
selector:
122+
matchLabels:
123+
k8s-app: prometheus-operator
124+
template:
125+
metadata:
126+
labels:
127+
k8s-app: prometheus-operator
128+
spec:
129+
serviceAccount: prometheus-operator-0-14-0
130+
containers:
131+
- name: prometheus-operator
132+
image: quay.io/coreos/prometheus-operator@sha256:5037b4e90dbb03ebdefaa547ddf6a1f748c8eeebeedf6b9d9f0913ad662b5731
133+
command:
134+
- sh
135+
- -c
136+
- >
137+
/bin/operator --namespace=$K8S_NAMESPACE --crd-apigroup monitoring.coreos.com
138+
--labels alm-status-descriptors=prometheusoperator.0.14.0,alm-owner-prometheus=prometheusoperator
139+
--kubelet-service=kube-system/kubelet
140+
--config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
141+
env:
142+
- name: K8S_NAMESPACE
143+
valueFrom:
144+
fieldRef:
145+
fieldPath: metadata.namespace
146+
ports:
147+
- containerPort: 8080
148+
name: http
149+
resources:
150+
limits:
151+
cpu: 200m
152+
memory: 100Mi
153+
requests:
154+
cpu: 100m
155+
memory: 50Mi
156+
maturity: alpha
157+
version: 0.14.0
158+
customresourcedefinitions:
159+
owned:
160+
- name: prometheuses.monitoring.coreos.com
161+
version: v1
162+
kind: Prometheus
163+
displayName: Prometheus
164+
description: A running Prometheus instance
165+
resources:
166+
- kind: Pod
167+
version: v1
168+
specDescriptors:
169+
- description: Desired number of Pods for the cluster
170+
displayName: Size
171+
path: replicas
172+
x-descriptors:
173+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
174+
- description: A selector for the ConfigMaps from which to load rule files
175+
displayName: Rule Config Map Selector
176+
path: ruleSelector
177+
x-descriptors:
178+
- 'urn:alm:descriptor:com.tectonic.ui:selector:core:v1:ConfigMap'
179+
- description: ServiceMonitors to be selected for target discovery
180+
displayName: Service Monitor Selector
181+
path: serviceMonitorSelector
182+
x-descriptors:
183+
- 'urn:alm:descriptor:com.tectonic.ui:selector:monitoring.coreos.com:v1:ServiceMonitor'
184+
- description: The ServiceAccount to use to run the Prometheus pods
185+
displayName: Service Account
186+
path: serviceAccountName
187+
x-descriptors:
188+
- 'urn:alm:descriptor:io.kubernetes:ServiceAccount'
189+
- description: Define resources requests and limits for single Pods
190+
displayName: Resource Request
191+
path: resources.requests
192+
x-descriptors:
193+
- 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
194+
statusDescriptors:
195+
- description: The current number of Pods for the cluster
196+
displayName: Cluster Size
197+
path: replicas
198+
- path: prometheusSelector
199+
displayName: Prometheus Service Selector
200+
description: Label selector to find the service that routes to this prometheus
201+
x-descriptors:
202+
- 'urn:alm:descriptor:label:selector'
203+
- name: servicemonitors.monitoring.coreos.com
204+
version: v1
205+
kind: ServiceMonitor
206+
displayName: Service Monitor
207+
description: Configures prometheus to monitor a particular k8s service
208+
resources:
209+
- kind: Pod
210+
version: v1
211+
specDescriptors:
212+
- description: Selector to select which namespaces the Endpoints objects are discovered from
213+
displayName: Monitoring Namespaces
214+
path: namespaceSelector
215+
x-descriptors:
216+
- 'urn:alm:descriptor:com.tectonic.ui:namespaceSelector'
217+
- description: The label to use to retrieve the job name from
218+
displayName: Job Label
219+
path: jobLabel
220+
x-descriptors:
221+
- 'urn:alm:descriptor:com.tectonic.ui:label'
222+
- description: A list of endpoints allowed as part of this ServiceMonitor
223+
displayName: Endpoints
224+
path: endpoints
225+
x-descriptors:
226+
- 'urn:alm:descriptor:com.tectonic.ui:endpointList'
227+
- name: alertmanagers.monitoring.coreos.com
228+
version: v1
229+
kind: Alertmanager
230+
displayName: Alert Manager
231+
description: Configures an Alert Manager for the namespace
232+
resources:
233+
- kind: Pod
234+
version: v1
235+
specDescriptors:
236+
- description: Desired number of Pods for the cluster
237+
displayName: Size
238+
path: replicas
239+
x-descriptors:
240+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: prometheusrules.monitoring.coreos.com
5+
spec:
6+
group: monitoring.coreos.com
7+
names:
8+
kind: PrometheusRule
9+
plural: prometheusrules
10+
scope: Namespaced
11+
validation:
12+
openAPIV3Schema:
13+
properties:
14+
spec:
15+
description: PrometheusRuleSpec contains specification parameters for a
16+
Rule.
17+
properties:
18+
groups:
19+
description: Content of Prometheus rule file
20+
items:
21+
description: RuleGroup is a list of sequentially evaluated recording
22+
and alerting rules.
23+
properties:
24+
interval:
25+
type: string
26+
name:
27+
type: string
28+
rules:
29+
items:
30+
description: Rule describes an alerting or recording rule.
31+
properties:
32+
alert:
33+
type: string
34+
annotations:
35+
type: object
36+
expr:
37+
type: string
38+
for:
39+
type: string
40+
labels:
41+
type: object
42+
record:
43+
type: string
44+
required:
45+
- expr
46+
type: array
47+
required:
48+
- name
49+
- rules
50+
type: array
51+
version: v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: servicemonitors.monitoring.coreos.com
5+
spec:
6+
group: monitoring.coreos.com
7+
names:
8+
kind: ServiceMonitor
9+
plural: servicemonitors
10+
scope: Namespaced
11+
validation:
12+
openAPIV3Schema:
13+
properties:
14+
spec:
15+
description: ServiceMonitorSpec contains specification parameters for a
16+
ServiceMonitor.
17+
properties:
18+
endpoints:
19+
description: A list of endpoints allowed as part of this ServiceMonitor.
20+
items:
21+
description: Endpoint defines a scrapeable endpoint serving Prometheus
22+
metrics.
23+
properties:
24+
basicAuth:
25+
description: 'BasicAuth allow an endpoint to authenticate over
26+
basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
27+
properties:
28+
password:
29+
description: SecretKeySelector selects a key of a Secret.
30+
properties:
31+
key:
32+
description: The key of the secret to select from. Must
33+
be a valid secret key.
34+
type: string
35+
name:
36+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
37+
type: string
38+
optional:
39+
description: Specify whether the Secret or it's key must
40+
be defined
41+
type: boolean
42+
required:
43+
- key
44+
username:
45+
description: SecretKeySelector selects a key of a Secret.
46+
properties:
47+
key:
48+
description: The key of the secret to select from. Must
49+
be a valid secret key.
50+
type: string
51+
name:
52+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
53+
type: string
54+
optional:
55+
description: Specify whether the Secret or it's key must
56+
be defined
57+
type: boolean
58+
required:
59+
- key
60+
bearerTokenFile:
61+
description: File to read bearer token for scraping targets.
62+
type: string
63+
honorLabels:
64+
description: HonorLabels chooses the metric's labels on collisions
65+
with target labels.
66+
type: boolean
67+
interval:
68+
description: Interval at which metrics should be scraped
69+
type: string
70+
metricRelabelings:
71+
description: MetricRelabelConfigs to apply to samples before ingestion.
72+
items:
73+
description: 'RelabelConfig allows dynamic rewriting of the
74+
label set, being applied to samples before ingestion. It defines
75+
`<metric_relabel_configs>`-section of Prometheus configuration.
76+
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
77+
properties:
78+
action:
79+
description: Action to perform based on regex matching.
80+
Default is 'replace'
81+
type: string
82+
modulus:
83+
description: Modulus to take of the hash of the source label
84+
values.
85+
format: int64
86+
type: integer
87+
regex:
88+
description: Regular expression against which the extracted
89+
value is matched. defailt is '(.*)'
90+
type: string
91+
replacement:
92+
description: Replacement value against which a regex replace
93+
is performed if the regular expression matches. Regex
94+
capture groups are available. Default is '$1'
95+
type: string
96+
separator:
97+
description: Separator placed between concatenated source
98+
label values. default is ';'.
99+
type: string
100+
sourceLabels:
101+
description: The source labels select values from existing
102+
labels. Their content is concatenated using the configured
103+
separator and matched against the configured regular expression
104+
for the replace, keep, and drop actions.
105+
items:
106+
type: string
107+
type: array
108+
targetLabel:
109+
description: Label to which the resulting value is written
110+
in a replace action. It is mandatory for replace actions.
111+
Regex capture groups are available.
112+
type: string
113+
type: array
114+
params:
115+
description: Optional HTTP URL parameters
116+
type: object
117+
path:
118+
description: HTTP path to scrape for metrics.
119+
type: string
120+
port:
121+
description: Name of the service port this endpoint refers to.
122+
Mutually exclusive with targetPort.
123+
type: string
124+
proxyUrl:
125+
description: ProxyURL eg http://proxyserver:2195 Directs scrapes
126+
to proxy through this endpoint.
127+
type: string
128+
scheme:
129+
description: HTTP scheme to use for scraping.
130+
type: string
131+
scrapeTimeout:
132+
description: Timeout after which the scrape is ended
133+
type: string
134+
targetPort:
135+
anyOf:
136+
- type: string
137+
- type: integer
138+
tlsConfig:
139+
description: TLSConfig specifies TLS configuration parameters.
140+
properties:
141+
caFile:
142+
description: The CA cert to use for the targets.
143+
type: string
144+
certFile:
145+
description: The client cert file for the targets.
146+
type: string
147+
insecureSkipVerify:
148+
description: Disable target certificate validation.
149+
type: boolean
150+
keyFile:
151+
description: The client key file for the targets.
152+
type: string
153+
serverName:
154+
description: Used to verify the hostname for the targets.
155+
type: string
156+
type: array
157+
jobLabel:
158+
description: The label to use to retrieve the job name from.
159+
type: string
160+
namespaceSelector:
161+
description: A selector for selecting namespaces either selecting all
162+
namespaces or a list of namespaces.
163+
properties:
164+
any:
165+
description: Boolean describing whether all namespaces are selected
166+
in contrast to a list restricting them.
167+
type: boolean
168+
matchNames:
169+
description: List of namespace names.
170+
items:
171+
type: string
172+
type: array
173+
selector:
174+
description: A label selector is a label query over a set of resources.
175+
The result of matchLabels and matchExpressions are ANDed. An empty
176+
label selector matches all objects. A null label selector matches
177+
no objects.
178+
properties:
179+
matchExpressions:
180+
description: matchExpressions is a list of label selector requirements.
181+
The requirements are ANDed.
182+
items:
183+
description: A label selector requirement is a selector that contains
184+
values, a key, and an operator that relates the key and values.
185+
properties:
186+
key:
187+
description: key is the label key that the selector applies
188+
to.
189+
type: string
190+
operator:
191+
description: operator represents a key's relationship to a
192+
set of values. Valid operators are In, NotIn, Exists and
193+
DoesNotExist.
194+
type: string
195+
values:
196+
description: values is an array of string values. If the operator
197+
is In or NotIn, the values array must be non-empty. If the
198+
operator is Exists or DoesNotExist, the values array must
199+
be empty. This array is replaced during a strategic merge
200+
patch.
201+
items:
202+
type: string
203+
type: array
204+
required:
205+
- key
206+
- operator
207+
type: array
208+
matchLabels:
209+
description: matchLabels is a map of {key,value} pairs. A single
210+
{key,value} in the matchLabels map is equivalent to an element
211+
of matchExpressions, whose key field is "key", the operator is
212+
"In", and the values array contains only "value". The requirements
213+
are ANDed.
214+
type: object
215+
targetLabels:
216+
description: TargetLabels transfers labels on the Kubernetes Service
217+
onto the target.
218+
items:
219+
type: string
220+
type: array
221+
required:
222+
- endpoints
223+
- selector
224+
version: v1

‎pkg/sqlite/testdata/loader_data/prometheus/0.15.0/alertmanager.crd.yaml

+2,398
Large diffs are not rendered by default.

‎pkg/sqlite/testdata/loader_data/prometheus/0.15.0/prometheus.crd.yaml

+2,971
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
#! parse-kind: ClusterServiceVersion
2+
apiVersion: operators.coreos.com/v1alpha1
3+
kind: ClusterServiceVersion
4+
metadata:
5+
name: prometheusoperator.0.15.0
6+
namespace: placeholder
7+
annotations:
8+
tectonic-visibility: ocs
9+
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v1.7.0","serviceAccountName":"prometheus-k8s","serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
10+
spec:
11+
replaces: prometheusoperator.0.14.0
12+
displayName: Prometheus
13+
description: |
14+
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
15+
16+
_The Prometheus Open Cloud Service is Public Alpha. The goal before Beta is for additional user testing and minor bug fixes._
17+
18+
### Monitoring applications
19+
20+
Prometheus scrapes your application metrics based on targets maintained in a ServiceMonitor object. When alerts need to be sent, they are processsed by an AlertManager.
21+
22+
[Read the complete guide to monitoring applications with the Prometheus Open Cloud Service](https://coreos.com/tectonic/docs/latest/alm/prometheus-ocs.html)
23+
24+
### Supported Features
25+
26+
27+
**High availability**
28+
29+
30+
Multiple instances are run across failure zones and data is replicated. This keeps your monitoring available during an outage, when you need it most.
31+
32+
33+
**Updates via automated operations**
34+
35+
36+
New Prometheus versions are deployed using a rolling update with no downtime, making it easy to stay up to date.
37+
38+
39+
**Handles the dynamic nature of containers**
40+
41+
42+
Alerting rules are attached to groups of containers instead of individual instances, which is ideal for the highly dynamic nature of container deployment.
43+
44+
keywords: ['prometheus', 'monitoring', 'tsdb', 'alerting']
45+
46+
maintainers:
47+
- name: CoreOS, Inc
48+
email: support@coreos.com
49+
50+
provider:
51+
name: CoreOS, Inc
52+
53+
links:
54+
- name: Prometheus
55+
url: https://www.prometheus.io/
56+
- name: Documentation
57+
url: https://coreos.com/operators/prometheus/docs/latest/
58+
- name: Prometheus Operator Source Code
59+
url: https://github.com/coreos/prometheus-operator
60+
61+
labels:
62+
alm-status-descriptors: prometheusoperator.0.15.0
63+
alm-owner-prometheus: prometheusoperator
64+
65+
selector:
66+
matchLabels:
67+
alm-owner-prometheus: prometheusoperator
68+
69+
icon:
70+
- base64data: PHN2ZyB3aWR0aD0iMjQ5MCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTEyOC4wMDEuNjY3QzU3LjMxMS42NjcgMCA1Ny45NzEgMCAxMjguNjY0YzAgNzAuNjkgNTcuMzExIDEyNy45OTggMTI4LjAwMSAxMjcuOTk4UzI1NiAxOTkuMzU0IDI1NiAxMjguNjY0QzI1NiA1Ny45NyAxOTguNjg5LjY2NyAxMjguMDAxLjY2N3ptMCAyMzkuNTZjLTIwLjExMiAwLTM2LjQxOS0xMy40MzUtMzYuNDE5LTMwLjAwNGg3Mi44MzhjMCAxNi41NjYtMTYuMzA2IDMwLjAwNC0zNi40MTkgMzAuMDA0em02MC4xNTMtMzkuOTRINjcuODQyVjE3OC40N2gxMjAuMzE0djIxLjgxNmgtLjAwMnptLS40MzItMzMuMDQ1SDY4LjE4NWMtLjM5OC0uNDU4LS44MDQtLjkxLTEuMTg4LTEuMzc1LTEyLjMxNS0xNC45NTQtMTUuMjE2LTIyLjc2LTE4LjAzMi0zMC43MTYtLjA0OC0uMjYyIDE0LjkzMyAzLjA2IDI1LjU1NiA1LjQ1IDAgMCA1LjQ2NiAxLjI2NSAxMy40NTggMi43MjItNy42NzMtOC45OTQtMTIuMjMtMjAuNDI4LTEyLjIzLTMyLjExNiAwLTI1LjY1OCAxOS42OC00OC4wNzkgMTIuNTgtNjYuMjAxIDYuOTEuNTYyIDE0LjMgMTQuNTgzIDE0LjggMzYuNTA1IDcuMzQ2LTEwLjE1MiAxMC40Mi0yOC42OSAxMC40Mi00MC4wNTYgMC0xMS43NjkgNy43NTUtMjUuNDQgMTUuNTEyLTI1LjkwNy02LjkxNSAxMS4zOTYgMS43OSAyMS4xNjUgOS41MyA0NS40IDIuOTAyIDkuMTAzIDIuNTMyIDI0LjQyMyA0Ljc3MiAzNC4xMzguNzQ0LTIwLjE3OCA0LjIxMy00OS42MiAxNy4wMTQtNTkuNzg0LTUuNjQ3IDEyLjguODM2IDI4LjgxOCA1LjI3IDM2LjUxOCA3LjE1NCAxMi40MjQgMTEuNDkgMjEuODM2IDExLjQ5IDM5LjYzOCAwIDExLjkzNi00LjQwNyAyMy4xNzMtMTEuODQgMzEuOTU4IDguNDUyLTEuNTg2IDE0LjI4OS0zLjAxNiAxNC4yODktMy4wMTZsMjcuNDUtNS4zNTVjLjAwMi0uMDAyLTMuOTg3IDE2LjQwMS0xOS4zMTQgMzIuMTk3eiIgZmlsbD0iI0RBNEUzMSIvPjwvc3ZnPg==
71+
mediatype: image/svg+xml
72+
73+
install:
74+
strategy: deployment
75+
spec:
76+
permissions:
77+
- serviceAccountName: prometheus-k8s
78+
rules:
79+
- apiGroups: [""]
80+
resources:
81+
- nodes
82+
- services
83+
- endpoints
84+
- pods
85+
verbs: ["get", "list", "watch"]
86+
- apiGroups: [""]
87+
resources:
88+
- configmaps
89+
verbs: ["get"]
90+
- serviceAccountName: prometheus-operator-0-14-0
91+
rules:
92+
- apiGroups:
93+
- apiextensions.k8s.io
94+
resources:
95+
- customresourcedefinitions
96+
verbs: ["get", "list"]
97+
- apiGroups:
98+
- monitoring.coreos.com
99+
resources:
100+
- alertmanagers
101+
- prometheuses
102+
- servicemonitors
103+
verbs:
104+
- "*"
105+
- apiGroups:
106+
- apps
107+
resources:
108+
- statefulsets
109+
verbs: ["*"]
110+
- apiGroups: [""]
111+
resources:
112+
- configmaps
113+
- secrets
114+
verbs: ["*"]
115+
- apiGroups: [""]
116+
resources:
117+
- pods
118+
verbs: ["list", "delete"]
119+
- apiGroups: [""]
120+
resources:
121+
- services
122+
- endpoints
123+
verbs: ["get", "create", "update"]
124+
- apiGroups: [""]
125+
resources:
126+
- nodes
127+
verbs: ["list", "watch"]
128+
- apiGroups: [""]
129+
resources:
130+
- namespaces
131+
verbs: ['list']
132+
deployments:
133+
- name: prometheus-operator
134+
spec:
135+
replicas: 1
136+
selector:
137+
matchLabels:
138+
k8s-app: prometheus-operator
139+
template:
140+
metadata:
141+
labels:
142+
k8s-app: prometheus-operator
143+
spec:
144+
serviceAccount: prometheus-operator-0-14-0
145+
containers:
146+
- name: prometheus-operator
147+
image: quay.io/coreos/prometheus-operator@sha256:0e92dd9b5789c4b13d53e1319d0a6375bcca4caaf0d698af61198061222a576d
148+
command:
149+
- sh
150+
- -c
151+
- >
152+
/bin/operator --namespace=$K8S_NAMESPACE --crd-apigroup monitoring.coreos.com
153+
--labels alm-status-descriptors=prometheusoperator.0.15.0,alm-owner-prometheus=prometheusoperator
154+
--kubelet-service=kube-system/kubelet
155+
--config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
156+
env:
157+
- name: K8S_NAMESPACE
158+
valueFrom:
159+
fieldRef:
160+
fieldPath: metadata.namespace
161+
ports:
162+
- containerPort: 8080
163+
name: http
164+
resources:
165+
limits:
166+
cpu: 200m
167+
memory: 100Mi
168+
requests:
169+
cpu: 100m
170+
memory: 50Mi
171+
maturity: alpha
172+
version: 0.15.0
173+
customresourcedefinitions:
174+
owned:
175+
- name: prometheuses.monitoring.coreos.com
176+
version: v1
177+
kind: Prometheus
178+
displayName: Prometheus
179+
description: A running Prometheus instance
180+
resources:
181+
- kind: StatefulSet
182+
version: v1beta2
183+
- kind: Pod
184+
version: v1
185+
specDescriptors:
186+
- description: Desired number of Pods for the cluster
187+
displayName: Size
188+
path: replicas
189+
x-descriptors:
190+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
191+
- description: A selector for the ConfigMaps from which to load rule files
192+
displayName: Rule Config Map Selector
193+
path: ruleSelector
194+
x-descriptors:
195+
- 'urn:alm:descriptor:com.tectonic.ui:selector:core:v1:ConfigMap'
196+
- description: ServiceMonitors to be selected for target discovery
197+
displayName: Service Monitor Selector
198+
path: serviceMonitorSelector
199+
x-descriptors:
200+
- 'urn:alm:descriptor:com.tectonic.ui:selector:monitoring.coreos.com:v1:ServiceMonitor'
201+
- description: The ServiceAccount to use to run the Prometheus pods
202+
displayName: Service Account
203+
path: serviceAccountName
204+
x-descriptors:
205+
- 'urn:alm:descriptor:io.kubernetes:ServiceAccount'
206+
- description: Limits describes the minimum/maximum amount of compute resources required/allowed
207+
displayName: Resource Requirements
208+
path: resources
209+
x-descriptors:
210+
- 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
211+
statusDescriptors:
212+
- description: The current number of Pods for the cluster
213+
displayName: Cluster Size
214+
path: replicas
215+
- path: prometheusSelector
216+
displayName: Prometheus Service Selector
217+
description: Label selector to find the service that routes to this prometheus
218+
x-descriptors:
219+
- 'urn:alm:descriptor:label:selector'
220+
- name: servicemonitors.monitoring.coreos.com
221+
version: v1
222+
kind: ServiceMonitor
223+
displayName: Service Monitor
224+
description: Configures prometheus to monitor a particular k8s service
225+
resources:
226+
- kind: Pod
227+
version: v1
228+
specDescriptors:
229+
- description: Selector to select which namespaces the Endpoints objects are discovered from
230+
displayName: Monitoring Namespaces
231+
path: namespaceSelector
232+
x-descriptors:
233+
- 'urn:alm:descriptor:com.tectonic.ui:namespaceSelector'
234+
- description: The label to use to retrieve the job name from
235+
displayName: Job Label
236+
path: jobLabel
237+
x-descriptors:
238+
- 'urn:alm:descriptor:com.tectonic.ui:label'
239+
- description: A list of endpoints allowed as part of this ServiceMonitor
240+
displayName: Endpoints
241+
path: endpoints
242+
x-descriptors:
243+
- 'urn:alm:descriptor:com.tectonic.ui:endpointList'
244+
- name: alertmanagers.monitoring.coreos.com
245+
version: v1
246+
kind: Alertmanager
247+
displayName: Alert Manager
248+
description: Configures an Alert Manager for the namespace
249+
resources:
250+
- kind: StatefulSet
251+
version: v1beta2
252+
- kind: Pod
253+
version: v1
254+
specDescriptors:
255+
- description: Desired number of Pods for the cluster
256+
displayName: Size
257+
path: replicas
258+
x-descriptors:
259+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
260+
- description: Limits describes the minimum/maximum amount of compute resources required/allowed
261+
displayName: Resource Requirements
262+
path: resources
263+
x-descriptors:
264+
- 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: prometheusrules.monitoring.coreos.com
5+
spec:
6+
group: monitoring.coreos.com
7+
names:
8+
kind: PrometheusRule
9+
plural: prometheusrules
10+
scope: Namespaced
11+
validation:
12+
openAPIV3Schema:
13+
properties:
14+
spec:
15+
description: PrometheusRuleSpec contains specification parameters for a
16+
Rule.
17+
properties:
18+
groups:
19+
description: Content of Prometheus rule file
20+
items:
21+
description: RuleGroup is a list of sequentially evaluated recording
22+
and alerting rules.
23+
properties:
24+
interval:
25+
type: string
26+
name:
27+
type: string
28+
rules:
29+
items:
30+
description: Rule describes an alerting or recording rule.
31+
properties:
32+
alert:
33+
type: string
34+
annotations:
35+
type: object
36+
expr:
37+
type: string
38+
for:
39+
type: string
40+
labels:
41+
type: object
42+
record:
43+
type: string
44+
required:
45+
- expr
46+
type: array
47+
required:
48+
- name
49+
- rules
50+
type: array
51+
version: v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: servicemonitors.monitoring.coreos.com
5+
spec:
6+
group: monitoring.coreos.com
7+
names:
8+
kind: ServiceMonitor
9+
plural: servicemonitors
10+
scope: Namespaced
11+
validation:
12+
openAPIV3Schema:
13+
properties:
14+
spec:
15+
description: ServiceMonitorSpec contains specification parameters for a
16+
ServiceMonitor.
17+
properties:
18+
endpoints:
19+
description: A list of endpoints allowed as part of this ServiceMonitor.
20+
items:
21+
description: Endpoint defines a scrapeable endpoint serving Prometheus
22+
metrics.
23+
properties:
24+
basicAuth:
25+
description: 'BasicAuth allow an endpoint to authenticate over
26+
basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
27+
properties:
28+
password:
29+
description: SecretKeySelector selects a key of a Secret.
30+
properties:
31+
key:
32+
description: The key of the secret to select from. Must
33+
be a valid secret key.
34+
type: string
35+
name:
36+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
37+
type: string
38+
optional:
39+
description: Specify whether the Secret or it's key must
40+
be defined
41+
type: boolean
42+
required:
43+
- key
44+
username:
45+
description: SecretKeySelector selects a key of a Secret.
46+
properties:
47+
key:
48+
description: The key of the secret to select from. Must
49+
be a valid secret key.
50+
type: string
51+
name:
52+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
53+
type: string
54+
optional:
55+
description: Specify whether the Secret or it's key must
56+
be defined
57+
type: boolean
58+
required:
59+
- key
60+
bearerTokenFile:
61+
description: File to read bearer token for scraping targets.
62+
type: string
63+
honorLabels:
64+
description: HonorLabels chooses the metric's labels on collisions
65+
with target labels.
66+
type: boolean
67+
interval:
68+
description: Interval at which metrics should be scraped
69+
type: string
70+
metricRelabelings:
71+
description: MetricRelabelConfigs to apply to samples before ingestion.
72+
items:
73+
description: 'RelabelConfig allows dynamic rewriting of the
74+
label set, being applied to samples before ingestion. It defines
75+
`<metric_relabel_configs>`-section of Prometheus configuration.
76+
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
77+
properties:
78+
action:
79+
description: Action to perform based on regex matching.
80+
Default is 'replace'
81+
type: string
82+
modulus:
83+
description: Modulus to take of the hash of the source label
84+
values.
85+
format: int64
86+
type: integer
87+
regex:
88+
description: Regular expression against which the extracted
89+
value is matched. defailt is '(.*)'
90+
type: string
91+
replacement:
92+
description: Replacement value against which a regex replace
93+
is performed if the regular expression matches. Regex
94+
capture groups are available. Default is '$1'
95+
type: string
96+
separator:
97+
description: Separator placed between concatenated source
98+
label values. default is ';'.
99+
type: string
100+
sourceLabels:
101+
description: The source labels select values from existing
102+
labels. Their content is concatenated using the configured
103+
separator and matched against the configured regular expression
104+
for the replace, keep, and drop actions.
105+
items:
106+
type: string
107+
type: array
108+
targetLabel:
109+
description: Label to which the resulting value is written
110+
in a replace action. It is mandatory for replace actions.
111+
Regex capture groups are available.
112+
type: string
113+
type: array
114+
params:
115+
description: Optional HTTP URL parameters
116+
type: object
117+
path:
118+
description: HTTP path to scrape for metrics.
119+
type: string
120+
port:
121+
description: Name of the service port this endpoint refers to.
122+
Mutually exclusive with targetPort.
123+
type: string
124+
proxyUrl:
125+
description: ProxyURL eg http://proxyserver:2195 Directs scrapes
126+
to proxy through this endpoint.
127+
type: string
128+
scheme:
129+
description: HTTP scheme to use for scraping.
130+
type: string
131+
scrapeTimeout:
132+
description: Timeout after which the scrape is ended
133+
type: string
134+
targetPort:
135+
anyOf:
136+
- type: string
137+
- type: integer
138+
tlsConfig:
139+
description: TLSConfig specifies TLS configuration parameters.
140+
properties:
141+
caFile:
142+
description: The CA cert to use for the targets.
143+
type: string
144+
certFile:
145+
description: The client cert file for the targets.
146+
type: string
147+
insecureSkipVerify:
148+
description: Disable target certificate validation.
149+
type: boolean
150+
keyFile:
151+
description: The client key file for the targets.
152+
type: string
153+
serverName:
154+
description: Used to verify the hostname for the targets.
155+
type: string
156+
type: array
157+
jobLabel:
158+
description: The label to use to retrieve the job name from.
159+
type: string
160+
namespaceSelector:
161+
description: A selector for selecting namespaces either selecting all
162+
namespaces or a list of namespaces.
163+
properties:
164+
any:
165+
description: Boolean describing whether all namespaces are selected
166+
in contrast to a list restricting them.
167+
type: boolean
168+
matchNames:
169+
description: List of namespace names.
170+
items:
171+
type: string
172+
type: array
173+
selector:
174+
description: A label selector is a label query over a set of resources.
175+
The result of matchLabels and matchExpressions are ANDed. An empty
176+
label selector matches all objects. A null label selector matches
177+
no objects.
178+
properties:
179+
matchExpressions:
180+
description: matchExpressions is a list of label selector requirements.
181+
The requirements are ANDed.
182+
items:
183+
description: A label selector requirement is a selector that contains
184+
values, a key, and an operator that relates the key and values.
185+
properties:
186+
key:
187+
description: key is the label key that the selector applies
188+
to.
189+
type: string
190+
operator:
191+
description: operator represents a key's relationship to a
192+
set of values. Valid operators are In, NotIn, Exists and
193+
DoesNotExist.
194+
type: string
195+
values:
196+
description: values is an array of string values. If the operator
197+
is In or NotIn, the values array must be non-empty. If the
198+
operator is Exists or DoesNotExist, the values array must
199+
be empty. This array is replaced during a strategic merge
200+
patch.
201+
items:
202+
type: string
203+
type: array
204+
required:
205+
- key
206+
- operator
207+
type: array
208+
matchLabels:
209+
description: matchLabels is a map of {key,value} pairs. A single
210+
{key,value} in the matchLabels map is equivalent to an element
211+
of matchExpressions, whose key field is "key", the operator is
212+
"In", and the values array contains only "value". The requirements
213+
are ANDed.
214+
type: object
215+
targetLabels:
216+
description: TargetLabels transfers labels on the Kubernetes Service
217+
onto the target.
218+
items:
219+
type: string
220+
type: array
221+
required:
222+
- endpoints
223+
- selector
224+
version: v1

‎pkg/sqlite/testdata/loader_data/prometheus/0.22.2/alertmanager.crd.yaml

+2,398
Large diffs are not rendered by default.

‎pkg/sqlite/testdata/loader_data/prometheus/0.22.2/prometheus.crd.yaml

+2,971
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
#! parse-kind: ClusterServiceVersion
2+
apiVersion: operators.coreos.com/v1alpha1
3+
kind: ClusterServiceVersion
4+
metadata:
5+
name: prometheusoperator.0.22.2
6+
namespace: placeholder
7+
annotations:
8+
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v2.3.2","serviceAccountName":"prometheus-k8s","securityContext": {}, "serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus"}},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3, "securityContext": {}}}]'
9+
spec:
10+
replaces: prometheusoperator.0.15.0
11+
displayName: Prometheus Operator
12+
description: |
13+
The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.
14+
15+
Once installed, the Prometheus Operator provides the following features:
16+
17+
* **Create/Destroy**: Easily launch a Prometheus instance for your Kubernetes namespace, a specific application or team easily using the Operator.
18+
19+
* **Simple Configuration**: Configure the fundamentals of Prometheus like versions, persistence, retention policies, and replicas from a native Kubernetes resource.
20+
21+
* **Target Services via Labels**: Automatically generate monitoring target configurations based on familiar Kubernetes label queries; no need to learn a Prometheus specific configuration language.
22+
23+
### Other Supported Features
24+
25+
**High availability**
26+
27+
Multiple instances are run across failure zones and data is replicated. This keeps your monitoring available during an outage, when you need it most.
28+
29+
**Updates via automated operations**
30+
31+
New Prometheus versions are deployed using a rolling update with no downtime, making it easy to stay up to date.
32+
33+
**Handles the dynamic nature of containers**
34+
35+
Alerting rules are attached to groups of containers instead of individual instances, which is ideal for the highly dynamic nature of container deployment.
36+
37+
keywords: ['prometheus', 'monitoring', 'tsdb', 'alerting']
38+
39+
maintainers:
40+
- name: Red Hat
41+
email: openshift-operators@redhat.com
42+
43+
provider:
44+
name: Red Hat
45+
46+
links:
47+
- name: Prometheus
48+
url: https://www.prometheus.io/
49+
- name: Documentation
50+
url: https://coreos.com/operators/prometheus/docs/latest/
51+
- name: Prometheus Operator
52+
url: https://github.com/coreos/prometheus-operator
53+
54+
labels:
55+
alm-status-descriptors: prometheusoperator.0.22.2
56+
alm-owner-prometheus: prometheusoperator
57+
58+
selector:
59+
matchLabels:
60+
alm-owner-prometheus: prometheusoperator
61+
62+
icon:
63+
- base64data: PHN2ZyB3aWR0aD0iMjQ5MCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTEyOC4wMDEuNjY3QzU3LjMxMS42NjcgMCA1Ny45NzEgMCAxMjguNjY0YzAgNzAuNjkgNTcuMzExIDEyNy45OTggMTI4LjAwMSAxMjcuOTk4UzI1NiAxOTkuMzU0IDI1NiAxMjguNjY0QzI1NiA1Ny45NyAxOTguNjg5LjY2NyAxMjguMDAxLjY2N3ptMCAyMzkuNTZjLTIwLjExMiAwLTM2LjQxOS0xMy40MzUtMzYuNDE5LTMwLjAwNGg3Mi44MzhjMCAxNi41NjYtMTYuMzA2IDMwLjAwNC0zNi40MTkgMzAuMDA0em02MC4xNTMtMzkuOTRINjcuODQyVjE3OC40N2gxMjAuMzE0djIxLjgxNmgtLjAwMnptLS40MzItMzMuMDQ1SDY4LjE4NWMtLjM5OC0uNDU4LS44MDQtLjkxLTEuMTg4LTEuMzc1LTEyLjMxNS0xNC45NTQtMTUuMjE2LTIyLjc2LTE4LjAzMi0zMC43MTYtLjA0OC0uMjYyIDE0LjkzMyAzLjA2IDI1LjU1NiA1LjQ1IDAgMCA1LjQ2NiAxLjI2NSAxMy40NTggMi43MjItNy42NzMtOC45OTQtMTIuMjMtMjAuNDI4LTEyLjIzLTMyLjExNiAwLTI1LjY1OCAxOS42OC00OC4wNzkgMTIuNTgtNjYuMjAxIDYuOTEuNTYyIDE0LjMgMTQuNTgzIDE0LjggMzYuNTA1IDcuMzQ2LTEwLjE1MiAxMC40Mi0yOC42OSAxMC40Mi00MC4wNTYgMC0xMS43NjkgNy43NTUtMjUuNDQgMTUuNTEyLTI1LjkwNy02LjkxNSAxMS4zOTYgMS43OSAyMS4xNjUgOS41MyA0NS40IDIuOTAyIDkuMTAzIDIuNTMyIDI0LjQyMyA0Ljc3MiAzNC4xMzguNzQ0LTIwLjE3OCA0LjIxMy00OS42MiAxNy4wMTQtNTkuNzg0LTUuNjQ3IDEyLjguODM2IDI4LjgxOCA1LjI3IDM2LjUxOCA3LjE1NCAxMi40MjQgMTEuNDkgMjEuODM2IDExLjQ5IDM5LjYzOCAwIDExLjkzNi00LjQwNyAyMy4xNzMtMTEuODQgMzEuOTU4IDguNDUyLTEuNTg2IDE0LjI4OS0zLjAxNiAxNC4yODktMy4wMTZsMjcuNDUtNS4zNTVjLjAwMi0uMDAyLTMuOTg3IDE2LjQwMS0xOS4zMTQgMzIuMTk3eiIgZmlsbD0iI0RBNEUzMSIvPjwvc3ZnPg==
64+
mediatype: image/svg+xml
65+
66+
install:
67+
strategy: deployment
68+
spec:
69+
permissions:
70+
- serviceAccountName: prometheus-k8s
71+
rules:
72+
- apiGroups: [""]
73+
resources:
74+
- nodes
75+
- services
76+
- endpoints
77+
- pods
78+
verbs: ["get", "list", "watch"]
79+
- apiGroups: [""]
80+
resources:
81+
- configmaps
82+
verbs: ["get"]
83+
- serviceAccountName: prometheus-operator-0-22-2
84+
rules:
85+
- apiGroups:
86+
- apiextensions.k8s.io
87+
resources:
88+
- customresourcedefinitions
89+
verbs:
90+
- '*'
91+
- apiGroups:
92+
- monitoring.coreos.com
93+
resources:
94+
- alertmanagers
95+
- prometheuses
96+
- prometheuses/finalizers
97+
- alertmanagers/finalizers
98+
- servicemonitors
99+
- prometheusrules
100+
verbs:
101+
- '*'
102+
- apiGroups:
103+
- apps
104+
resources:
105+
- statefulsets
106+
verbs:
107+
- '*'
108+
- apiGroups:
109+
- ""
110+
resources:
111+
- configmaps
112+
- secrets
113+
verbs:
114+
- '*'
115+
- apiGroups:
116+
- ""
117+
resources:
118+
- pods
119+
verbs:
120+
- list
121+
- delete
122+
- apiGroups:
123+
- ""
124+
resources:
125+
- services
126+
- endpoints
127+
verbs:
128+
- get
129+
- create
130+
- update
131+
- apiGroups:
132+
- ""
133+
resources:
134+
- nodes
135+
verbs:
136+
- list
137+
- watch
138+
- apiGroups:
139+
- ""
140+
resources:
141+
- namespaces
142+
verbs:
143+
- list
144+
- watch
145+
deployments:
146+
- name: prometheus-operator
147+
spec:
148+
replicas: 1
149+
selector:
150+
matchLabels:
151+
k8s-app: prometheus-operator
152+
template:
153+
metadata:
154+
labels:
155+
k8s-app: prometheus-operator
156+
spec:
157+
serviceAccount: prometheus-operator-0-22-2
158+
containers:
159+
- name: prometheus-operator
160+
image: quay.io/coreos/prometheus-operator@sha256:3daa69a8c6c2f1d35dcf1fe48a7cd8b230e55f5229a1ded438f687debade5bcf
161+
args:
162+
- -namespace=$(K8S_NAMESPACE)
163+
- -manage-crds=false
164+
- -logtostderr=true
165+
- --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
166+
- --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.22.2
167+
env:
168+
- name: K8S_NAMESPACE
169+
valueFrom:
170+
fieldRef:
171+
fieldPath: metadata.namespace
172+
ports:
173+
- containerPort: 8080
174+
name: http
175+
resources:
176+
limits:
177+
cpu: 200m
178+
memory: 100Mi
179+
requests:
180+
cpu: 100m
181+
memory: 50Mi
182+
securityContext:
183+
allowPrivilegeEscalation: false
184+
readOnlyRootFilesystem: true
185+
nodeSelector:
186+
beta.kubernetes.io/os: linux
187+
maturity: beta
188+
version: 0.22.2
189+
customresourcedefinitions:
190+
owned:
191+
- name: prometheuses.monitoring.coreos.com
192+
version: v1
193+
kind: Prometheus
194+
displayName: Prometheus
195+
description: A running Prometheus instance
196+
resources:
197+
- kind: StatefulSet
198+
version: v1beta2
199+
- kind: Pod
200+
version: v1
201+
specDescriptors:
202+
- description: Desired number of Pods for the cluster
203+
displayName: Size
204+
path: replicas
205+
x-descriptors:
206+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
207+
- description: A selector for the ConfigMaps from which to load rule files
208+
displayName: Rule Config Map Selector
209+
path: ruleSelector
210+
x-descriptors:
211+
- 'urn:alm:descriptor:com.tectonic.ui:selector:core:v1:ConfigMap'
212+
- description: ServiceMonitors to be selected for target discovery
213+
displayName: Service Monitor Selector
214+
path: serviceMonitorSelector
215+
x-descriptors:
216+
- 'urn:alm:descriptor:com.tectonic.ui:selector:monitoring.coreos.com:v1:ServiceMonitor'
217+
- description: The ServiceAccount to use to run the Prometheus pods
218+
displayName: Service Account
219+
path: serviceAccountName
220+
x-descriptors:
221+
- 'urn:alm:descriptor:io.kubernetes:ServiceAccount'
222+
- description: Limits describes the minimum/maximum amount of compute resources required/allowed
223+
displayName: Resource Requirements
224+
path: resources
225+
x-descriptors:
226+
- 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
227+
- name: prometheusrules.monitoring.coreos.com
228+
version: v1
229+
kind: PrometheusRule
230+
displayName: Prometheus Rule
231+
description: A Prometheus Rule configures groups of sequentially evaluated recording and alerting rules.
232+
- name: servicemonitors.monitoring.coreos.com
233+
version: v1
234+
kind: ServiceMonitor
235+
displayName: Service Monitor
236+
description: Configures prometheus to monitor a particular k8s service
237+
resources:
238+
- kind: Pod
239+
version: v1
240+
specDescriptors:
241+
- description: The label to use to retrieve the job name from
242+
displayName: Job Label
243+
path: jobLabel
244+
x-descriptors:
245+
- 'urn:alm:descriptor:com.tectonic.ui:label'
246+
- description: A list of endpoints allowed as part of this ServiceMonitor
247+
displayName: Endpoints
248+
path: endpoints
249+
x-descriptors:
250+
- 'urn:alm:descriptor:com.tectonic.ui:endpointList'
251+
- name: alertmanagers.monitoring.coreos.com
252+
version: v1
253+
kind: Alertmanager
254+
displayName: Alertmanager
255+
description: Configures an Alertmanager for the namespace
256+
resources:
257+
- kind: StatefulSet
258+
version: v1beta2
259+
- kind: Pod
260+
version: v1
261+
specDescriptors:
262+
- description: Desired number of Pods for the cluster
263+
displayName: Size
264+
path: replicas
265+
x-descriptors:
266+
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
267+
- description: Limits describes the minimum/maximum amount of compute resources required/allowed
268+
displayName: Resource Requirements
269+
path: resources
270+
x-descriptors:
271+
- 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: prometheusrules.monitoring.coreos.com
5+
spec:
6+
group: monitoring.coreos.com
7+
names:
8+
kind: PrometheusRule
9+
plural: prometheusrules
10+
scope: Namespaced
11+
validation:
12+
openAPIV3Schema:
13+
properties:
14+
spec:
15+
description: PrometheusRuleSpec contains specification parameters for a
16+
Rule.
17+
properties:
18+
groups:
19+
description: Content of Prometheus rule file
20+
items:
21+
description: RuleGroup is a list of sequentially evaluated recording
22+
and alerting rules.
23+
properties:
24+
interval:
25+
type: string
26+
name:
27+
type: string
28+
rules:
29+
items:
30+
description: Rule describes an alerting or recording rule.
31+
properties:
32+
alert:
33+
type: string
34+
annotations:
35+
type: object
36+
expr:
37+
type: string
38+
for:
39+
type: string
40+
labels:
41+
type: object
42+
record:
43+
type: string
44+
required:
45+
- expr
46+
type: array
47+
required:
48+
- name
49+
- rules
50+
type: array
51+
version: v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: servicemonitors.monitoring.coreos.com
5+
spec:
6+
group: monitoring.coreos.com
7+
names:
8+
kind: ServiceMonitor
9+
plural: servicemonitors
10+
scope: Namespaced
11+
validation:
12+
openAPIV3Schema:
13+
properties:
14+
spec:
15+
description: ServiceMonitorSpec contains specification parameters for a
16+
ServiceMonitor.
17+
properties:
18+
endpoints:
19+
description: A list of endpoints allowed as part of this ServiceMonitor.
20+
items:
21+
description: Endpoint defines a scrapeable endpoint serving Prometheus
22+
metrics.
23+
properties:
24+
basicAuth:
25+
description: 'BasicAuth allow an endpoint to authenticate over
26+
basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
27+
properties:
28+
password:
29+
description: SecretKeySelector selects a key of a Secret.
30+
properties:
31+
key:
32+
description: The key of the secret to select from. Must
33+
be a valid secret key.
34+
type: string
35+
name:
36+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
37+
type: string
38+
optional:
39+
description: Specify whether the Secret or it's key must
40+
be defined
41+
type: boolean
42+
required:
43+
- key
44+
username:
45+
description: SecretKeySelector selects a key of a Secret.
46+
properties:
47+
key:
48+
description: The key of the secret to select from. Must
49+
be a valid secret key.
50+
type: string
51+
name:
52+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
53+
type: string
54+
optional:
55+
description: Specify whether the Secret or it's key must
56+
be defined
57+
type: boolean
58+
required:
59+
- key
60+
bearerTokenFile:
61+
description: File to read bearer token for scraping targets.
62+
type: string
63+
honorLabels:
64+
description: HonorLabels chooses the metric's labels on collisions
65+
with target labels.
66+
type: boolean
67+
interval:
68+
description: Interval at which metrics should be scraped
69+
type: string
70+
metricRelabelings:
71+
description: MetricRelabelConfigs to apply to samples before ingestion.
72+
items:
73+
description: 'RelabelConfig allows dynamic rewriting of the
74+
label set, being applied to samples before ingestion. It defines
75+
`<metric_relabel_configs>`-section of Prometheus configuration.
76+
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
77+
properties:
78+
action:
79+
description: Action to perform based on regex matching.
80+
Default is 'replace'
81+
type: string
82+
modulus:
83+
description: Modulus to take of the hash of the source label
84+
values.
85+
format: int64
86+
type: integer
87+
regex:
88+
description: Regular expression against which the extracted
89+
value is matched. defailt is '(.*)'
90+
type: string
91+
replacement:
92+
description: Replacement value against which a regex replace
93+
is performed if the regular expression matches. Regex
94+
capture groups are available. Default is '$1'
95+
type: string
96+
separator:
97+
description: Separator placed between concatenated source
98+
label values. default is ';'.
99+
type: string
100+
sourceLabels:
101+
description: The source labels select values from existing
102+
labels. Their content is concatenated using the configured
103+
separator and matched against the configured regular expression
104+
for the replace, keep, and drop actions.
105+
items:
106+
type: string
107+
type: array
108+
targetLabel:
109+
description: Label to which the resulting value is written
110+
in a replace action. It is mandatory for replace actions.
111+
Regex capture groups are available.
112+
type: string
113+
type: array
114+
params:
115+
description: Optional HTTP URL parameters
116+
type: object
117+
path:
118+
description: HTTP path to scrape for metrics.
119+
type: string
120+
port:
121+
description: Name of the service port this endpoint refers to.
122+
Mutually exclusive with targetPort.
123+
type: string
124+
proxyUrl:
125+
description: ProxyURL eg http://proxyserver:2195 Directs scrapes
126+
to proxy through this endpoint.
127+
type: string
128+
scheme:
129+
description: HTTP scheme to use for scraping.
130+
type: string
131+
scrapeTimeout:
132+
description: Timeout after which the scrape is ended
133+
type: string
134+
targetPort:
135+
anyOf:
136+
- type: string
137+
- type: integer
138+
tlsConfig:
139+
description: TLSConfig specifies TLS configuration parameters.
140+
properties:
141+
caFile:
142+
description: The CA cert to use for the targets.
143+
type: string
144+
certFile:
145+
description: The client cert file for the targets.
146+
type: string
147+
insecureSkipVerify:
148+
description: Disable target certificate validation.
149+
type: boolean
150+
keyFile:
151+
description: The client key file for the targets.
152+
type: string
153+
serverName:
154+
description: Used to verify the hostname for the targets.
155+
type: string
156+
type: array
157+
jobLabel:
158+
description: The label to use to retrieve the job name from.
159+
type: string
160+
namespaceSelector:
161+
description: A selector for selecting namespaces either selecting all
162+
namespaces or a list of namespaces.
163+
properties:
164+
any:
165+
description: Boolean describing whether all namespaces are selected
166+
in contrast to a list restricting them.
167+
type: boolean
168+
matchNames:
169+
description: List of namespace names.
170+
items:
171+
type: string
172+
type: array
173+
selector:
174+
description: A label selector is a label query over a set of resources.
175+
The result of matchLabels and matchExpressions are ANDed. An empty
176+
label selector matches all objects. A null label selector matches
177+
no objects.
178+
properties:
179+
matchExpressions:
180+
description: matchExpressions is a list of label selector requirements.
181+
The requirements are ANDed.
182+
items:
183+
description: A label selector requirement is a selector that contains
184+
values, a key, and an operator that relates the key and values.
185+
properties:
186+
key:
187+
description: key is the label key that the selector applies
188+
to.
189+
type: string
190+
operator:
191+
description: operator represents a key's relationship to a
192+
set of values. Valid operators are In, NotIn, Exists and
193+
DoesNotExist.
194+
type: string
195+
values:
196+
description: values is an array of string values. If the operator
197+
is In or NotIn, the values array must be non-empty. If the
198+
operator is Exists or DoesNotExist, the values array must
199+
be empty. This array is replaced during a strategic merge
200+
patch.
201+
items:
202+
type: string
203+
type: array
204+
required:
205+
- key
206+
- operator
207+
type: array
208+
matchLabels:
209+
description: matchLabels is a map of {key,value} pairs. A single
210+
{key,value} in the matchLabels map is equivalent to an element
211+
of matchExpressions, whose key field is "key", the operator is
212+
"In", and the values array contains only "value". The requirements
213+
are ANDed.
214+
type: object
215+
targetLabels:
216+
description: TargetLabels transfers labels on the Kubernetes Service
217+
onto the target.
218+
items:
219+
type: string
220+
type: array
221+
required:
222+
- endpoints
223+
- selector
224+
version: v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packageName: prometheus
2+
channels:
3+
- name: preview
4+
currentCSV: prometheusoperator.0.22.2

0 commit comments

Comments
 (0)
Please sign in to comment.