mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-16 09:16:38 +00:00
Documentation: add compatibility doc
This commit is contained in:
parent
417c70a8c7
commit
e41e9e3ff2
6 changed files with 102 additions and 8 deletions
26
Documentation/compatibility.md
Normal file
26
Documentation/compatibility.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Compatibility
|
||||
|
||||
The Prometheus Operator supports a number of Kubernetes and Prometheus releases.
|
||||
|
||||
## Kubernetes
|
||||
|
||||
The Prometheus Operator uses client-go to communicate with Kubernetes clusters. The supported Kubernetes cluster version is determined by client-go. The compatibility matrix for client-go and Kubernetes clusters can be found [here](https://github.com/kubernetes/client-go#compatibility-matrix). All additional compatibility is only best effort, or happens to still/already be supported. The currently used client-go version is "v4.0.0-beta.0".
|
||||
|
||||
## Prometheus
|
||||
|
||||
The versions of Prometheus compatible to be run with the Prometheus Operator are:
|
||||
|
||||
* v1.4.0
|
||||
* v1.4.1
|
||||
* v1.5.0
|
||||
* v1.5.1
|
||||
* v1.5.2
|
||||
* v1.5.3
|
||||
* v1.6.0
|
||||
* v1.6.1
|
||||
* v1.6.2
|
||||
* v1.6.3
|
||||
* v1.7.0
|
||||
* v1.7.1
|
||||
* v2.0.0-alpha.3
|
||||
* v2.0.0-beta.0
|
9
Makefile
9
Makefile
|
@ -49,12 +49,13 @@ promu:
|
|||
embedmd:
|
||||
@go get github.com/campoy/embedmd
|
||||
|
||||
apidocgen:
|
||||
@go install github.com/coreos/prometheus-operator/cmd/apidocgen
|
||||
po-docgen:
|
||||
@go install github.com/coreos/prometheus-operator/cmd/po-docgen
|
||||
|
||||
docs: embedmd apidocgen
|
||||
docs: embedmd po-docgen
|
||||
$(GOPATH)/bin/embedmd -w `find Documentation -name "*.md"`
|
||||
$(GOPATH)/bin/apidocgen pkg/client/monitoring/v1alpha1/types.go > Documentation/api.md
|
||||
$(GOPATH)/bin/po-docgen api pkg/client/monitoring/v1alpha1/types.go > Documentation/api.md
|
||||
$(GOPATH)/bin/po-docgen compatibility > Documentation/compatibility.md
|
||||
|
||||
generate: jsonnet-docker
|
||||
docker run --rm -v `pwd`:/go/src/github.com/coreos/prometheus-operator po-jsonnet make jsonnet generate-bundle docs
|
||||
|
|
|
@ -21,7 +21,6 @@ import (
|
|||
"go/doc"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
@ -48,17 +47,17 @@ var (
|
|||
selfLinks = map[string]string{}
|
||||
)
|
||||
|
||||
func main() {
|
||||
func printAPIDocs(path string) {
|
||||
fmt.Println(firstParagraph)
|
||||
|
||||
types := ParseDocumentationFrom(os.Args[1])
|
||||
types := ParseDocumentationFrom(path)
|
||||
for _, t := range types {
|
||||
strukt := t[0]
|
||||
selfLinks[strukt.Name] = "#" + strings.ToLower(strukt.Name)
|
||||
}
|
||||
|
||||
// we need to parse once more to now add the self links
|
||||
types = ParseDocumentationFrom(os.Args[1])
|
||||
types = ParseDocumentationFrom(path)
|
||||
|
||||
for _, t := range types {
|
||||
strukt := t[0]
|
39
cmd/po-docgen/compatibility.go
Normal file
39
cmd/po-docgen/compatibility.go
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Copyright 2016 The prometheus-operator 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 main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/coreos/prometheus-operator/pkg/prometheus"
|
||||
)
|
||||
|
||||
func printCompatMatrixDocs() {
|
||||
fmt.Println(`# Compatibility
|
||||
|
||||
The Prometheus Operator supports a number of Kubernetes and Prometheus releases.
|
||||
|
||||
## Kubernetes
|
||||
|
||||
The Prometheus Operator uses client-go to communicate with Kubernetes clusters. The supported Kubernetes cluster version is determined by client-go. The compatibility matrix for client-go and Kubernetes clusters can be found [here](https://github.com/kubernetes/client-go#compatibility-matrix). All additional compatibility is only best effort, or happens to still/already be supported. The currently used client-go version is "v4.0.0-beta.0".
|
||||
|
||||
## Prometheus
|
||||
|
||||
The versions of Prometheus compatible to be run with the Prometheus Operator are:
|
||||
`)
|
||||
for _, v := range prometheus.CompatibilityMatrix {
|
||||
fmt.Printf("* %s\n", v)
|
||||
}
|
||||
}
|
28
cmd/po-docgen/main.go
Normal file
28
cmd/po-docgen/main.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2016 The prometheus-operator 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 main
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
switch os.Args[1] {
|
||||
case "api":
|
||||
printAPIDocs(os.Args[2])
|
||||
case "compatibility":
|
||||
printCompatMatrixDocs()
|
||||
}
|
||||
}
|
|
@ -66,6 +66,7 @@ var (
|
|||
"v1.7.0",
|
||||
"v1.7.1",
|
||||
"v2.0.0-alpha.3",
|
||||
"v2.0.0-beta.0",
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue