Support custom database user and database names properly (#240)
This commit is contained in:
1 parent
1bfc9a14be
commit
b4f2ffbf98
15 files changed
+281
-266
No files matched your search
+227
-227
@@ -1,60 +1,60 @@
|
||||
module "fleet" {
|
||||
source = "git::https://github.com/fleetdm/fleet-terraform//k8s?depth=1&ref=tf-mod-k8s-v1.2.1"
|
||||
source = "git::https://github.com/fleetdm/fleet-terraform//k8s?depth=1&ref=tf-mod-k8s-v1.2.1"
|
||||
|
||||
namespace = "fleet"
|
||||
hostname = "fleet.localhost.local"
|
||||
replicas = "3"
|
||||
image_repository = "fleetdm/fleet"
|
||||
image_tag = "v4.79.0"
|
||||
/*
|
||||
namespace = "fleet"
|
||||
hostname = "fleet.localhost.local"
|
||||
replicas = "3"
|
||||
image_repository = "fleetdm/fleet"
|
||||
image_tag = "v4.79.0"
|
||||
/*
|
||||
Example:
|
||||
image_pull_secrets = [
|
||||
{ name = "docker_pull_secret" },
|
||||
{ name = "docker_pull_secret_two"}
|
||||
]
|
||||
*/
|
||||
image_pull_secrets = []
|
||||
pod_annotations = {}
|
||||
service_annotations = {}
|
||||
service_account_annotations = {}
|
||||
image_pull_secrets = []
|
||||
pod_annotations = {}
|
||||
service_annotations = {}
|
||||
service_account_annotations = {}
|
||||
resources = {
|
||||
limits = {
|
||||
cpu = "1"
|
||||
memory = "4Gi"
|
||||
}
|
||||
requests = {
|
||||
cpu = "0.1"
|
||||
memory = "50Mi"
|
||||
}
|
||||
}
|
||||
|
||||
vuln_processing = {
|
||||
ttl_seconds_after_finished = 100
|
||||
restart_policy = "Never"
|
||||
dedicated = false
|
||||
schedule = "0 * * * *"
|
||||
resources = {
|
||||
limits = {
|
||||
cpu = "1"
|
||||
memory = "4Gi"
|
||||
}
|
||||
requests = {
|
||||
cpu = "0.1"
|
||||
memory = "50Mi"
|
||||
}
|
||||
limits = {
|
||||
cpu = "1"
|
||||
memory = "4Gi"
|
||||
}
|
||||
requests = {
|
||||
cpu = "0.1"
|
||||
memory = "50Mi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vuln_processing = {
|
||||
ttl_seconds_after_finished = 100
|
||||
restart_policy = "Never"
|
||||
dedicated = false
|
||||
schedule = "0 * * * *"
|
||||
resources = {
|
||||
limits = {
|
||||
cpu = "1"
|
||||
memory = "4Gi"
|
||||
}
|
||||
requests = {
|
||||
cpu = "0.1"
|
||||
memory = "50Mi"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
node_selector = {}
|
||||
/*
|
||||
node_selector = {}
|
||||
/*
|
||||
EXAMPLE:
|
||||
tolerations = [
|
||||
{ key = "", operator = "", value = "", effect = "" }
|
||||
]
|
||||
*/
|
||||
tolerations = []
|
||||
tolerations = []
|
||||
|
||||
/*
|
||||
/*
|
||||
affinity_rules = {
|
||||
required_during_scheduling_ignored_during_execution = [
|
||||
label_selector = {
|
||||
@@ -120,22 +120,22 @@ module "fleet" {
|
||||
]
|
||||
}
|
||||
*/
|
||||
affinity_rules = {}
|
||||
anti_affinity_rules = {}
|
||||
|
||||
ingress = {
|
||||
enabled = false
|
||||
class_name = ""
|
||||
annotations = {}
|
||||
labels = {}
|
||||
hosts = [{
|
||||
name = "fleet.localhost.local"
|
||||
paths = [{
|
||||
path = "/"
|
||||
path_type = "ImplementationSpecific"
|
||||
}]
|
||||
}]
|
||||
/*
|
||||
affinity_rules = {}
|
||||
anti_affinity_rules = {}
|
||||
|
||||
ingress = {
|
||||
enabled = false
|
||||
class_name = ""
|
||||
annotations = {}
|
||||
labels = {}
|
||||
hosts = [{
|
||||
name = "fleet.localhost.local"
|
||||
paths = [{
|
||||
path = "/"
|
||||
path_type = "ImplementationSpecific"
|
||||
}]
|
||||
}]
|
||||
/*
|
||||
# Example
|
||||
tls = {
|
||||
secret_name = "chart-example-tls"
|
||||
@@ -144,78 +144,78 @@ module "fleet" {
|
||||
]
|
||||
}
|
||||
*/
|
||||
tls = {}
|
||||
}
|
||||
tls = {}
|
||||
}
|
||||
|
||||
fleet = {
|
||||
listen_port = "8080"
|
||||
secret_name = "fleet"
|
||||
migrations = {
|
||||
auto_apply_sql_migrations = true
|
||||
migration_job_annotations = {}
|
||||
parallelism = 1
|
||||
completions = 1
|
||||
active_deadline_seconds = 900
|
||||
backoff_limit = 6
|
||||
manual_selector = false
|
||||
restart_policy = "Never"
|
||||
}
|
||||
tls = {
|
||||
enabled = false
|
||||
unique_tls_secret = false
|
||||
secret_name = "fleet-tls"
|
||||
compatibility = "modern"
|
||||
cert_secret_key = "server.cert"
|
||||
key_secret_key = "server.key"
|
||||
}
|
||||
auth = {
|
||||
b_crypto_cost = "12"
|
||||
salt_key_size = "24"
|
||||
}
|
||||
app = {
|
||||
token_key_size = "24"
|
||||
invite_token_validity_period = "120h"
|
||||
}
|
||||
session = {
|
||||
key_size = 64
|
||||
duration = "2160h"
|
||||
}
|
||||
logging = {
|
||||
debug = false
|
||||
json = false
|
||||
disable_banner = false
|
||||
}
|
||||
carving = {
|
||||
s3 = {
|
||||
bucket_name = ""
|
||||
prefix = ""
|
||||
endpoint_url = ""
|
||||
force_s3_path_style = false
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "s3-bucket"
|
||||
sts_assume_role_arn = ""
|
||||
}
|
||||
}
|
||||
software_installers = {
|
||||
s3 = {
|
||||
bucket_name = ""
|
||||
prefix = ""
|
||||
endpoint_url = ""
|
||||
force_s3_path_style = false
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "s3-software-installers"
|
||||
sts_assume_role_arn = ""
|
||||
}
|
||||
}
|
||||
license = {
|
||||
secret_name = ""
|
||||
license_key = "license-key"
|
||||
}
|
||||
extra_volumes = []
|
||||
extra_volume_mounts = []
|
||||
/*
|
||||
fleet = {
|
||||
listen_port = "8080"
|
||||
secret_name = "fleet"
|
||||
migrations = {
|
||||
auto_apply_sql_migrations = true
|
||||
migration_job_annotations = {}
|
||||
parallelism = 1
|
||||
completions = 1
|
||||
active_deadline_seconds = 900
|
||||
backoff_limit = 6
|
||||
manual_selector = false
|
||||
restart_policy = "Never"
|
||||
}
|
||||
tls = {
|
||||
enabled = false
|
||||
unique_tls_secret = false
|
||||
secret_name = "fleet-tls"
|
||||
compatibility = "modern"
|
||||
cert_secret_key = "server.cert"
|
||||
key_secret_key = "server.key"
|
||||
}
|
||||
auth = {
|
||||
b_crypto_cost = "12"
|
||||
salt_key_size = "24"
|
||||
}
|
||||
app = {
|
||||
token_key_size = "24"
|
||||
invite_token_validity_period = "120h"
|
||||
}
|
||||
session = {
|
||||
key_size = 64
|
||||
duration = "2160h"
|
||||
}
|
||||
logging = {
|
||||
debug = false
|
||||
json = false
|
||||
disable_banner = false
|
||||
}
|
||||
carving = {
|
||||
s3 = {
|
||||
bucket_name = ""
|
||||
prefix = ""
|
||||
endpoint_url = ""
|
||||
force_s3_path_style = false
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "s3-bucket"
|
||||
sts_assume_role_arn = ""
|
||||
}
|
||||
}
|
||||
software_installers = {
|
||||
s3 = {
|
||||
bucket_name = ""
|
||||
prefix = ""
|
||||
endpoint_url = ""
|
||||
force_s3_path_style = false
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "s3-software-installers"
|
||||
sts_assume_role_arn = ""
|
||||
}
|
||||
}
|
||||
license = {
|
||||
secret_name = ""
|
||||
license_key = "license-key"
|
||||
}
|
||||
extra_volumes = []
|
||||
extra_volume_mounts = []
|
||||
/*
|
||||
If you're not providing an id for run_as_user or run_as_group,
|
||||
and you're not running on Openshift (Openshift will set the userid/groupid, if left blank),
|
||||
you might encounter an issue with Fleet pods starting up, where
|
||||
@@ -247,88 +247,88 @@ module "fleet" {
|
||||
run_as_non_root = true
|
||||
}
|
||||
*/
|
||||
security_context = {
|
||||
run_as_user = 3333
|
||||
run_as_group = 3333
|
||||
run_as_non_root = true
|
||||
}
|
||||
security_context = {
|
||||
run_as_user = 3333
|
||||
run_as_group = 3333
|
||||
run_as_non_root = true
|
||||
}
|
||||
}
|
||||
|
||||
osquery = {
|
||||
secret_name = "osquery"
|
||||
node_key_size = 24
|
||||
label_update_interval = "30m"
|
||||
detail_update_interval = "30m"
|
||||
osquery = {
|
||||
secret_name = "osquery"
|
||||
node_key_size = 24
|
||||
label_update_interval = "30m"
|
||||
detail_update_interval = "30m"
|
||||
|
||||
logging = {
|
||||
status_plugin = "filesystem"
|
||||
result_plugin = "filesystem"
|
||||
logging = {
|
||||
status_plugin = "filesystem"
|
||||
result_plugin = "filesystem"
|
||||
|
||||
filesystem = {
|
||||
status_log_file = "osquery_status"
|
||||
result_log_file = "osquery_result"
|
||||
enable_rotation = false
|
||||
enable_compression = false
|
||||
volume_size = "20Gi"
|
||||
}
|
||||
filesystem = {
|
||||
status_log_file = "osquery_status"
|
||||
result_log_file = "osquery_result"
|
||||
enable_rotation = false
|
||||
enable_compression = false
|
||||
volume_size = "20Gi"
|
||||
}
|
||||
|
||||
firehose = {
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "firehose"
|
||||
sts_assume_role_arn = ""
|
||||
status_stream = ""
|
||||
result_stream = ""
|
||||
}
|
||||
firehose = {
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "firehose"
|
||||
sts_assume_role_arn = ""
|
||||
status_stream = ""
|
||||
result_stream = ""
|
||||
}
|
||||
|
||||
kinesis = {
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "kinesis"
|
||||
sts_assume_role_arn = ""
|
||||
status_stream = ""
|
||||
result_stream = ""
|
||||
}
|
||||
kinesis = {
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "kinesis"
|
||||
sts_assume_role_arn = ""
|
||||
status_stream = ""
|
||||
result_stream = ""
|
||||
}
|
||||
|
||||
lambda = {
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "lambda"
|
||||
sts_assume_role_arn = ""
|
||||
status_function = ""
|
||||
result_function = ""
|
||||
}
|
||||
lambda = {
|
||||
region = ""
|
||||
access_key_id = ""
|
||||
secret_key = "lambda"
|
||||
sts_assume_role_arn = ""
|
||||
status_function = ""
|
||||
result_function = ""
|
||||
}
|
||||
|
||||
pubsub = {
|
||||
project = ""
|
||||
status_topic = ""
|
||||
result_topic = ""
|
||||
}
|
||||
}
|
||||
pubsub = {
|
||||
project = ""
|
||||
status_topic = ""
|
||||
result_topic = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
database = {
|
||||
enabled = false
|
||||
secret_name = "mysql"
|
||||
address = "fleet-database-mysql:3306"
|
||||
database = "fleet"
|
||||
username = "fleet"
|
||||
password_key = "password"
|
||||
max_open_conns = 50
|
||||
max_idle_conns = 50
|
||||
conn_max_lifetime = 0
|
||||
database = {
|
||||
enabled = false
|
||||
secret_name = "mysql"
|
||||
address = "fleet-database-mysql:3306"
|
||||
database = "fleet"
|
||||
username = "fleet"
|
||||
password_key = "password"
|
||||
max_open_conns = 50
|
||||
max_idle_conns = 50
|
||||
conn_max_lifetime = 0
|
||||
|
||||
tls = {
|
||||
enabled = false
|
||||
config = ""
|
||||
server_name = ""
|
||||
ca_cert_key = ""
|
||||
cert_key = ""
|
||||
key_key = ""
|
||||
}
|
||||
tls = {
|
||||
enabled = false
|
||||
config = ""
|
||||
server_name = ""
|
||||
ca_cert_key = ""
|
||||
cert_key = ""
|
||||
key_key = ""
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
database_read_replica - optional and be configured to enable Fleet to use read replica for
|
||||
MySQL SELECT statements.
|
||||
|
||||
@@ -355,50 +355,50 @@ module "fleet" {
|
||||
}
|
||||
}
|
||||
*/
|
||||
database_read_replica = {}
|
||||
database_read_replica = {}
|
||||
|
||||
cache = {
|
||||
enabled = false
|
||||
address = "fleet-cache-redis-master:6379"
|
||||
database = "0"
|
||||
use_password = true
|
||||
secret_name = "redis"
|
||||
password_key = "password"
|
||||
cache = {
|
||||
enabled = false
|
||||
address = "fleet-cache-redis-master:6379"
|
||||
database = "0"
|
||||
use_password = true
|
||||
secret_name = "redis"
|
||||
password_key = "password"
|
||||
}
|
||||
|
||||
gke = {
|
||||
cloud_sql = {
|
||||
enable_proxy = false
|
||||
image_repository = "gcr.io/cloudsql-docker/gce-proxy"
|
||||
image_tag = "1.17-alpine"
|
||||
verbose = true
|
||||
instance_name = ""
|
||||
}
|
||||
|
||||
gke = {
|
||||
cloud_sql = {
|
||||
enable_proxy = false
|
||||
image_repository = "gcr.io/cloudsql-docker/gce-proxy"
|
||||
image_tag = "1.17-alpine"
|
||||
verbose = true
|
||||
instance_name = ""
|
||||
}
|
||||
ingress = {
|
||||
use_managed_certificate = false
|
||||
use_gke_ingress = false
|
||||
node_port = 0
|
||||
hostnames = ["example.com","example2.com"]
|
||||
}
|
||||
workload_identity_email = ""
|
||||
ingress = {
|
||||
use_managed_certificate = false
|
||||
use_gke_ingress = false
|
||||
node_port = 0
|
||||
hostnames = ["example.com", "example2.com"]
|
||||
}
|
||||
workload_identity_email = ""
|
||||
}
|
||||
|
||||
environment_variables = [
|
||||
{ name = "FLEET_SERVER_PRIVATE_KEY", value = "" }
|
||||
]
|
||||
/*
|
||||
environment_variables = [
|
||||
{ name = "FLEET_SERVER_PRIVATE_KEY", value = "" }
|
||||
]
|
||||
/*
|
||||
EXAMPLE:
|
||||
environment_from_config_maps = [
|
||||
{ name = "CONFIG_MAP_NAME" }
|
||||
]
|
||||
*/
|
||||
environment_from_config_maps = []
|
||||
environment_from_config_maps = []
|
||||
|
||||
/*
|
||||
/*
|
||||
EXAMPLE:
|
||||
environment_from_secrets = [
|
||||
{ name = "K8S_SECRET_NAME" }
|
||||
]
|
||||
*/
|
||||
environment_from_secrets = []
|
||||
environment_from_secrets = []
|
||||
}
|
||||
Reference in new issue
Block a user