1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 09:16:38 +00:00

Update openapi-gen

This commit is contained in:
Antoine Legrand 2018-01-30 15:33:39 +01:00
parent 2f273799ea
commit e61a163047
4 changed files with 80 additions and 3 deletions

View file

@ -112,7 +112,7 @@ helm-sync-s3:
helm/hack/helm-package.sh kube-prometheus helm/hack/helm-package.sh kube-prometheus
helm/hack/sync-repo.sh helm/hack/sync-repo.sh
generate-crd: openapi-gen po-crdgen generate-crd: generate-openapi po-crdgen
po-crdgen prometheus > example/prometheus-operator-crd/prometheus.crd.yaml po-crdgen prometheus > example/prometheus-operator-crd/prometheus.crd.yaml
po-crdgen alertmanager > example/prometheus-operator-crd/alertmanager.crd.yaml po-crdgen alertmanager > example/prometheus-operator-crd/alertmanager.crd.yaml
po-crdgen servicemonitor > example/prometheus-operator-crd/servicemonitor.crd.yaml po-crdgen servicemonitor > example/prometheus-operator-crd/servicemonitor.crd.yaml

View file

@ -862,6 +862,70 @@ spec:
the server serves requests under a different route prefix. For example the server serves requests under a different route prefix. For example
for use with `kubectl proxy`. for use with `kubectl proxy`.
type: string type: string
securityContext:
description: PodSecurityContext holds pod-level security attributes
and common container settings. Some fields are also present in container.securityContext. Field
values of container.securityContext take precedence over field values
of PodSecurityContext.
properties:
fsGroup:
description: |-
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:
1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----
If unset, the Kubelet will not modify the ownership and permissions of any volume.
format: int64
type: integer
runAsNonRoot:
description: Indicates that the container must run as a non-root
user. If true, the Kubelet will validate the image at runtime
to ensure that it does not run as UID 0 (root) and fail to start
the container if it does. If unset or false, no such validation
will be performed. May also be set in SecurityContext. If set
in both SecurityContext and PodSecurityContext, the value specified
in SecurityContext takes precedence.
type: boolean
runAsUser:
description: The UID to run the entrypoint of the container process.
Defaults to user specified in image metadata if unspecified. May
also be set in SecurityContext. If set in both SecurityContext
and PodSecurityContext, the value specified in SecurityContext
takes precedence for that container.
format: int64
type: integer
seLinuxOptions:
description: SELinuxOptions are the labels to be applied to the
container
properties:
level:
description: Level is SELinux level label that applies to the
container.
type: string
role:
description: Role is a SELinux role label that applies to the
container.
type: string
type:
description: Type is a SELinux type label that applies to the
container.
type: string
user:
description: User is a SELinux user label that applies to the
container.
type: string
supplementalGroups:
description: A list of groups applied to the first process run in
each container, in addition to the container's primary GID. If
unspecified, no groups will be added to any container.
items:
format: int64
type: integer
type: array
serviceAccountName:
description: ServiceAccountName is the name of the ServiceAccount to
use to run the Prometheus Pods.
type: string
storage: storage:
description: StorageSpec defines the configured storage for a group description: StorageSpec defines the configured storage for a group
Prometheus servers. Prometheus servers.

View file

@ -291,11 +291,24 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
}, },
}, },
}, },
"securityContext": {
SchemaProps: spec.SchemaProps{
Description: "SecurityContext holds pod-level security attributes and common container settings. This defaults to non root user with uid 1000 and gid 2000.",
Ref: ref("k8s.io/api/core/v1.PodSecurityContext"),
},
},
"serviceAccountName": {
SchemaProps: spec.SchemaProps{
Description: "ServiceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.",
Type: []string{"string"},
Format: "",
},
},
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.StorageSpec", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.StorageSpec", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
}, },
"github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.AlertmanagerStatus": { "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.AlertmanagerStatus": {
Schema: spec.Schema{ Schema: spec.Schema{

View file

@ -412,7 +412,7 @@ type AlertmanagerSpec struct {
Tolerations []v1.Toleration `json:"tolerations,omitempty"` Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// SecurityContext holds pod-level security attributes and common container settings. // SecurityContext holds pod-level security attributes and common container settings.
// This defaults to non root user with uid 1000 and gid 2000. // This defaults to non root user with uid 1000 and gid 2000.
SecurityContext *v1.PodSecurityContext SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"`
// ServiceAccountName is the name of the ServiceAccount to use to run the // ServiceAccountName is the name of the ServiceAccount to use to run the
// Prometheus Pods. // Prometheus Pods.
ServiceAccountName string `json:"serviceAccountName,omitempty"` ServiceAccountName string `json:"serviceAccountName,omitempty"`