From e7399103178fc3c37be4ce40d4635f5a91bc1956 Mon Sep 17 00:00:00 2001 From: Alexandre Guitton Date: Wed, 24 Mar 2021 17:25:54 +0100 Subject: [PATCH] [Feature/Operator] Manage configmap and secret for override (#87) * manage configmap and secret for override * add reference and update samples --- api/v1alpha1/common_types.go | 20 + api/v1alpha1/nificluster_types.go | 39 +- api/v1alpha1/zz_generated.deepcopy.go | 116 +++++- .../bases/nifi.orange.com_nificlusters.yaml | 373 ++++++++++++++++-- config/samples/nifi_v1alpha1_nificluster.yaml | 74 +++- config/samples/override_configmap.yaml | 178 +++++++++ config/samples/override_secret.yaml | 9 + controllers/nificluster_controller.go | 2 +- controllers/nificlustertask_controller.go | 4 +- controllers/nifidataflow_controller.go | 8 +- .../nifiparametercontext_controller.go | 20 +- controllers/nifiregistryclient_controller.go | 20 +- controllers/nifiuser_controller.go | 22 +- controllers/nifiusergroup_controller.go | 22 +- go.mod | 9 +- go.sum | 146 ++++++- main.go | 38 +- pkg/k8sutil/resource.go | 14 +- pkg/resources/nifi/configmap.go | 244 ++++++++++-- pkg/resources/nifi/pod.go | 8 +- .../1_nifi_cluster/2_read_only_config.md | 193 +++++++-- 21 files changed, 1342 insertions(+), 217 deletions(-) create mode 100644 config/samples/override_configmap.yaml create mode 100644 config/samples/override_secret.yaml diff --git a/api/v1alpha1/common_types.go b/api/v1alpha1/common_types.go index 28570993d..cac9ec947 100644 --- a/api/v1alpha1/common_types.go +++ b/api/v1alpha1/common_types.go @@ -88,6 +88,26 @@ type NifiAccessType string // UserState defines the state of a NifiUser type UserState string +// ConfigmapReference states a reference to a data into a configmap +type ConfigmapReference struct { + // Name of the configmap that we want to refer. + Name string `json:"name"` + // Namespace where is located the secret that we want to refer. + Namespace string `json:"namespace,omitempty"` + // The key of the value,in data content, that we want use. + Data string `json:"data"` +} + +// SecretConfigReference states a reference to a data into a secret +type SecretConfigReference struct { + // Name of the configmap that we want to refer. + Name string `json:"name"` + // Namespace where is located the secret that we want to refer. + Namespace string `json:"namespace,omitempty"` + // The key of the value,in data content, that we want use. + Data string `json:"data"` +} + // ClusterReference states a reference to a cluster for dataflow/registryclient/user // provisioning type ClusterReference struct { diff --git a/api/v1alpha1/nificluster_types.go b/api/v1alpha1/nificluster_types.go index 3c751db3d..7c5188326 100644 --- a/api/v1alpha1/nificluster_types.go +++ b/api/v1alpha1/nificluster_types.go @@ -148,13 +148,23 @@ type ReadOnlyConfig struct { ZookeeperProperties ZookeeperProperties `json:"zookeeperProperties,omitempty"` // BootstrapProperties configuration that will be applied to the node. BootstrapProperties BootstrapProperties `json:"bootstrapProperties,omitempty"` + // Logback configuration that will be applied to the node. + LogbackConfig LogbackConfig `json:"logbackConfig,omitempty"` + // BootstrapNotificationServices configuration that will be applied to the node. + BootstrapNotificationServicesReplaceConfig BootstrapNotificationServicesConfig `json:"bootstrapNotificationServicesConfig,omitempty"` } // NifiProperties configuration that will be applied to the node. type NifiProperties struct { + // Additionnals nifi.properties configuration that will override the one produced based on template and + // configuration + OverrideConfigMap *ConfigmapReference `json:"overrideConfigMap,omitempty"` // Additionnals nifi.properties configuration that will override the one produced based - // on template and configurations. + // on template, configurations and overrideConfigMap. OverrideConfigs string `json:"overrideConfigs,omitempty"` + // Additionnals nifi.properties configuration that will override the one produced based + // on template, configurations, overrideConfigMap and overrideConfigs. + OverrideSecretConfig *SecretConfigReference `json:"overrideSecretConfig,omitempty"` // A comma separated list of allowed HTTP Host header values to consider when NiFi // is running securely and will be receiving requests to a different host[:port] than it is bound to. // https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#web-properties @@ -168,18 +178,45 @@ type NifiProperties struct { // ZookeeperProperties configuration that will be applied to the node. type ZookeeperProperties struct { + // Additionnals zookeeper.properties configuration that will override the one produced based on template and + // configuration + OverrideConfigMap *ConfigmapReference `json:"overrideConfigMap,omitempty"` // Additionnals zookeeper.properties configuration that will override the one produced based // on template and configurations. OverrideConfigs string `json:"overrideConfigs,omitempty"` + // Additionnals zookeeper.properties configuration that will override the one produced based + // on template, configurations, overrideConfigMap and overrideConfigs. + OverrideSecretConfig *SecretConfigReference `json:"overrideSecretConfig,omitempty"` } // BootstrapProperties configuration that will be applied to the node. type BootstrapProperties struct { // JVM memory settings NifiJvmMemory string `json:"nifiJvmMemory,omitempty"` + // Additionnals bootstrap.properties configuration that will override the one produced based on template and + // configuration + OverrideConfigMap *ConfigmapReference `json:"overrideConfigMap,omitempty"` // Additionnals bootstrap.properties configuration that will override the one produced based // on template and configurations. OverrideConfigs string `json:"overrideConfigs,omitempty"` + // Additionnals bootstrap.properties configuration that will override the one produced based + // on template, configurations, overrideConfigMap and overrideConfigs. + OverrideSecretConfig *SecretConfigReference `json:"overrideSecretConfig,omitempty"` +} + +// Logback configuration that will be applied to the node. +type LogbackConfig struct { + // logback.xml configuration that will replace the one produced based on template + ReplaceConfigMap *ConfigmapReference `json:"replaceConfigMap,omitempty"` + // logback.xml configuration that will replace the one produced based on template and overrideConfigMap + ReplaceSecretConfig *SecretConfigReference `json:"replaceSecretConfig,omitempty"` +} + +type BootstrapNotificationServicesConfig struct { + // bootstrap_notifications_services.xml configuration that will replace the one produced based on template + ReplaceConfigMap *ConfigmapReference `json:"replaceConfigMap,omitempty"` + // bootstrap_notifications_services.xml configuration that will replace the one produced based on template and overrideConfigMap + ReplaceSecretConfig *SecretConfigReference `json:"replaceSecretConfig,omitempty"` } // NodeConfig defines the node configuration diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3a7818e64..085c1c7f4 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -41,9 +41,44 @@ func (in *AccessPolicy) DeepCopy() *AccessPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BootstrapNotificationServicesConfig) DeepCopyInto(out *BootstrapNotificationServicesConfig) { + *out = *in + if in.ReplaceConfigMap != nil { + in, out := &in.ReplaceConfigMap, &out.ReplaceConfigMap + *out = new(ConfigmapReference) + **out = **in + } + if in.ReplaceSecretConfig != nil { + in, out := &in.ReplaceSecretConfig, &out.ReplaceSecretConfig + *out = new(SecretConfigReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapNotificationServicesConfig. +func (in *BootstrapNotificationServicesConfig) DeepCopy() *BootstrapNotificationServicesConfig { + if in == nil { + return nil + } + out := new(BootstrapNotificationServicesConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BootstrapProperties) DeepCopyInto(out *BootstrapProperties) { *out = *in + if in.OverrideConfigMap != nil { + in, out := &in.OverrideConfigMap, &out.OverrideConfigMap + *out = new(ConfigmapReference) + **out = **in + } + if in.OverrideSecretConfig != nil { + in, out := &in.OverrideSecretConfig, &out.OverrideSecretConfig + *out = new(SecretConfigReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapProperties. @@ -71,6 +106,21 @@ func (in *ClusterReference) DeepCopy() *ClusterReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigmapReference) DeepCopyInto(out *ConfigmapReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigmapReference. +func (in *ConfigmapReference) DeepCopy() *ConfigmapReference { + if in == nil { + return nil + } + out := new(ConfigmapReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DisruptionBudget) DeepCopyInto(out *DisruptionBudget) { *out = *in @@ -224,6 +274,31 @@ func (in *ListenersConfig) DeepCopy() *ListenersConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LogbackConfig) DeepCopyInto(out *LogbackConfig) { + *out = *in + if in.ReplaceConfigMap != nil { + in, out := &in.ReplaceConfigMap, &out.ReplaceConfigMap + *out = new(ConfigmapReference) + **out = **in + } + if in.ReplaceSecretConfig != nil { + in, out := &in.ReplaceSecretConfig, &out.ReplaceSecretConfig + *out = new(SecretConfigReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogbackConfig. +func (in *LogbackConfig) DeepCopy() *LogbackConfig { + if in == nil { + return nil + } + out := new(LogbackConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedUser) DeepCopyInto(out *ManagedUser) { *out = *in @@ -631,6 +706,16 @@ func (in *NifiParameterContextStatus) DeepCopy() *NifiParameterContextStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NifiProperties) DeepCopyInto(out *NifiProperties) { *out = *in + if in.OverrideConfigMap != nil { + in, out := &in.OverrideConfigMap, &out.OverrideConfigMap + *out = new(ConfigmapReference) + **out = **in + } + if in.OverrideSecretConfig != nil { + in, out := &in.OverrideSecretConfig, &out.OverrideSecretConfig + *out = new(SecretConfigReference) + **out = **in + } if in.WebProxyHosts != nil { in, out := &in.WebProxyHosts, &out.WebProxyHosts *out = make([]string, len(*in)) @@ -1143,8 +1228,10 @@ func (in *PortConfig) DeepCopy() *PortConfig { func (in *ReadOnlyConfig) DeepCopyInto(out *ReadOnlyConfig) { *out = *in in.NifiProperties.DeepCopyInto(&out.NifiProperties) - out.ZookeeperProperties = in.ZookeeperProperties - out.BootstrapProperties = in.BootstrapProperties + in.ZookeeperProperties.DeepCopyInto(&out.ZookeeperProperties) + in.BootstrapProperties.DeepCopyInto(&out.BootstrapProperties) + in.LogbackConfig.DeepCopyInto(&out.LogbackConfig) + in.BootstrapNotificationServicesReplaceConfig.DeepCopyInto(&out.BootstrapNotificationServicesReplaceConfig) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadOnlyConfig. @@ -1207,6 +1294,21 @@ func (in *SSLSecrets) DeepCopy() *SSLSecrets { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretConfigReference) DeepCopyInto(out *SecretConfigReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretConfigReference. +func (in *SecretConfigReference) DeepCopy() *SecretConfigReference { + if in == nil { + return nil + } + out := new(SecretConfigReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretReference) DeepCopyInto(out *SecretReference) { *out = *in @@ -1297,6 +1399,16 @@ func (in *UserReference) DeepCopy() *UserReference { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ZookeeperProperties) DeepCopyInto(out *ZookeeperProperties) { *out = *in + if in.OverrideConfigMap != nil { + in, out := &in.OverrideConfigMap, &out.OverrideConfigMap + *out = new(ConfigmapReference) + **out = **in + } + if in.OverrideSecretConfig != nil { + in, out := &in.OverrideSecretConfig, &out.OverrideSecretConfig + *out = new(SecretConfigReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZookeeperProperties. diff --git a/config/crd/bases/nifi.orange.com_nificlusters.yaml b/config/crd/bases/nifi.orange.com_nificlusters.yaml index 6c983f6a5..8b84cd489 100644 --- a/config/crd/bases/nifi.orange.com_nificlusters.yaml +++ b/config/crd/bases/nifi.orange.com_nificlusters.yaml @@ -1028,8 +1028,7 @@ spec: can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. This is a beta feature enabled by - the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: exec: description: One and only one of the following should be @@ -1735,20 +1734,15 @@ spec: type: array dataSource: description: 'This field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) - * An existing custom resource/object that implements - data population (Alpha) In order to use VolumeSnapshot - object types, the appropriate feature gate must - be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) - 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 specified data source is not - supported, the volume will not be created and the - failure will be reported as an event. In the future, - we plan to support more data source types and the - behavior of the provisioner may change.' + * 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.' properties: apiGroup: description: APIGroup is the group for the resource @@ -2256,21 +2250,15 @@ spec: dataSource: description: 'This field can be used to specify either: * An existing VolumeSnapshot object - (snapshot.storage.k8s.io/VolumeSnapshot - Beta) - * An existing PVC (PersistentVolumeClaim) * - An existing custom resource/object that implements - data population (Alpha) In order to use VolumeSnapshot - object types, the appropriate feature gate must - be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) - 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 specified - data source is not supported, the volume will - not be created and the failure will be reported - as an event. In the future, we plan to support - more data source types and the behavior of the - provisioner may change.' + (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.' properties: apiGroup: description: APIGroup is the group for the @@ -2448,6 +2436,40 @@ spec: which has type read-only these config changes will trigger rolling upgrade properties: + bootstrapNotificationServicesConfig: + description: BootstrapNotificationServices configuration + that will be applied to the node. + properties: + replaceConfigMap: + description: bootstrap_notifications_services.xml configuration + that will replace the one produced based on template + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + replaceSecretConfig: + description: bootstrap_notifications_services.xml configuration + that will replace the one produced based on template + and overrideConfigMap + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + type: object bootstrapProperties: description: BootstrapProperties configuration that will be applied to the node. @@ -2455,11 +2477,74 @@ spec: nifiJvmMemory: description: JVM memory settings type: string + overrideConfigMap: + description: Additionnals bootstrap.properties configuration + that will override the one produced based on template + and configuration + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object overrideConfigs: description: Additionnals bootstrap.properties configuration that will override the one produced based on template and configurations. type: string + overrideSecretConfig: + description: Additionnals bootstrap.properties configuration + that will override the one produced based on template, + configurations, overrideConfigMap and overrideConfigs. + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + type: object + logbackConfig: + description: Logback configuration that will be applied + to the node. + properties: + replaceConfigMap: + description: logback.xml configuration that will replace + the one produced based on template + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + replaceSecretConfig: + description: logback.xml configuration that will replace + the one produced based on template and overrideConfigMap + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object type: object nifiProperties: description: NifiProperties configuration that will be applied @@ -2472,11 +2557,41 @@ spec: needClientAuth: description: Nifi security client auth type: boolean - overrideConfigs: + overrideConfigMap: description: Additionnals nifi.properties configuration that will override the one produced based on template - and configurations. + and configuration + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + overrideConfigs: + description: Additionnals nifi.properties configuration + that will override the one produced based on template, + configurations and overrideConfigMap. type: string + overrideSecretConfig: + description: Additionnals nifi.properties configuration + that will override the one produced based on template, + configurations, overrideConfigMap and overrideConfigs. + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object webProxyHosts: description: A comma separated list of allowed HTTP Host header values to consider when NiFi is running @@ -2490,11 +2605,41 @@ spec: description: ZookeeperProperties configuration that will be applied to the node. properties: + overrideConfigMap: + description: Additionnals zookeeper.properties configuration + that will override the one produced based on template + and configuration + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object overrideConfigs: description: Additionnals zookeeper.properties configuration that will override the one produced based on template and configurations. type: string + overrideSecretConfig: + description: Additionnals zookeeper.properties configuration + that will override the one produced based on template, + configurations, overrideConfigMap and overrideConfigs. + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object type: object type: object required: @@ -2527,6 +2672,40 @@ spec: cluster wide, all theses will be merged with node specified readOnly configurations, so it can be overwritten per node. properties: + bootstrapNotificationServicesConfig: + description: BootstrapNotificationServices configuration that + will be applied to the node. + properties: + replaceConfigMap: + description: bootstrap_notifications_services.xml configuration + that will replace the one produced based on template + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + replaceSecretConfig: + description: bootstrap_notifications_services.xml configuration + that will replace the one produced based on template and + overrideConfigMap + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + type: object bootstrapProperties: description: BootstrapProperties configuration that will be applied to the node. @@ -2534,11 +2713,74 @@ spec: nifiJvmMemory: description: JVM memory settings type: string + overrideConfigMap: + description: Additionnals bootstrap.properties configuration + that will override the one produced based on template and + configuration + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object overrideConfigs: description: Additionnals bootstrap.properties configuration that will override the one produced based on template and configurations. type: string + overrideSecretConfig: + description: Additionnals bootstrap.properties configuration + that will override the one produced based on template, configurations, + overrideConfigMap and overrideConfigs. + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + type: object + logbackConfig: + description: Logback configuration that will be applied to the + node. + properties: + replaceConfigMap: + description: logback.xml configuration that will replace the + one produced based on template + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object + replaceSecretConfig: + description: logback.xml configuration that will replace the + one produced based on template and overrideConfigMap + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object type: object nifiProperties: description: NifiProperties configuration that will be applied @@ -2551,10 +2793,40 @@ spec: needClientAuth: description: Nifi security client auth type: boolean + overrideConfigMap: + description: Additionnals nifi.properties configuration that + will override the one produced based on template and configuration + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object overrideConfigs: description: Additionnals nifi.properties configuration that - will override the one produced based on template and configurations. + will override the one produced based on template, configurations + and overrideConfigMap. type: string + overrideSecretConfig: + description: Additionnals nifi.properties configuration that + will override the one produced based on template, configurations, + overrideConfigMap and overrideConfigs. + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object webProxyHosts: description: A comma separated list of allowed HTTP Host header values to consider when NiFi is running securely and will @@ -2568,11 +2840,41 @@ spec: description: ZookeeperProperties configuration that will be applied to the node. properties: + overrideConfigMap: + description: Additionnals zookeeper.properties configuration + that will override the one produced based on template and + configuration + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object overrideConfigs: description: Additionnals zookeeper.properties configuration that will override the one produced based on template and configurations. type: string + overrideSecretConfig: + description: Additionnals zookeeper.properties configuration + that will override the one produced based on template, configurations, + overrideConfigMap and overrideConfigs. + properties: + data: + type: string + name: + type: string + namespace: + type: string + required: + - data + - name + type: object type: object type: object service: @@ -3453,8 +3755,7 @@ spec: can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. This is a beta feature enabled by - the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: exec: description: One and only one of the following should be diff --git a/config/samples/nifi_v1alpha1_nificluster.yaml b/config/samples/nifi_v1alpha1_nificluster.yaml index 74dde3cf1..259d40797 100644 --- a/config/samples/nifi_v1alpha1_nificluster.yaml +++ b/config/samples/nifi_v1alpha1_nificluster.yaml @@ -49,10 +49,46 @@ spec: # readOnlyConfig specifies the read-only type Nifi config cluster wide, all theses # will be merged with node specified readOnly configurations, so it can be overwritten per node. readOnlyConfig: + # Logback configuration that will be applied to the node + logbackConfig: + # logback.xml configuration that will replace the one produced based on template + replaceConfigMap: + # The key of the value,in data content, that we want use. + data: logback.xml + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop + # logback.xml configuration that will replace the one produced based on template and overrideConfigMap + replaceSecretConfig: + # The key of the value,in data content, that we want use. + data: logback.xml + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop # NifiProperties configuration that will be applied to the node. nifiProperties: + # Additionnals nifi.properties configuration that will override the one produced based on template and + # configuration + overrideConfigMap: + # The key of the value,in data content, that we want use. + data: nifi.properties + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop. # Additionnals nifi.properties configuration that will override the one produced based - # on template and configurations. + # on template, configurations, overrideConfigMap and overrideConfigs. + overrideSecretConfig: + # The key of the value,in data content, that we want use. + data: nifi.properties + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop + # Additionnals nifi.properties configuration that will override the one produced based + # on template, configurations and overrideConfigMap overrideConfigs: | nifi.ui.banner.text=NiFiKop by Orange # A comma separated list of allowed HTTP Host header values to consider when NiFi @@ -66,6 +102,24 @@ spec: # authorizer: # ZookeeperProperties configuration that will be applied to the node. zookeeperProperties: +# # Additionnals zookeeeper.properties configuration that will override the one produced based on template and +# # configuration +# overrideConfigMap: +# # The key of the value,in data content, that we want use. +# data: zookeeeper.properties +# # Name of the configmap that we want to refer. +# name: raw +# # Namespace where is located the secret that we want to refer. +# namespace: nifikop. +# # Additionnals zookeeeper.properties configuration that will override the one produced based +# # on template, configurations, overrideConfigMap and overrideConfigs. +# overrideSecretConfig: +# # The key of the value,in data content, that we want use. +# data: zookeeeper.properties +# # Name of the configmap that we want to refer. +# name: raw +# # Namespace where is located the secret that we want to refer. +# namespace: nifikop # Additionnals zookeeper.properties configuration that will override the one produced based # on template and configurations. overrideConfigs: | @@ -77,6 +131,24 @@ spec: autopurge.snapRetainCount=30 # BootstrapProperties configuration that will be applied to the node. bootstrapProperties: +# # Additionnals bootstrap.properties configuration that will override the one produced based on template and +# # configuration +# overrideConfigMap: +# # The key of the value,in data content, that we want use. +# data: bootstrap.properties +# # Name of the configmap that we want to refer. +# name: raw +# # Namespace where is located the secret that we want to refer. +# namespace: nifikop. +# # Additionnals bootstrap.properties configuration that will override the one produced based +# # on template, configurations, overrideConfigMap and overrideConfigs. +# overrideSecretConfig: +# # The key of the value,in data content, that we want use. +# data: bootstrap.properties +# # Name of the configmap that we want to refer. +# name: raw +# # Namespace where is located the secret that we want to refer. +# namespace: nifikop # JVM memory settings nifiJvmMemory: "512m" # Additionnals bootstrap.properties configuration that will override the one produced based diff --git a/config/samples/override_configmap.yaml b/config/samples/override_configmap.yaml new file mode 100644 index 000000000..d501c340f --- /dev/null +++ b/config/samples/override_configmap.yaml @@ -0,0 +1,178 @@ +kind: ConfigMap +metadata: + name: raw + namespace: nifikop +apiVersion: v1 +data: + logback.xml: | + + + + + true + + + + ${org.apache.nifi.bootstrap.config.log.dir}/nifi-app.log + + + ${org.apache.nifi.bootstrap.config.log.dir}/nifi-app_%d{yyyy-MM-dd_HH}.%i.log + 100MB + + 30 + + true + + %date %level [%thread] %logger{40} %msg%n + + + + + ${org.apache.nifi.bootstrap.config.log.dir}/nifi-user.log + + + ${org.apache.nifi.bootstrap.config.log.dir}/nifi-user_%d.log + + 30 + + + %date %level [%thread] %logger{40} %msg%n + + + + + ${org.apache.nifi.bootstrap.config.log.dir}/nifi-bootstrap.log + + + ${org.apache.nifi.bootstrap.config.log.dir}/nifi-bootstrap_%d.log + + 5 + + + %date %level [%thread] %logger{40} %msg%n + + + + + + %date %level [%thread] %logger{40} %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + nifi.properties: | + nifi.security.user.oidc.discovery.url=https://accounts.google.com/.well-known/openid-configuration + nifi.security.identity.mapping.value.dn=$2 + nifi.security.identity.mapping.transform.dn=NO diff --git a/config/samples/override_secret.yaml b/config/samples/override_secret.yaml new file mode 100644 index 000000000..e76c7140a --- /dev/null +++ b/config/samples/override_secret.yaml @@ -0,0 +1,9 @@ +kind: Secret +metadata: + name: raw + namespace: nifikop +apiVersion: v1 +data: + nifi.properties: | + nifi.security.user.oidc.client.id=9307154354780-sdqek2fcabno9jhlkjh4f9born1v3oq94q.apps.googleusercontent.com + nifi.security.user.oidc.client.secret=5OzBhk1Ioq5bpcRNrbXhjhjkhg \ No newline at end of file diff --git a/controllers/nificluster_controller.go b/controllers/nificluster_controller.go index c9e0bfe5f..746db9a4a 100644 --- a/controllers/nificluster_controller.go +++ b/controllers/nificluster_controller.go @@ -51,7 +51,7 @@ type NifiClusterReconciler struct { Log logr.Logger Scheme *runtime.Scheme Namespaces []string - Recorder record.EventRecorder + Recorder record.EventRecorder } // +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete diff --git a/controllers/nificlustertask_controller.go b/controllers/nificlustertask_controller.go index 1ab0e1ff2..91508fd7b 100644 --- a/controllers/nificlustertask_controller.go +++ b/controllers/nificlustertask_controller.go @@ -44,8 +44,8 @@ import ( // NifiClusterTaskReconciler reconciles type NifiClusterTaskReconciler struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme + Log logr.Logger + Scheme *runtime.Scheme Recorder record.EventRecorder } diff --git a/controllers/nifidataflow_controller.go b/controllers/nifidataflow_controller.go index 3ca3d772f..09c5e03b2 100644 --- a/controllers/nifidataflow_controller.go +++ b/controllers/nifidataflow_controller.go @@ -45,8 +45,8 @@ var dataflowFinalizer = "nifidataflows.nifi.orange.com/finalizer" // NifiDataflowReconciler reconciles a NifiDataflow object type NifiDataflowReconciler struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme + Log logr.Logger + Scheme *runtime.Scheme Recorder record.EventRecorder } @@ -134,7 +134,7 @@ func (r *NifiDataflowReconciler) Reconcile(ctx context.Context, req ctrl.Request r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceParameterContextError", fmt.Sprintf("Failed to lookup reference parameter-context : %s in %s", - instance.Spec.ClusterRef.Name, parameterContextNamespace )) + instance.Spec.ClusterRef.Name, parameterContextNamespace)) // the cluster does not exist - should have been caught pre-flight return RequeueWithError(r.Log, "failed to lookup referenced parameter-contest", err) @@ -152,7 +152,7 @@ func (r *NifiDataflowReconciler) Reconcile(ctx context.Context, req ctrl.Request r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to lookup reference cluster : %s in %s", - instance.Spec.ClusterRef.Name, clusterNamespace )) + instance.Spec.ClusterRef.Name, clusterNamespace)) return RequeueWithError( r.Log, diff --git a/controllers/nifiparametercontext_controller.go b/controllers/nifiparametercontext_controller.go index 84e32ee60..f139c5ec7 100644 --- a/controllers/nifiparametercontext_controller.go +++ b/controllers/nifiparametercontext_controller.go @@ -44,8 +44,8 @@ var parameterContextFinalizer = "nifiparametercontexts.nifi.orange.com/finalizer // NifiParameterContextReconciler reconciles a NifiParameterContext object type NifiParameterContextReconciler struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme + Log logr.Logger + Scheme *runtime.Scheme Recorder record.EventRecorder } @@ -114,7 +114,7 @@ func (r *NifiParameterContextReconciler) Reconcile(ctx context.Context, req ctrl r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to lookup reference cluster : %s in %s", - instance.Spec.ClusterRef.Name, clusterNamespace )) + instance.Spec.ClusterRef.Name, clusterNamespace)) // the cluster does not exist - should have been caught pre-flight return RequeueWithError(r.Log, "failed to lookup referenced cluster", err) @@ -126,7 +126,7 @@ func (r *NifiParameterContextReconciler) Reconcile(ctx context.Context, req ctrl } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciling", - fmt.Sprintf("Reconciling parameter context %s", instance.Name )) + fmt.Sprintf("Reconciling parameter context %s", instance.Name)) // Check if the NiFi registry client already exist exist, err := parametercontext.ExistParameterContext(r.Client, instance, cluster) @@ -137,7 +137,7 @@ func (r *NifiParameterContextReconciler) Reconcile(ctx context.Context, req ctrl if !exist { // Create NiFi parameter context r.Recorder.Event(instance, corev1.EventTypeNormal, "Creating", - fmt.Sprintf("Creating parameter context %s", instance.Name )) + fmt.Sprintf("Creating parameter context %s", instance.Name)) status, err := parametercontext.CreateParameterContext(r.Client, instance, parameterSecrets, cluster) if err != nil { @@ -150,12 +150,12 @@ func (r *NifiParameterContextReconciler) Reconcile(ctx context.Context, req ctrl } r.Recorder.Event(instance, corev1.EventTypeNormal, "Created", - fmt.Sprintf("Created parameter context %s", instance.Name )) + fmt.Sprintf("Created parameter context %s", instance.Name)) } // Sync ParameterContext resource with NiFi side component r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronizing", - fmt.Sprintf("Synchronizing parameter context %s", instance.Name )) + fmt.Sprintf("Synchronizing parameter context %s", instance.Name)) status, err := parametercontext.SyncParameterContext(r.Client, instance, parameterSecrets, cluster) if status != nil { instance.Status = *status @@ -169,13 +169,13 @@ func (r *NifiParameterContextReconciler) Reconcile(ctx context.Context, req ctrl return RequeueAfter(time.Duration(5) * time.Second) default: r.Recorder.Event(instance, corev1.EventTypeNormal, "SynchronizingFailed", - fmt.Sprintf("Synchronizing parameter context %s failed", instance.Name )) + fmt.Sprintf("Synchronizing parameter context %s failed", instance.Name)) return RequeueWithError(r.Log, "failed to sync NifiParameterContext", err) } } r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronized", - fmt.Sprintf("Synchronized parameter context %s", instance.Name )) + fmt.Sprintf("Synchronized parameter context %s", instance.Name)) // Ensure NifiCluster label if instance, err = r.ensureClusterLabel(ctx, cluster, instance); err != nil { @@ -194,7 +194,7 @@ func (r *NifiParameterContextReconciler) Reconcile(ctx context.Context, req ctrl } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciled", - fmt.Sprintf("Reconciling parameter context %s", instance.Name )) + fmt.Sprintf("Reconciling parameter context %s", instance.Name)) r.Log.Info("Ensured Parameter Context") diff --git a/controllers/nifiregistryclient_controller.go b/controllers/nifiregistryclient_controller.go index 758efeae7..0b759477b 100644 --- a/controllers/nifiregistryclient_controller.go +++ b/controllers/nifiregistryclient_controller.go @@ -42,8 +42,8 @@ var registryClientFinalizer = "nifiregistryclients.nifi.orange.com/finalizer" // NifiRegistryClientReconciler reconciles a NifiRegistryClient object type NifiRegistryClientReconciler struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme + Log logr.Logger + Scheme *runtime.Scheme Recorder record.EventRecorder } @@ -91,7 +91,7 @@ func (r *NifiRegistryClientReconciler) Reconcile(ctx context.Context, req ctrl.R r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to lookup reference cluster : %s in %s", - instance.Spec.ClusterRef.Name, clusterNamespace )) + instance.Spec.ClusterRef.Name, clusterNamespace)) // the cluster does not exist - should have been caught pre-flight return RequeueWithError(r.Log, "failed to lookup referenced cluster", err) } @@ -102,7 +102,7 @@ func (r *NifiRegistryClientReconciler) Reconcile(ctx context.Context, req ctrl.R } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciling", - fmt.Sprintf("Reconciling registry client %s", instance.Name )) + fmt.Sprintf("Reconciling registry client %s", instance.Name)) // Check if the NiFi registry client already exist exist, err := registryclient.ExistRegistryClient(r.Client, instance, cluster) @@ -113,7 +113,7 @@ func (r *NifiRegistryClientReconciler) Reconcile(ctx context.Context, req ctrl.R if !exist { // Create NiFi registry client r.Recorder.Event(instance, corev1.EventTypeNormal, "Creating", - fmt.Sprintf("Creating registry client %s", instance.Name )) + fmt.Sprintf("Creating registry client %s", instance.Name)) status, err := registryclient.CreateRegistryClient(r.Client, instance, cluster) if err != nil { return RequeueWithError(r.Log, "failure creating registry client", err) @@ -125,16 +125,16 @@ func (r *NifiRegistryClientReconciler) Reconcile(ctx context.Context, req ctrl.R } r.Recorder.Event(instance, corev1.EventTypeNormal, "Created", - fmt.Sprintf("Created registry client %s", instance.Name )) + fmt.Sprintf("Created registry client %s", instance.Name)) } // Sync RegistryClient resource with NiFi side component r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronizing", - fmt.Sprintf("Synchronizing registry client %s", instance.Name )) + fmt.Sprintf("Synchronizing registry client %s", instance.Name)) status, err := registryclient.SyncRegistryClient(r.Client, instance, cluster) if err != nil { r.Recorder.Event(instance, corev1.EventTypeNormal, "SynchronizingFailed", - fmt.Sprintf("Synchronizing registry client %s failed", instance.Name )) + fmt.Sprintf("Synchronizing registry client %s failed", instance.Name)) return RequeueWithError(r.Log, "failed to sync NifiRegistryClient", err) } @@ -144,7 +144,7 @@ func (r *NifiRegistryClientReconciler) Reconcile(ctx context.Context, req ctrl.R } r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronized", - fmt.Sprintf("Synchronized registry client %s", instance.Name )) + fmt.Sprintf("Synchronized registry client %s", instance.Name)) // Ensure NifiCluster label if instance, err = r.ensureClusterLabel(ctx, cluster, instance); err != nil { return RequeueWithError(r.Log, "failed to ensure NifiCluster label on registry client", err) @@ -162,7 +162,7 @@ func (r *NifiRegistryClientReconciler) Reconcile(ctx context.Context, req ctrl.R } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciled", - fmt.Sprintf("Reconciling registry client %s", instance.Name )) + fmt.Sprintf("Reconciling registry client %s", instance.Name)) r.Log.Info("Ensured Registry Client") diff --git a/controllers/nifiuser_controller.go b/controllers/nifiuser_controller.go index cc4408089..2b9f4468e 100644 --- a/controllers/nifiuser_controller.go +++ b/controllers/nifiuser_controller.go @@ -45,8 +45,8 @@ var userFinalizer = "nifiusers.nifi.orange.com/finalizer" // NifiUserReconciler reconciles a NifiUser object type NifiUserReconciler struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme + Log logr.Logger + Scheme *runtime.Scheme Recorder record.EventRecorder } @@ -97,7 +97,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to lookup reference cluster : %s in %s", - instance.Spec.ClusterRef.Name, clusterNamespace )) + instance.Spec.ClusterRef.Name, clusterNamespace)) return RequeueWithError(r.Log, "failed to lookup referenced cluster", err) } @@ -112,7 +112,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c pkiManager := pki.GetPKIManager(r.Client, cluster) r.Recorder.Event(instance, corev1.EventTypeNormal, "ReconcilingCertificate", - fmt.Sprintf("Reconciling certificate for nifi user %s", instance.Name )) + fmt.Sprintf("Reconciling certificate for nifi user %s", instance.Name)) // Reconcile no matter what to get a user certificate instance for ACL management // TODO (tinyzimmer): This can go wrong if the user made a mistake in their secret path // using the vault backend, then tried to delete and fix it. Should probably @@ -149,7 +149,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c } r.Recorder.Event(instance, corev1.EventTypeNormal, "ReconciledCertificate", - fmt.Sprintf("Reconciled certificate for nifi user %s", instance.Name )) + fmt.Sprintf("Reconciled certificate for nifi user %s", instance.Name)) // check if marked for deletion if k8sutil.IsMarkedForDeletion(instance.ObjectMeta) { @@ -168,7 +168,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciling", - fmt.Sprintf("Reconciling user %s", instance.Name )) + fmt.Sprintf("Reconciling user %s", instance.Name)) // Check if the NiFi user already exist exist, err := usercli.ExistUser(r.Client, instance, cluster) @@ -178,7 +178,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c if !exist { r.Recorder.Event(instance, corev1.EventTypeNormal, "Creating", - fmt.Sprintf("Creating user %s", instance.Name )) + fmt.Sprintf("Creating user %s", instance.Name)) var status *v1alpha1.NifiUserStatus @@ -200,12 +200,12 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c return RequeueWithError(r.Log, "failed to update NifiUser status", err) } r.Recorder.Event(instance, corev1.EventTypeNormal, "Created", - fmt.Sprintf("Created user %s", instance.Name )) + fmt.Sprintf("Created user %s", instance.Name)) } // Sync user resource with NiFi side component r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronizing", - fmt.Sprintf("Synchronizing user %s", instance.Name )) + fmt.Sprintf("Synchronizing user %s", instance.Name)) status, err := usercli.SyncUser(r.Client, instance, cluster) if err != nil { return RequeueWithError(r.Log, "failed to sync NifiUser", err) @@ -217,7 +217,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c } r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronized", - fmt.Sprintf("Synchronized user %s", instance.Name )) + fmt.Sprintf("Synchronized user %s", instance.Name)) // ensure a NifiCluster label if instance, err = r.ensureClusterLabel(ctx, cluster, instance); err != nil { @@ -238,7 +238,7 @@ func (r *NifiUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciled", - fmt.Sprintf("Reconciling user %s", instance.Name )) + fmt.Sprintf("Reconciling user %s", instance.Name)) r.Log.Info("Ensured user") diff --git a/controllers/nifiusergroup_controller.go b/controllers/nifiusergroup_controller.go index 06787b43f..9eb052ba4 100644 --- a/controllers/nifiusergroup_controller.go +++ b/controllers/nifiusergroup_controller.go @@ -43,8 +43,8 @@ var userGroupFinalizer = "nifiusergroups.nifi.orange.com/finalizer" // NifiUserGroupReconciler reconciles a NifiUserGroup object type NifiUserGroupReconciler struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme + Log logr.Logger + Scheme *runtime.Scheme Recorder record.EventRecorder } @@ -107,7 +107,7 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques if user != nil && (userNamespace != clusterNamespace || user.Spec.ClusterRef.Name != instance.Spec.ClusterRef.Name) { r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to ensure consistency in cluster referece : %s in %s, with user : %s in %s", - instance.Spec.ClusterRef.Name, clusterNamespace, userRef.Name, userRef.Namespace )) + instance.Spec.ClusterRef.Name, clusterNamespace, userRef.Name, userRef.Namespace)) return RequeueWithError( r.Log, "failed to lookup referenced cluster, due to inconsistency", @@ -132,7 +132,7 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to lookup reference cluster : %s in %s", - instance.Spec.ClusterRef.Name, clusterNamespace )) + instance.Spec.ClusterRef.Name, clusterNamespace)) // the cluster does not exist - should have been caught pre-flight return RequeueWithError(r.Log, "failed to lookup referenced cluster", err) @@ -144,7 +144,7 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciling", - fmt.Sprintf("Reconciling user group %s", instance.Name )) + fmt.Sprintf("Reconciling user group %s", instance.Name)) // Check if the NiFi user group already exist exist, err := usergroup.ExistUserGroup(r.Client, instance, cluster) @@ -154,7 +154,7 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques if !exist { r.Recorder.Event(instance, corev1.EventTypeNormal, "Creating", - fmt.Sprintf("Creating registry client %s", instance.Name )) + fmt.Sprintf("Creating registry client %s", instance.Name)) // Create NiFi user group status, err := usergroup.CreateUserGroup(r.Client, instance, users, cluster) @@ -168,16 +168,16 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques } r.Recorder.Event(instance, corev1.EventTypeNormal, "Created", - fmt.Sprintf("Created user group %s", instance.Name )) + fmt.Sprintf("Created user group %s", instance.Name)) } // Sync UserGroup resource with NiFi side component r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronizing", - fmt.Sprintf("Synchronizing user group %s", instance.Name )) + fmt.Sprintf("Synchronizing user group %s", instance.Name)) status, err := usergroup.SyncUserGroup(r.Client, instance, users, cluster) if err != nil { r.Recorder.Event(instance, corev1.EventTypeNormal, "SynchronizingFailed", - fmt.Sprintf("Synchronizing user group %s failed", instance.Name )) + fmt.Sprintf("Synchronizing user group %s failed", instance.Name)) return RequeueWithError(r.Log, "failed to sync NifiUserGroup", err) } @@ -187,7 +187,7 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques } r.Recorder.Event(instance, corev1.EventTypeNormal, "Synchronized", - fmt.Sprintf("Synchronized user group %s", instance.Name )) + fmt.Sprintf("Synchronized user group %s", instance.Name)) // Ensure NifiCluster label if instance, err = r.ensureClusterLabel(ctx, cluster, instance); err != nil { @@ -206,7 +206,7 @@ func (r *NifiUserGroupReconciler) Reconcile(ctx context.Context, req ctrl.Reques } r.Recorder.Event(instance, corev1.EventTypeNormal, "Reconciled", - fmt.Sprintf("Reconciling user group %s", instance.Name )) + fmt.Sprintf("Reconciling user group %s", instance.Name)) r.Log.Info("Ensured User Group") diff --git a/go.mod b/go.mod index 7c1f74ac7..37b16d3cd 100644 --- a/go.mod +++ b/go.mod @@ -16,13 +16,10 @@ require ( github.com/onsi/gomega v1.10.2 github.com/pavel-v-chernykh/keystore-go v2.1.0+incompatible github.com/stretchr/testify v1.6.1 - golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect golang.org/x/tools v0.0.0-20201014231627-1610a49f37af // indirect - google.golang.org/protobuf v1.25.0 // indirect - k8s.io/api v0.19.4 - k8s.io/apiextensions-apiserver v0.19.4 // indirect - k8s.io/apimachinery v0.19.4 - k8s.io/client-go v0.19.4 + k8s.io/api v0.20.2 + k8s.io/apimachinery v0.20.2 + k8s.io/client-go v0.20.2 sigs.k8s.io/controller-runtime v0.7.2 ) diff --git a/go.sum b/go.sum index c367aed47..c3d178f25 100644 --- a/go.sum +++ b/go.sum @@ -5,13 +5,25 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= emperror.dev/errors v0.4.2 h1:snD5ODyv4c9DOBBZh645dy/TziVHZivuFtRRMZP8zK8= emperror.dev/errors v0.4.2/go.mod h1:cA5SMsyzo+KXq997DKGK+lTV1DGx5TXLQUNtYe9p2p0= @@ -22,13 +34,17 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.6 h1:5YWtOnckcudzIw8lPPBcWOnmIFWMtHci1ZWAZulMSx0= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.6 h1:LIzfhNo9I3+il0KO2JY1/lgJmjig7lY0wFulQNZkbtg= github.com/Azure/go-autorest/autorest v0.11.6/go.mod h1:V6p3pKZx1KKkJubbxnDWrzNhEIfOy/pTGasLqzHIPHs= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.4 h1:1/DtH4Szusk4psLBrJn/gocMRIf1ji30WAz3GfyULRQ= github.com/Azure/go-autorest/autorest/adal v0.9.4/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE= +github.com/Azure/go-autorest/autorest/adal v0.9.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= @@ -38,6 +54,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= @@ -88,6 +105,7 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= @@ -144,8 +162,6 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/erdrix/nigoapi v0.0.0-20210322095543-c804ede67990 h1:SWQx+KhQXXW5p9S1V4s5No0Bdmo+Lpc0Xo2FIwHNxNQ= -github.com/erdrix/nigoapi v0.0.0-20210322095543-c804ede67990/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= github.com/erdrix/nigoapi v0.0.0-20210322100900-9bf87aec43d9 h1:yqGp8oivds/3m/9BT93zhEN+WvWSMJS5AClOoeVeeAs= github.com/erdrix/nigoapi v0.0.0-20210322100900-9bf87aec43d9/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -156,6 +172,8 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -166,6 +184,7 @@ github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= @@ -239,15 +258,20 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -257,6 +281,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= @@ -282,10 +308,14 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -495,6 +525,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -523,6 +555,7 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -564,12 +597,14 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= @@ -600,6 +635,8 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -607,7 +644,11 @@ golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxT golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -619,11 +660,15 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -648,19 +693,25 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -699,25 +750,33 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -725,6 +784,8 @@ golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5f golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -760,10 +821,23 @@ golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGgVFN1DM1/wz4aoGOA5qS8= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201014231627-1610a49f37af h1:VIUWFyOgzG3c0t9KYop5Ybp4m56LupfOnFYX7Ipnz+I= @@ -785,7 +859,11 @@ google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -803,8 +881,17 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -815,6 +902,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -868,64 +956,68 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.4/go.mod h1:5qxx6vjmwUVG2nHQTKGlLts8Tbok8PzHl4vHtVFuZCA= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= -k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= -k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= -k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apiextensions-apiserver v0.17.4/go.mod h1:rCbbbaFS/s3Qau3/1HbPlHblrWpFivoaLYccCffvQGI= k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apiextensions-apiserver v0.19.0/go.mod h1:znfQxNpjqz/ZehvbfMg5N6fvBJW5Lqu5HVLTJQdP4Fs= k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= -k8s.io/apiextensions-apiserver v0.19.4 h1:D9ak9T012tb3vcGFWYmbQuj9SCC8YM4zhA4XZqsAQC4= -k8s.io/apiextensions-apiserver v0.19.4/go.mod h1:B9rpH/nu4JBCtuUp3zTTk8DEjZUupZTBEec7/2zNRYw= +k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= +k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= -k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.17.4/go.mod h1:5ZDQ6Xr5MNBxyi3iUZXS84QOhZl+W7Oq2us/29c0j9I= k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/apiserver v0.19.0/go.mod h1:XvzqavYj73931x7FLtyagh8WibHpePJ1QwWrSJs2CLk= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= -k8s.io/apiserver v0.19.4/go.mod h1:X8WRHCR1UGZDd7HpV0QDc1h/6VbbpAeAGyxSh8yzZXw= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/cli-runtime v0.19.0/go.mod h1:tun9l0eUklT8IHIM0jors17KmUjcrAxn0myoBYwuNuo= k8s.io/client-go v0.17.4/go.mod h1:ouF6o5pz3is8qU0/qYL2RnoxOPqgfuidYLowytyLJmc= k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= -k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= -k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= -k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= +k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/code-generator v0.17.4/go.mod h1:l8BLVwASXQZTo2xamW5mQNFCe1XPiAesVq7Y1t7PiQQ= k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE= k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y= k8s.io/component-base v0.19.2 h1:jW5Y9RcZTb79liEhW3XDVTW7MuvEGP0tQZnfSX6/+gs= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= -k8s.io/component-base v0.19.4 h1:HobPRToQ8KJ9ubRju6PUAk9I5V1GNMJZ4PyWbiWA0uI= -k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= +k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= @@ -935,31 +1027,43 @@ k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.3.0 h1:WmkrnW7fdrm0/DMClc+HIxtftvxVIPAhlVwMQo5yLco= k8s.io/klog/v2 v2.3.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-aggregator v0.19.0/go.mod h1:1Ln45PQggFAG8xOqWPIYMxUq8WNtpPnYsbUJ39DpF/A= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.19.0/go.mod h1:gPCjjsmE6unJzgaUNXIFGZGafiUp5jh0If3F/x7/rRg= k8s.io/metrics v0.19.0/go.mod h1:WykpW8B60OeAJx1imdwUgyOID2kDljr/Q+1zrPJ98Wo= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200912215256-4140de9c8800 h1:9ZNvfPvVIEsp/T1ez4GQuzCcCTEQWhovSofhqR73A6g= k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= sigs.k8s.io/controller-runtime v0.7.2 h1:gD2JZp0bBLLuvSRYVNvox+bRCz1UUUxKDjPUCb56Ukk= sigs.k8s.io/controller-runtime v0.7.2/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= +sigs.k8s.io/controller-runtime v0.8.3 h1:GMHvzjTmaWHQB8HadW+dIvBoJuLvZObYJ5YoZruPRao= +sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= sigs.k8s.io/controller-tools v0.2.9-0.20200414181213-645d44dca7c0/go.mod h1:YKE/iHvcKITCljdnlqHYe+kAt7ZldvtAwUzQff0k1T0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= @@ -969,6 +1073,8 @@ sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/testing_frameworks v0.1.2/go.mod h1:ToQrwSC3s8Xf/lADdZp3Mktcql9CG0UAmdJG9th5i0w= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= diff --git a/main.go b/main.go index ff09bcf2e..d93827d67 100644 --- a/main.go +++ b/main.go @@ -127,16 +127,16 @@ func main() { Log: ctrl.Log.WithName("controllers").WithName("NifiCluster"), Scheme: mgr.GetScheme(), Namespaces: namespaceList, - Recorder: mgr.GetEventRecorderFor("nifi-cluster"), + Recorder: mgr.GetEventRecorderFor("nifi-cluster"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiCluster") os.Exit(1) } if err = (&controllers.NifiClusterTaskReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("NifiClusterTask"), - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("NifiClusterTask"), + Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("nifi-cluster-task"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiClusterTask") @@ -144,9 +144,9 @@ func main() { } if err = (&controllers.NifiUserReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("NifiUser"), - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("NifiUser"), + Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("nifi-user"), }).SetupWithManager(mgr, certManagerEnabled); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiUser") @@ -154,9 +154,9 @@ func main() { } if err = (&controllers.NifiUserGroupReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("NifiUserGroup"), - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("NifiUserGroup"), + Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("nifi-user-group"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiUserGroup") @@ -164,9 +164,9 @@ func main() { } if err = (&controllers.NifiDataflowReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("NifiDataflow"), - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("NifiDataflow"), + Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("nifi-dataflow"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiDataflow") @@ -174,9 +174,9 @@ func main() { } if err = (&controllers.NifiParameterContextReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("NifiParameterContext"), - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("NifiParameterContext"), + Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("nifi-parameter-context"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiParameterContext") @@ -184,9 +184,9 @@ func main() { } if err = (&controllers.NifiRegistryClientReconciler{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("NifiRegistryClient"), - Scheme: mgr.GetScheme(), + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("NifiRegistryClient"), + Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("nifi-registry-client"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "NifiRegistryClient") diff --git a/pkg/k8sutil/resource.go b/pkg/k8sutil/resource.go index 949d4cf41..9baa5a8fe 100644 --- a/pkg/k8sutil/resource.go +++ b/pkg/k8sutil/resource.go @@ -35,7 +35,8 @@ import ( // Reconcile reconciles K8S resources func Reconcile(log logr.Logger, client runtimeClient.Client, desired runtimeClient.Object, cr *v1alpha1.NifiCluster) error { desiredType := reflect.TypeOf(desired) - var current = desired + current := desired.DeepCopyObject().(runtimeClient.Object) + var err error switch desired.(type) { @@ -98,9 +99,18 @@ func Reconcile(log logr.Logger, client runtimeClient.Client, desired runtimeClie return errors.WrapIfWithDetails(err, "updating status for resource failed", "kind", desiredType) } } + case *corev1.Secret: + // Only update status when secret belongs to node + if id, ok := desired.(*corev1.Secret).Labels["nodeId"]; ok { + statusErr := UpdateNodeStatus(client, []string{id}, cr, v1alpha1.ConfigOutOfSync, log) + if statusErr != nil { + return errors.WrapIfWithDetails(err, "updating status for resource failed", "kind", desiredType) + } + } } - log.Info("resource updated") } + + log.Info("resource updated") } return nil } diff --git a/pkg/resources/nifi/configmap.go b/pkg/resources/nifi/configmap.go index db7b17f84..1356a0af9 100644 --- a/pkg/resources/nifi/configmap.go +++ b/pkg/resources/nifi/configmap.go @@ -16,7 +16,11 @@ package nifi import ( "bytes" + "context" "fmt" + "github.com/Orange-OpenSource/nifikop/pkg/errorfactory" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" runtimeClient "sigs.k8s.io/controller-runtime/pkg/client" "sort" "strings" @@ -34,8 +38,11 @@ import ( corev1 "k8s.io/api/core/v1" ) +//func encodeBase64(toEncode string) []byte { +// return []byte(base64.StdEncoding.EncodeToString([]byte(toEncode))) +//} func (r *Reconciler) configMap(id int32, nodeConfig *v1alpha1.NodeConfig, serverPass, clientPass string, superUsers []string, log logr.Logger) runtimeClient.Object { - configMap := &corev1.ConfigMap{ + configMap := &corev1.Secret{ ObjectMeta: templates.ObjectMeta( fmt.Sprintf(templates.NodeConfigTemplate+"-%d", r.NifiCluster.Name, id), util.MergeLabels( @@ -44,19 +51,19 @@ func (r *Reconciler) configMap(id int32, nodeConfig *v1alpha1.NodeConfig, server ), r.NifiCluster, ), - Data: map[string]string{ - "nifi.properties": r.generateNifiPropertiesNodeConfig(id, nodeConfig, serverPass, clientPass, superUsers, log), - "zookeeper.properties": r.generateZookeeperPropertiesNodeConfig(id, nodeConfig, log), - "state-management.xml": r.getStateManagementConfigString(nodeConfig, id, log), - "login-identity-providers.xml": r.getLoginIdentityProvidersConfigString(nodeConfig, id, log), - "logback.xml": r.getLogbackConfigString(nodeConfig, id, log), - "bootstrap.conf": r.generateBootstrapPropertiesNodeConfig(id, nodeConfig, log), - "bootstrap-notification-servces.xml": r.getBootstrapNotificationServicesConfigString(nodeConfig, id, log), + Data: map[string][]byte{ + "nifi.properties": []byte(r.generateNifiPropertiesNodeConfig(id, nodeConfig, serverPass, clientPass, superUsers, log)), + "zookeeper.properties": []byte(r.generateZookeeperPropertiesNodeConfig(id, nodeConfig, log)), + "state-management.xml": []byte(r.getStateManagementConfigString(nodeConfig, id, log)), + "login-identity-providers.xml": []byte(r.getLoginIdentityProvidersConfigString(nodeConfig, id, log)), + "logback.xml": []byte(r.getLogbackConfigString(nodeConfig, id, log)), + "bootstrap.conf": []byte(r.generateBootstrapPropertiesNodeConfig(id, nodeConfig, log)), + "bootstrap-notification-servces.xml": []byte(r.getBootstrapNotificationServicesConfigString(nodeConfig, id, log)), }, } if nificlient.UseSSL(r.NifiCluster) { - configMap.Data["authorizers.xml"] = r.getAuthorizersConfigString(nodeConfig, id, log) + configMap.Data["authorizers.xml"] = []byte(r.getAuthorizersConfigString(nodeConfig, id, log)) } return configMap } @@ -67,29 +74,36 @@ func (r *Reconciler) configMap(id int32, nodeConfig *v1alpha1.NodeConfig, server // func (r Reconciler) generateNifiPropertiesNodeConfig(id int32, nodeConfig *v1alpha1.NodeConfig, serverPass, clientPass string, superUsers []string, log logr.Logger) string { - var parsedReadOnlyClusterConfig map[string]string - + var readOnlyClusterConfig map[string]string if &r.NifiCluster.Spec.ReadOnlyConfig != nil && &r.NifiCluster.Spec.ReadOnlyConfig.NifiProperties != nil { - parsedReadOnlyClusterConfig = util.ParsePropertiesFormat(r.NifiCluster.Spec.ReadOnlyConfig.NifiProperties.OverrideConfigs) + r.generateReadOnlyConfig( + &readOnlyClusterConfig, + r.NifiCluster.Spec.ReadOnlyConfig.NifiProperties.OverrideSecretConfig, + r.NifiCluster.Spec.ReadOnlyConfig.NifiProperties.OverrideConfigMap, + r.NifiCluster.Spec.ReadOnlyConfig.NifiProperties.OverrideConfigs, log) } - var parsedReadOnlyNodeConfig = map[string]string{} + var readOnlyNodeConfig = map[string]string{} for _, node := range r.NifiCluster.Spec.Nodes { if node.Id == id && node.ReadOnlyConfig != nil && &node.ReadOnlyConfig.NifiProperties != nil { - parsedReadOnlyNodeConfig = util.ParsePropertiesFormat(node.ReadOnlyConfig.NifiProperties.OverrideConfigs) + r.generateReadOnlyConfig( + &readOnlyNodeConfig, + node.ReadOnlyConfig.NifiProperties.OverrideSecretConfig, + node.ReadOnlyConfig.NifiProperties.OverrideConfigMap, + node.ReadOnlyConfig.NifiProperties.OverrideConfigs, log) break } } - if err := mergo.Merge(&parsedReadOnlyNodeConfig, parsedReadOnlyClusterConfig); err != nil { + if err := mergo.Merge(&readOnlyNodeConfig, readOnlyClusterConfig); err != nil { log.Error(err, "error occurred during merging readonly configs") } //Generate the Complete Configuration for the Node completeConfigMap := map[string]string{} - if err := mergo.Merge(&completeConfigMap, parsedReadOnlyNodeConfig); err != nil { + if err := mergo.Merge(&completeConfigMap, readOnlyNodeConfig); err != nil { log.Error(err, "error occurred during merging readOnly config to complete configs") } @@ -176,34 +190,42 @@ func generateSuperUsers(users []string) (suStrings []string) { // func (r Reconciler) generateZookeeperPropertiesNodeConfig(id int32, nodeConfig *v1alpha1.NodeConfig, log logr.Logger) string { - var parsedReadOnlyClusterConfig map[string]string + var readOnlyClusterConfig map[string]string if &r.NifiCluster.Spec.ReadOnlyConfig != nil && &r.NifiCluster.Spec.ReadOnlyConfig.ZookeeperProperties != nil { - parsedReadOnlyClusterConfig = util.ParsePropertiesFormat(r.NifiCluster.Spec.ReadOnlyConfig.ZookeeperProperties.OverrideConfigs) + r.generateReadOnlyConfig( + &readOnlyClusterConfig, + r.NifiCluster.Spec.ReadOnlyConfig.ZookeeperProperties.OverrideSecretConfig, + r.NifiCluster.Spec.ReadOnlyConfig.ZookeeperProperties.OverrideConfigMap, + r.NifiCluster.Spec.ReadOnlyConfig.ZookeeperProperties.OverrideConfigs, log) } - var parsedReadOnlyNodeConfig = map[string]string{} + var readOnlyNodeConfig = map[string]string{} for _, node := range r.NifiCluster.Spec.Nodes { if node.Id == id && node.ReadOnlyConfig != nil && &node.ReadOnlyConfig.ZookeeperProperties != nil { - parsedReadOnlyNodeConfig = util.ParsePropertiesFormat(node.ReadOnlyConfig.ZookeeperProperties.OverrideConfigs) + r.generateReadOnlyConfig( + &readOnlyNodeConfig, + node.ReadOnlyConfig.ZookeeperProperties.OverrideSecretConfig, + node.ReadOnlyConfig.ZookeeperProperties.OverrideConfigMap, + node.ReadOnlyConfig.ZookeeperProperties.OverrideConfigs, log) break } } - if err := mergo.Merge(&parsedReadOnlyNodeConfig, parsedReadOnlyClusterConfig); err != nil { + if err := mergo.Merge(&readOnlyNodeConfig, readOnlyClusterConfig); err != nil { log.Error(err, "error occurred during merging readonly configs") } //Generate the Complete Configuration for the Node completeConfigMap := map[string]string{} - if err := mergo.Merge(&completeConfigMap, util.ParsePropertiesFormat(r.getZookeeperPropertiesConfigString(nodeConfig, id, log))); err != nil { - log.Error(err, "error occurred during merging operator generated configs") + if err := mergo.Merge(&completeConfigMap, readOnlyNodeConfig); err != nil { + log.Error(err, "error occurred during merging readOnly config to complete configs") } - if err := mergo.Merge(&completeConfigMap, parsedReadOnlyNodeConfig); err != nil { - log.Error(err, "error occurred during merging readOnly config to complete configs") + if err := mergo.Merge(&completeConfigMap, util.ParsePropertiesFormat(r.getZookeeperPropertiesConfigString(nodeConfig, id, log))); err != nil { + log.Error(err, "error occurred during merging operator generated configs") } completeConfig := []string{} @@ -282,6 +304,43 @@ func (r *Reconciler) getLoginIdentityProvidersConfigString(nConfig *v1alpha1.Nod // func (r *Reconciler) getLogbackConfigString(nConfig *v1alpha1.NodeConfig, id int32, log logr.Logger) string { + for _, node := range r.NifiCluster.Spec.Nodes { + if node.Id == id && node.ReadOnlyConfig != nil && &node.ReadOnlyConfig.LogbackConfig != nil { + if node.ReadOnlyConfig.LogbackConfig.ReplaceSecretConfig != nil { + conf, err := r.getSecrectConfig(context.TODO(), *node.ReadOnlyConfig.LogbackConfig.ReplaceSecretConfig) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly secret config") + } + + if node.ReadOnlyConfig.LogbackConfig.ReplaceConfigMap != nil { + conf, err := r.getConfigMap(context.TODO(), *node.ReadOnlyConfig.LogbackConfig.ReplaceConfigMap) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly configmap") + } + break + } + } + + if r.NifiCluster.Spec.ReadOnlyConfig.LogbackConfig.ReplaceSecretConfig != nil { + conf, err := r.getSecrectConfig(context.TODO(), *r.NifiCluster.Spec.ReadOnlyConfig.LogbackConfig.ReplaceSecretConfig) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly secret config") + } + + if r.NifiCluster.Spec.ReadOnlyConfig.LogbackConfig.ReplaceConfigMap != nil { + conf, err := r.getConfigMap(context.TODO(), *r.NifiCluster.Spec.ReadOnlyConfig.LogbackConfig.ReplaceConfigMap) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly configmap") + } + var out bytes.Buffer t := template.Must(template.New("nConfig-config").Parse(config.LogbackTemplate)) if err := t.Execute(&out, map[string]interface{}{ @@ -300,6 +359,43 @@ func (r *Reconciler) getLogbackConfigString(nConfig *v1alpha1.NodeConfig, id int // func (r *Reconciler) getBootstrapNotificationServicesConfigString(nConfig *v1alpha1.NodeConfig, id int32, log logr.Logger) string { + for _, node := range r.NifiCluster.Spec.Nodes { + if node.Id == id && node.ReadOnlyConfig != nil && &node.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig != nil { + if node.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceSecretConfig != nil { + conf, err := r.getSecrectConfig(context.TODO(), *node.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceSecretConfig) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly secret config") + } + + if node.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceConfigMap != nil { + conf, err := r.getConfigMap(context.TODO(), *node.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceConfigMap) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly configmap") + } + break + } + } + + if r.NifiCluster.Spec.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceSecretConfig != nil { + conf, err := r.getSecrectConfig(context.TODO(), *r.NifiCluster.Spec.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceSecretConfig) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly secret config") + } + + if r.NifiCluster.Spec.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceConfigMap != nil { + conf, err := r.getConfigMap(context.TODO(), *r.NifiCluster.Spec.ReadOnlyConfig.BootstrapNotificationServicesReplaceConfig.ReplaceConfigMap) + if err == nil { + return conf + } + log.Error(err, "error occurred during getting readonly configmap") + } + var out bytes.Buffer t := template.Must(template.New("nConfig-config").Parse(config.BootstrapNotificationServicesTemplate)) if err := t.Execute(&out, map[string]interface{}{ @@ -356,34 +452,42 @@ func (r *Reconciler) getAuthorizersConfigString(nConfig *v1alpha1.NodeConfig, id // func (r Reconciler) generateBootstrapPropertiesNodeConfig(id int32, nodeConfig *v1alpha1.NodeConfig, log logr.Logger) string { - var parsedReadOnlyClusterConfig map[string]string + var readOnlyClusterConfig map[string]string if &r.NifiCluster.Spec.ReadOnlyConfig != nil && &r.NifiCluster.Spec.ReadOnlyConfig.BootstrapProperties != nil { - parsedReadOnlyClusterConfig = util.ParsePropertiesFormat(r.NifiCluster.Spec.ReadOnlyConfig.BootstrapProperties.OverrideConfigs) + r.generateReadOnlyConfig( + &readOnlyClusterConfig, + r.NifiCluster.Spec.ReadOnlyConfig.BootstrapProperties.OverrideSecretConfig, + r.NifiCluster.Spec.ReadOnlyConfig.BootstrapProperties.OverrideConfigMap, + r.NifiCluster.Spec.ReadOnlyConfig.BootstrapProperties.OverrideConfigs, log) } - var parsedReadOnlyNodeConfig = map[string]string{} + var readOnlyNodeConfig = map[string]string{} for _, node := range r.NifiCluster.Spec.Nodes { if node.Id == id && node.ReadOnlyConfig != nil && &node.ReadOnlyConfig.BootstrapProperties != nil { - parsedReadOnlyNodeConfig = util.ParsePropertiesFormat(node.ReadOnlyConfig.BootstrapProperties.OverrideConfigs) + r.generateReadOnlyConfig( + &readOnlyNodeConfig, + node.ReadOnlyConfig.BootstrapProperties.OverrideSecretConfig, + node.ReadOnlyConfig.BootstrapProperties.OverrideConfigMap, + node.ReadOnlyConfig.BootstrapProperties.OverrideConfigs, log) break } } - if err := mergo.Merge(&parsedReadOnlyNodeConfig, parsedReadOnlyClusterConfig); err != nil { + if err := mergo.Merge(&readOnlyNodeConfig, readOnlyClusterConfig); err != nil { log.Error(err, "error occurred during merging readonly configs") } //Generate the Complete Configuration for the Node completeConfigMap := map[string]string{} - if err := mergo.Merge(&completeConfigMap, util.ParsePropertiesFormat(r.getBootstrapPropertiesConfigString(nodeConfig, id, log))); err != nil { - log.Error(err, "error occurred during merging operator generated configs") + if err := mergo.Merge(&completeConfigMap, readOnlyNodeConfig); err != nil { + log.Error(err, "error occurred during merging readOnly config to complete configs") } - if err := mergo.Merge(&completeConfigMap, parsedReadOnlyNodeConfig); err != nil { - log.Error(err, "error occurred during merging readOnly config to complete configs") + if err := mergo.Merge(&completeConfigMap, util.ParsePropertiesFormat(r.getBootstrapPropertiesConfigString(nodeConfig, id, log))); err != nil { + log.Error(err, "error occurred during merging operator generated configs") } completeConfig := []string{} @@ -429,3 +533,73 @@ func (r *Reconciler) GetNifiPropertiesBase(id int32) *v1alpha1.NifiProperties { return base } + +func (r Reconciler) getSecrectConfig(ctx context.Context, ref v1alpha1.SecretConfigReference) (conf string, err error) { + secret := &corev1.Secret{} + err = r.Client.Get(ctx, types.NamespacedName{Name: ref.Name, Namespace: ref.Namespace}, secret) + if err != nil { + if apierrors.IsNotFound(err) { + return conf, errorfactory.New(errorfactory.ResourceNotReady{}, err, "config secret not ready") + } + return conf, errorfactory.New(errorfactory.APIFailure{}, err, "failed to get config secret") + } + conf = string(secret.Data[ref.Data]) + + return conf, nil +} + +func (r Reconciler) getConfigMap(ctx context.Context, ref v1alpha1.ConfigmapReference) (conf string, err error) { + configmap := &corev1.ConfigMap{} + err = r.Client.Get(ctx, types.NamespacedName{Name: ref.Name, Namespace: ref.Namespace}, configmap) + if err != nil { + if apierrors.IsNotFound(err) { + return conf, errorfactory.New(errorfactory.ResourceNotReady{}, err, "configmap not ready") + } + return conf, errorfactory.New(errorfactory.APIFailure{}, err, "failed to get configmap") + } + conf = configmap.Data[ref.Data] + + return conf, nil +} + +func (r Reconciler) generateReadOnlyConfig( + readOnlyClusterConfig *map[string]string, + overrideSecretConfig *v1alpha1.SecretConfigReference, + overrideConfigMap *v1alpha1.ConfigmapReference, + overrideConfigs string, + log logr.Logger) { + + var parsedReadOnlySecretClusterConfig map[string]string + var parsedReadOnlyClusterConfig map[string]string + var parsedReadOnlyClusterConfigMap map[string]string + + if overrideSecretConfig != nil { + secretConfig, err := r.getSecrectConfig(context.TODO(), *overrideSecretConfig) + if err != nil { + log.Error(err, "error occurred during getting readonly secret config") + } + parsedReadOnlySecretClusterConfig = util.ParsePropertiesFormat(secretConfig) + } + + if overrideConfigMap != nil { + configMap, err := r.getConfigMap(context.TODO(), *overrideConfigMap) + if err != nil { + log.Error(err, "error occurred during getting readonly configmap") + } + parsedReadOnlyClusterConfigMap = util.ParsePropertiesFormat(configMap) + } + + parsedReadOnlyClusterConfig = util.ParsePropertiesFormat(overrideConfigs) + + if err := mergo.Merge(readOnlyClusterConfig, parsedReadOnlySecretClusterConfig); err != nil { + log.Error(err, "error occurred during merging readonly configs") + } + + if err := mergo.Merge(readOnlyClusterConfig, parsedReadOnlyClusterConfig); err != nil { + log.Error(err, "error occurred during merging readonly configs") + } + + if err := mergo.Merge(readOnlyClusterConfig, parsedReadOnlyClusterConfigMap); err != nil { + log.Error(err, "error occurred during merging readonly configs") + } +} diff --git a/pkg/resources/nifi/pod.go b/pkg/resources/nifi/pod.go index 180141b28..c03ee3526 100644 --- a/pkg/resources/nifi/pod.go +++ b/pkg/resources/nifi/pod.go @@ -77,9 +77,11 @@ func (r *Reconciler) pod(id int32, nodeConfig *v1alpha1.NodeConfig, pvcs []corev { Name: nodeConfigMapVolumeMount, VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: fmt.Sprintf(templates.NodeConfigTemplate+"-%d", r.NifiCluster.Name, id)}, - DefaultMode: util.Int32Pointer(0644), + //ConfigMap: &corev1.ConfigMapVolumeSource{ + Secret: &corev1.SecretVolumeSource{ + //LocalObjectReference: corev1.LocalObjectReference{Name: fmt.Sprintf(templates.NodeConfigTemplate+"-%d", r.NifiCluster.Name, id)}, + SecretName: fmt.Sprintf(templates.NodeConfigTemplate+"-%d", r.NifiCluster.Name, id), + DefaultMode: util.Int32Pointer(0644), }, }, }, diff --git a/site/docs/5_references/1_nifi_cluster/2_read_only_config.md b/site/docs/5_references/1_nifi_cluster/2_read_only_config.md index 53413c82c..977b77881 100644 --- a/site/docs/5_references/1_nifi_cluster/2_read_only_config.md +++ b/site/docs/5_references/1_nifi_cluster/2_read_only_config.md @@ -7,45 +7,114 @@ sidebar_label: Read only configurations ReadOnlyConfig object specifies the read-only type Nifi config cluster wide, all theses will be merged with node specified readOnly configurations, so it can be overwritten per node. ```yaml - # readOnlyConfig specifies the read-only type Nifi config cluster wide, all theses - # will be merged with node specified readOnly configurations, so it can be overwritten per node. - readOnlyConfig: - # NifiProperties configuration that will be applied to the node. - nifiProperties: - # Additionnals nifi.properties configuration that will override the one produced based - # on template and configurations. - overrideConfigs: | - nifi.ui.banner.text=NiFiKop by Orange - # A comma separated list of allowed HTTP Host header values to consider when NiFi - # is running securely and will be receiving requests to a different host[:port] than it is bound to. - # https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#web-properties -# webProxyHost: - # Nifi security client auth - needClientAuth: false - # Indicates which of the configured authorizers in the authorizers.xml file to use - # https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#authorizer-configuration -# authorizer: - # ZookeeperProperties configuration that will be applied to the node. - zookeeperProperties: - # Additionnals zookeeper.properties configuration that will override the one produced based - # on template and configurations. - overrideConfigs: | - initLimit=15 - autopurge.purgeInterval=24 - syncLimit=5 - tickTime=2000 - dataDir=./state/zookeeper - autopurge.snapRetainCount=30 - # BootstrapProperties configuration that will be applied to the node. - bootstrapProperties: - # JVM memory settings - nifiJvmMemory: "512m" - # Additionnals bootstrap.properties configuration that will override the one produced based - # on template and configurations. - # https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#bootstrap_properties - overrideConfigs: | - # java.arg.4=-Djava.net.preferIPv4Stack=true - +readOnlyConfig: + # Logback configuration that will be applied to the node + logbackConfig: + # logback.xml configuration that will replace the one produced based on template + replaceConfigMap: + # The key of the value,in data content, that we want use. + data: logback.xml + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop + # logback.xml configuration that will replace the one produced based on template and overrideConfigMap + replaceSecretConfig: + # The key of the value,in data content, that we want use. + data: logback.xml + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop + # NifiProperties configuration that will be applied to the node. + nifiProperties: + # Additionnals nifi.properties configuration that will override the one produced based on template and + # configuration + overrideConfigMap: + # The key of the value,in data content, that we want use. + data: nifi.properties + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop. + # Additionnals nifi.properties configuration that will override the one produced based + # on template, configurations, overrideConfigMap and overrideConfigs. + overrideSecretConfig: + # The key of the value,in data content, that we want use. + data: nifi.properties + # Name of the configmap that we want to refer. + name: raw + # Namespace where is located the secret that we want to refer. + namespace: nifikop + # Additionnals nifi.properties configuration that will override the one produced based + # on template, configurations and overrideConfigMap + overrideConfigs: | + nifi.ui.banner.text=NiFiKop by Orange + # A comma separated list of allowed HTTP Host header values to consider when NiFi + # is running securely and will be receiving requests to a different host[:port] than it is bound to. + # https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#web-properties + # webProxyHosts: + # Nifi security client auth + needClientAuth: false + # Indicates which of the configured authorizers in the authorizers.xml file to use + # https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#authorizer-configuration + # authorizer: + # ZookeeperProperties configuration that will be applied to the node. + zookeeperProperties: + # # Additionnals zookeeeper.properties configuration that will override the one produced based on template and + # # configuration + # overrideConfigMap: + # # The key of the value,in data content, that we want use. + # data: zookeeeper.properties + # # Name of the configmap that we want to refer. + # name: raw + # # Namespace where is located the secret that we want to refer. + # namespace: nifikop. + # # Additionnals zookeeeper.properties configuration that will override the one produced based + # # on template, configurations, overrideConfigMap and overrideConfigs. + # overrideSecretConfig: + # # The key of the value,in data content, that we want use. + # data: zookeeeper.properties + # # Name of the configmap that we want to refer. + # name: raw + # # Namespace where is located the secret that we want to refer. + # namespace: nifikop + # Additionnals zookeeper.properties configuration that will override the one produced based + # on template and configurations. + overrideConfigs: | + initLimit=15 + autopurge.purgeInterval=24 + syncLimit=5 + tickTime=2000 + dataDir=./state/zookeeper + autopurge.snapRetainCount=30 + # BootstrapProperties configuration that will be applied to the node. + bootstrapProperties: + # # Additionnals bootstrap.properties configuration that will override the one produced based on template and + # # configuration + # overrideConfigMap: + # # The key of the value,in data content, that we want use. + # data: bootstrap.properties + # # Name of the configmap that we want to refer. + # name: raw + # # Namespace where is located the secret that we want to refer. + # namespace: nifikop. + # # Additionnals bootstrap.properties configuration that will override the one produced based + # # on template, configurations, overrideConfigMap and overrideConfigs. + # overrideSecretConfig: + # # The key of the value,in data content, that we want use. + # data: bootstrap.properties + # # Name of the configmap that we want to refer. + # name: raw + # # Namespace where is located the secret that we want to refer. + # namespace: nifikop + # JVM memory settings + nifiJvmMemory: "512m" + # Additionnals bootstrap.properties configuration that will override the one produced based + # on template and configurations. + # https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#bootstrap_properties + overrideConfigs: | + # java.arg.4=-Djava.net.preferIPv4Stack=true ``` ## ReadOnlyConfig @@ -55,12 +124,16 @@ ReadOnlyConfig object specifies the read-only type Nifi config cluster wide, all |nifiProperties|[NifiProperties](#nifiproperties)|nifi.properties configuration that will be applied to the node.|No|nil| |zookeeperProperties|[ZookeeperProperties](#zookeeperproperties)|zookeeper.properties configuration that will be applied to the node.|No|nil| |bootstrapProperties|[BootstrapProperties](#bootstrapproperties)|bootstrap.conf configuration that will be applied to the node.|No|nil| +|logbackConfig|[LogbackConfig](#logbackconfig)|logback.xml configuration that will be applied to the node.|No|nil| +|bootstrapNotificationServicesConfig|[BootstrapNotificationServices](#bootstrapnotificationservices)|bootstrap_notification_services.xml configuration that will be applied to the node.|No|nil| ## NifiProperties |Field|Type|Description|Required|Default| |-----|----|-----------|--------|--------| -|overrideConfigs|string|Additionnals nifi.properties configuration that will override the one produced based on template and configurations.|No|""| +|overrideConfigMap|[ConfigmapReference](#configmapreference)|Additionnals nifi.properties configuration that will override the one produced based on template and configuration.|No|nil| +|overrideConfigs|string|Additionnals nifi.properties configuration that will override the one produced based on template, configurations and overrideConfigMap.|No|""| +|overrideSecretConfig|[SecretConfigReference](#secretconfigreference)|Additionnals nifi.properties configuration that will override the one produced based on template, configurations, overrideConfigMap and overrideConfigs.|No|nil| |webProxyHosts|\[ \]string| A list of allowed HTTP Host header values to consider when NiFi is running securely and will be receiving requests to a different host[:port] than it is bound to. [web-properties](https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#web-properties)|No|""| |needClientAuth|boolean|Nifi security client auth.|No|false| |authorizer|string|Indicates which of the configured authorizers in the authorizers.xml file to use [authorizer-configuration](https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#authorizer-configuration)|No|"managed-authorizer"| @@ -70,11 +143,45 @@ ReadOnlyConfig object specifies the read-only type Nifi config cluster wide, all |Field|Type|Description|Required|Default| |-----|----|-----------|--------|--------| -|overrideConfigs|string|Additionnals zookeeper.properties configuration that will override the one produced based on template and configurations.|No|""| +|overrideConfigMap|[ConfigmapReference](#configmapreference)|Additionnals zookeeper.properties configuration that will override the one produced based on template and configuration.|No|nil| +|overrideConfigs|string|Additionnals zookeeper.properties configuration that will override the one produced based on template, configurations and overrideConfigMap.|No|""| +|overrideSecretConfig|[SecretConfigReference](#secretconfigreference)|Additionnals zookeeper.properties configuration that will override the one produced based on template, configurations, overrideConfigMap and overrideConfigs.|No|nil| ## BootstrapProperties |Field|Type|Description|Required|Default| |-----|----|-----------|--------|--------| -|overrideConfigs|string|Additionnals bootstrap.conf configuration that will override the one produced based on template and configurations.|No|""| -|NifiJvmMemory|string|JVM memory settings.|No|"512m"| \ No newline at end of file +|overrideConfigMap|[ConfigmapReference](#configmapreference)|Additionnals bootstrap.properties configuration that will override the one produced based on template and configuration.|No|nil| +|overrideConfigs|string|Additionnals bootstrap.properties configuration that will override the one produced based on template, configurations and overrideConfigMap.|No|""| +|overrideSecretConfig|[SecretConfigReference](#secretconfigreference)|Additionnals bootstrap.properties configuration that will override the one produced based on template, configurations, overrideConfigMap and overrideConfigs.|No|nil| +|NifiJvmMemory|string|JVM memory settings.|No|"512m"| + +## LogbackConfig + +|Field|Type|Description|Required|Default| +|-----|----|-----------|--------|--------| +|replaceConfigMap|[ConfigmapReference](#configmapreference)|logback.xml configuration that will replace the one produced based on template.|No|nil| +|replaceSecretConfig|[SecretConfigReference](#secretconfigreference)|logback.xml configuration that will replace the one produced based on template and overrideConfigMap.|No|nil| + +## BootstrapNotificationServicesConfig + +|Field|Type|Description|Required|Default| +|-----|----|-----------|--------|--------| +|replaceConfigMap|[ConfigmapReference](#configmapreference)|bootstrap_notifications_services.xml configuration that will replace the one produced based on template.|No|nil| +|replaceSecretConfig|[SecretConfigReference](#secretconfigreference)|bootstrap_notifications_services.xml configuration that will replace the one produced based on template and overrideConfigMap.|No|nil| + +## ConfigmapReference + +|Field|Type|Description|Required|Default| +|-----|----|-----------|--------|--------| +|name|string|Name of the configmap that we want to refer.|Yes|""| +|namespace|string|Namespace where is located the configmap that we want to refer.|No|""| +|data|string|The key of the value,in data content, that we want use.|Yes|""| + +## SecretConfigReference + +|Field|Type|Description|Required|Default| +|-----|----|-----------|--------|--------| +|name|string|Name of the secret that we want to refer.|Yes|""| +|namespace|string|Namespace where is located the secret that we want to refer.|No|""| +|data|string|The key of the value,in data content, that we want use.|Yes|""| \ No newline at end of file