kube-prometheus: Use locking mechanism for jsonnet dependencies

This commit is contained in:
Frederic Branczyk
2018-07-25 13:50:01 +02:00
parent 6f3eac5f4c
commit 9a011bb8ac
11 changed files with 30 additions and 113 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,4 @@
tmp/ tmp/
minikube-manifests/ minikube-manifests/
jsonnetfile.lock.json
vendor/ vendor/
./auth ./auth

View File

@@ -30,7 +30,7 @@ manifests: vendor example.jsonnet build.sh
rm -rf manifests rm -rf manifests
./build.sh ./build.sh
vendor: $(JB_BINARY) jsonnetfile.json vendor: $(JB_BINARY) jsonnetfile.json jsonnetfile.lock.json
rm -rf vendor rm -rf vendor
$(JB_BINARY) install $(JB_BINARY) install

View File

@@ -38,7 +38,7 @@
"subdir": "jsonnet/prometheus-operator" "subdir": "jsonnet/prometheus-operator"
} }
}, },
"version": "master" "version": "v0.22.2"
}, },
{ {
"name": "etcd-mixin", "name": "etcd-mixin",

View File

@@ -9,16 +9,6 @@
} }
}, },
"version": "." "version": "."
},
{
"name": "prometheus-operator",
"source": {
"git": {
"remote": "../../",
"subdir": "jsonnet/prometheus-operator"
}
},
"version": "."
} }
] ]
} }

14
jsonnetfile.lock.json Normal file
View File

@@ -0,0 +1,14 @@
{
"dependencies": [
{
"name": "kube-prometheus",
"source": {
"git": {
"remote": "../../",
"subdir": "contrib/kube-prometheus/jsonnet/kube-prometheus"
}
},
"version": "ca9cf6257548c30a6d3d6e926f38498f96cc3525"
}
]
}

View File

@@ -23,8 +23,8 @@ spec:
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string type: string
spec: spec:
description: 'AlertmanagerSpec is a specification of the desired behavior description: 'Specification of the desired behavior of the Alertmanager
of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status'
properties: properties:
affinity: affinity:
description: Affinity is a group of affinity scheduling rules. description: Affinity is a group of affinity scheduling rules.
@@ -2372,9 +2372,9 @@ spec:
description: Version the cluster should be on. description: Version the cluster should be on.
type: string type: string
status: status:
description: 'AlertmanagerStatus is the most recent observed status of the description: 'Most recent observed status of the Alertmanager cluster. Read-only.
Alertmanager cluster. Read-only. Not included when requesting from the Not included when requesting from the apiserver, only from the Prometheus
apiserver, only from the Prometheus Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status'
properties: properties:
availableReplicas: availableReplicas:
description: Total number of available pods (ready for at least minReadySeconds) description: Total number of available pods (ready for at least minReadySeconds)

View File

@@ -23,8 +23,8 @@ spec:
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string type: string
spec: spec:
description: 'PrometheusSpec is a specification of the desired behavior description: 'Specification of the desired behavior of the Prometheus cluster.
of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status'
properties: properties:
additionalAlertManagerConfigs: additionalAlertManagerConfigs:
description: SecretKeySelector selects a key of a Secret. description: SecretKeySelector selects a key of a Secret.
@@ -671,76 +671,6 @@ spec:
type: array type: array
required: required:
- alertmanagers - alertmanagers
apiserverConfig:
description: 'APIServerConfig defines a host and auth methods to access
apiserver. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config'
properties:
basicAuth:
description: 'BasicAuth allow an endpoint to authenticate over basic
authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
properties:
password:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
optional:
description: Specify whether the Secret or it's key must
be defined
type: boolean
required:
- key
username:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
optional:
description: Specify whether the Secret or it's key must
be defined
type: boolean
required:
- key
bearerToken:
description: Bearer token for accessing apiserver.
type: string
bearerTokenFile:
description: File to read bearer token for accessing apiserver.
type: string
host:
description: Host of apiserver. A valid string consisting of a hostname
or IP followed by an optional port number
type: string
tlsConfig:
description: TLSConfig specifies TLS configuration parameters.
properties:
caFile:
description: The CA cert to use for the targets.
type: string
certFile:
description: The client cert file for the targets.
type: string
insecureSkipVerify:
description: Disable target certificate validation.
type: boolean
keyFile:
description: The client key file for the targets.
type: string
serverName:
description: Used to verify the hostname for the targets.
type: string
required:
- host
baseImage: baseImage:
description: Base image to use for a Prometheus deployment. description: Base image to use for a Prometheus deployment.
type: string type: string
@@ -2932,7 +2862,7 @@ spec:
description: Peers is a DNS name for Thanos to discover peers through. description: Peers is a DNS name for Thanos to discover peers through.
type: string type: string
s3: s3:
description: ThanosS3Spec defines parameters for of AWS Simple Storage description: ThanosSpec defines parameters for of AWS Simple Storage
Service (S3) with Thanos. (S3 compatible services apply as well) Service (S3) with Thanos. (S3 compatible services apply as well)
properties: properties:
accessKey: accessKey:
@@ -3031,9 +2961,9 @@ spec:
description: Version of Prometheus to be deployed. description: Version of Prometheus to be deployed.
type: string type: string
status: status:
description: 'PrometheusStatus is the most recent observed status of the description: 'Most recent observed status of the Prometheus cluster. Read-only.
Prometheus cluster. Read-only. Not included when requesting from the apiserver, Not included when requesting from the apiserver, only from the Prometheus
only from the Prometheus Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status'
properties: properties:
availableReplicas: availableReplicas:
description: Total number of available pods (ready for at least minReadySeconds) description: Total number of available pods (ready for at least minReadySeconds)

View File

@@ -169,7 +169,7 @@ spec:
description: The label to use to retrieve the job name from. description: The label to use to retrieve the job name from.
type: string type: string
namespaceSelector: namespaceSelector:
description: NamespaceSelector is a selector for selecting either all description: A selector for selecting namespaces either selecting all
namespaces or a list of namespaces. namespaces or a list of namespaces.
properties: properties:
any: any:

View File

@@ -18,7 +18,6 @@ spec:
containers: containers:
- args: - args:
- --kubelet-service=kube-system/kubelet - --kubelet-service=kube-system/kubelet
- -logtostderr=true
- --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1 - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
- --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.22.2 - --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.22.2
image: quay.io/coreos/prometheus-operator:v0.22.2 image: quay.io/coreos/prometheus-operator:v0.22.2
@@ -29,13 +28,10 @@ spec:
resources: resources:
limits: limits:
cpu: 200m cpu: 200m
memory: 200Mi memory: 100Mi
requests: requests:
cpu: 100m cpu: 100m
memory: 100Mi memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
nodeSelector: nodeSelector:
beta.kubernetes.io/os: linux beta.kubernetes.io/os: linux
securityContext: securityContext:

View File

@@ -34,9 +34,6 @@ rules:
- apps - apps
resources: resources:
- statefulsets - statefulsets
- daemonsets
- deployments
- replicasets
verbs: verbs:
- list - list
- watch - watch

View File

@@ -19,12 +19,3 @@ rules:
verbs: verbs:
- get - get
- update - update
- apiGroups:
- apps
resourceNames:
- kube-state-metrics
resources:
- deployments
verbs:
- get
- update