Skip to content

Commit

Permalink
Merge pull request #388 from VictoriaMetrics/updates-vmauth-config-gen
Browse files Browse the repository at this point in the history
updates vmauth config gen
  • Loading branch information
f41gh7 committed Nov 30, 2021
2 parents 141c823 + 44c6ced commit 42119ca
Show file tree
Hide file tree
Showing 25 changed files with 819 additions and 294 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -25,7 +25,7 @@ CRD_PRESERVE=x-kubernetes-preserve-unknown-fields true
# Current Operator version
# Default bundle image tag
BUNDLE_IMG ?= controller-bundle:$(VERSION)
ALPINE_IMAGE=alpine:3.14.2
ALPINE_IMAGE=alpine:3.15.0
CHANNEL=beta
DEFAULT_CHANNEL=beta
BUNDLE_CHANNELS := --channels=$(CHANNEL)
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta1/vmauth_types.go
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/VictoriaMetrics/operator/controllers/factory/crd"
v1 "k8s.io/api/core/v1"
"k8s.io/api/extensions/v1beta1"
v12 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/utils/pointer"
Expand Down Expand Up @@ -182,11 +182,11 @@ type EmbeddedIngress struct {
// ExtraRules - additional rules for ingress,
// must be checked for correctness by user.
// +optional
ExtraRules []v1beta1.IngressRule `json:"extraRules,omitempty"`
ExtraRules []v12.IngressRule `json:"extraRules,omitempty"`
// ExtraTLS - additional TLS configuration for ingress
// must be checked for correctness by user.
// +optional
ExtraTLS []v1beta1.IngressTLS `json:"extraTls,omitempty"`
ExtraTLS []v12.IngressTLS `json:"extraTls,omitempty"`
}

// VMAuthStatus defines the observed state of VMAuth
Expand Down
6 changes: 3 additions & 3 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions config/crd/bases/operator.victoriametrics.com_vmagents.yaml
Expand Up @@ -314,12 +314,14 @@ spec:
type: string
value:
description: 'Variable references $(VAR_NAME) are expanded using
the previous defined environment variables in the container
the previously defined environment variables in the container
and any service environment variables. If a variable cannot
be resolved, the reference in the input string will be unchanged.
The $(VAR_NAME) syntax can be escaped with a double $$, ie:
$$(VAR_NAME). Escaped references will never be expanded, regardless
of whether the variable exists or not. Defaults to "".'
Double $$ are reduced to a single $, which allows for escaping
the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the
string literal "$(VAR_NAME)". Escaped references will never
be expanded, regardless of whether the variable exists or
not. Defaults to "".'
type: string
required:
- name
Expand Down
63 changes: 51 additions & 12 deletions config/crd/bases/operator.victoriametrics.com_vmalertmanagers.yaml
Expand Up @@ -217,12 +217,14 @@ spec:
type: string
value:
description: 'Variable references $(VAR_NAME) are expanded using
the previous defined environment variables in the container
the previously defined environment variables in the container
and any service environment variables. If a variable cannot
be resolved, the reference in the input string will be unchanged.
The $(VAR_NAME) syntax can be escaped with a double $$, ie:
$$(VAR_NAME). Escaped references will never be expanded, regardless
of whether the variable exists or not. Defaults to "".'
Double $$ are reduced to a single $, which allows for escaping
the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the
string literal "$(VAR_NAME)". Escaped references will never
be expanded, regardless of whether the variable exists or
not. Defaults to "".'
type: string
required:
- name
Expand Down Expand Up @@ -587,14 +589,51 @@ spec:
dataSource:
description: 'This field can be used to specify either:
* An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
* An existing PVC (PersistentVolumeClaim) * An existing
custom resource that implements data population (Alpha)
In order to use custom resource types that implement
data population, the AnyVolumeDataSource feature gate
must be enabled. If the provisioner or an external controller
can support the specified data source, it will create
a new volume based on the contents of the specified
data source.'
* An existing PVC (PersistentVolumeClaim) If the provisioner
or an external controller can support the specified
data source, it will create a new volume based on the
contents of the specified data source. If the AnyVolumeDataSource
feature gate is enabled, this field will always have
the same contents as the DataSourceRef field.'
properties:
apiGroup:
description: APIGroup is the group for the resource
being referenced. If APIGroup is not specified,
the specified Kind must be in the core API group.
For any other third-party types, APIGroup is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- kind
- name
type: object
dataSourceRef:
description: 'Specifies the object from which to populate
the volume with data, if a non-empty volume is desired.
This may be any local object from a non-empty API group
(non core object) or a PersistentVolumeClaim object.
When this field is specified, volume binding will only
succeed if the type of the specified object matches
some installed volume populator or dynamic provisioner.
This field will replace the functionality of the DataSource
field and as such if both fields are non-empty, they
must have the same value. For backwards compatibility,
both fields (DataSource and DataSourceRef) will be set
to the same value automatically if one of them is empty
and the other is non-empty. There are two important
differences between DataSource and DataSourceRef: *
While DataSource only allows two specific types of objects,
DataSourceRef allows any non-core object, as well
as PersistentVolumeClaim objects. * While DataSource
ignores disallowed values (dropping them), DataSourceRef preserves
all values, and generates an error if a disallowed value
is specified. (Alpha) Using this field requires the
AnyVolumeDataSource feature gate to be enabled.'
properties:
apiGroup:
description: APIGroup is the group for the resource
Expand Down
10 changes: 6 additions & 4 deletions config/crd/bases/operator.victoriametrics.com_vmalerts.yaml
Expand Up @@ -279,12 +279,14 @@ spec:
type: string
value:
description: 'Variable references $(VAR_NAME) are expanded using
the previous defined environment variables in the container
the previously defined environment variables in the container
and any service environment variables. If a variable cannot
be resolved, the reference in the input string will be unchanged.
The $(VAR_NAME) syntax can be escaped with a double $$, ie:
$$(VAR_NAME). Escaped references will never be expanded, regardless
of whether the variable exists or not. Defaults to "".'
Double $$ are reduced to a single $, which allows for escaping
the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the
string literal "$(VAR_NAME)". Escaped references will never
be expanded, regardless of whether the variable exists or
not. Defaults to "".'
type: string
required:
- name
Expand Down
71 changes: 48 additions & 23 deletions config/crd/bases/operator.victoriametrics.com_vmauths.yaml
Expand Up @@ -75,12 +75,14 @@ spec:
type: string
value:
description: 'Variable references $(VAR_NAME) are expanded using
the previous defined environment variables in the container
the previously defined environment variables in the container
and any service environment variables. If a variable cannot
be resolved, the reference in the input string will be unchanged.
The $(VAR_NAME) syntax can be escaped with a double $$, ie:
$$(VAR_NAME). Escaped references will never be expanded, regardless
of whether the variable exists or not. Defaults to "".'
Double $$ are reduced to a single $, which allows for escaping
the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the
string literal "$(VAR_NAME)". Escaped references will never
be expanded, regardless of whether the variable exists or
not. Defaults to "".'
type: string
required:
- name
Expand Down Expand Up @@ -212,8 +214,9 @@ spec:
description: Resource is an ObjectRef to another
Kubernetes resource in the namespace of
the Ingress object. If resource is specified,
serviceName and servicePort must not be
specified.
a service.Name and service.Port must not
be specified. This is a mutually exclusive
setting with "Service".
properties:
apiGroup:
description: APIGroup is the group for
Expand All @@ -235,25 +238,45 @@ spec:
- kind
- name
type: object
serviceName:
description: Specifies the name of the referenced
service.
type: string
servicePort:
anyOf:
- type: integer
- type: string
description: Specifies the port of the referenced
service.
x-kubernetes-int-or-string: true
service:
description: Service references a Service
as a Backend. This is a mutually exclusive
setting with "Resource".
properties:
name:
description: Name is the referenced service.
The service must exist in the same namespace
as the Ingress object.
type: string
port:
description: Port of the referenced service.
A port name or port number is required
for a IngressServiceBackend.
properties:
name:
description: Name is the name of the
port on the Service. This is a mutually
exclusive setting with "Number".
type: string
number:
description: Number is the numerical
port number (e.g. 80) on the Service.
This is a mutually exclusive setting
with "Name".
format: int32
type: integer
type: object
required:
- name
type: object
type: object
path:
description: Path is matched against the path
of an incoming request. Currently it can contain
characters disallowed from the conventional
"path" part of a URL as defined by RFC 3986.
Paths must begin with a '/'. When unspecified,
all paths from incoming requests are matched.
Paths must begin with a '/' and must be present
when using PathType with value "Exact" or "Prefix".
type: string
pathType:
description: 'PathType determines the interpretation
Expand All @@ -274,13 +297,14 @@ spec:
IngressClass. Implementations can treat this
as a separate PathType or treat it identically
to Prefix or Exact path types. Implementations
are required to support all path types. Defaults
to ImplementationSpecific.'
are required to support all path types.'
type: string
required:
- backend
- pathType
type: object
type: array
x-kubernetes-list-type: atomic
required:
- paths
type: object
Expand All @@ -302,10 +326,11 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
secretName:
description: SecretName is the name of the secret used to
terminate SSL traffic on 443. Field is left optional to
allow SSL routing based on SNI hostname alone. If the
terminate TLS traffic on port 443. Field is left optional
to allow TLS routing based on SNI hostname alone. If the
SNI host in a listener conflicts with the "Host" header
field used by an IngressRule, the SNI host is used for
termination and value of the Host header is used for routing.
Expand Down

0 comments on commit 42119ca

Please sign in to comment.