Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Verbose Objects from Kubernetes Server #3

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

aidanmelen
Copy link
Owner

@aidanmelen aidanmelen commented Aug 1, 2022

Fixes

Proposed Changes

  • added new {component}_object outputs that will return the object data from Kubernetes.

for example:

the {component}_object` contains verbose kubernetes server response data for the CFK object:

Click to show ``` kafka = { "authorization" = { "superUsers" = tolist(null) /* of string */ "type" = tostring(null) } "configOverrides" = { "jvm" = tolist(null) /* of string */ "log4j" = tolist(null) /* of string */ "server" = tolist(null) /* of string */ } "dataVolumeCapacity" = "10Gi" "dependencies" = { "kafkaRest" = { "authentication" = { "bearer" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "jaasConfig" = { "secretRef" = tostring(null) } "jaasConfigPassThrough" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "oauthbearer" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "type" = tostring(null) } "bootstrapEndpoint" = tostring(null) "endpoint" = tostring(null) "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "mds" = { "endpoint" = tostring(null) "kafka" = { "authentication" = { "jaasConfig" = { "secretRef" = tostring(null) } "jaasConfigPassThrough" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "oauthbearer" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "type" = tostring(null) } "bootstrapEndpoint" = tostring(null) "discovery" = { "name" = tostring(null) "namespace" = tostring(null) "secretRef" = tostring(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } "tokenKeyPair" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } } "schemaRegistry" = { "authentication" = { "basic" = { "debug" = tobool(null) "directoryPathInContainer" = tostring(null) "restrictedRoles" = tolist(null) /* of string */ "roles" = tolist(null) /* of string */ "secretRef" = tostring(null) } "type" = tostring(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } "url" = tostring(null) } "zookeeper" = { "authentication" = { "jaasConfig" = { "secretRef" = tostring(null) } "jaasConfigPassThrough" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "oauthbearer" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "type" = tostring(null) } "discovery" = { "name" = tostring(null) "namespace" = tostring(null) "secretRef" = tostring(null) } "endpoint" = tostring(null) "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } } "headlessService" = { "annotations" = tomap(null) /* of string */ "labels" = tomap(null) /* of string */ "publishNotReadyAddresses" = tobool(null) } "identityProvider" = { "ldap" = { "address" = tostring(null) "authentication" = { "simple" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "type" = tostring(null) } "configurations" = { "groupMemberAttribute" = tostring(null) "groupMemberAttributePattern" = tostring(null) "groupNameAttribute" = tostring(null) "groupObjectClass" = tostring(null) "groupSearchBase" = tostring(null) "groupSearchFilter" = tostring(null) "groupSearchScope" = tonumber(null) "userMemberOfAttributePattern" = tostring(null) "userNameAttribute" = tostring(null) "userObjectClass" = tostring(null) "userSearchBase" = tostring(null) "userSearchFilter" = tostring(null) "userSearchScope" = tonumber(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "type" = tostring(null) } "image" = { "application" = "confluentinc/cp-server:7.2.0" "init" = "confluentinc/confluent-init-container:2.4.0" "pullPolicy" = tostring(null) "pullSecretRef" = tolist(null) /* of string */ } "injectAnnotations" = tomap(null) /* of string */ "injectLabels" = tomap(null) /* of string */ "k8sClusterDomain" = tostring(null) "license" = { "directoryPathInContainer" = tostring(null) "globalLicense" = tobool(null) "secretRef" = tostring(null) } "listeners" = { "custom" = tolist(null) /* of object */ "external" = { "authentication" = { "jaasConfig" = { "secretRef" = tostring(null) } "jaasConfigPassThrough" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "principalMappingRules" = tolist(null) /* of string */ "type" = tostring(null) } "externalAccess" = { "loadBalancer" = { "advertisedPort" = tonumber(null) "annotations" = tomap(null) /* of string */ "bootstrapPrefix" = tostring(null) "brokerPrefix" = tostring(null) "domain" = tostring(null) "externalTrafficPolicy" = tostring(null) "labels" = tomap(null) /* of string */ "loadBalancerSourceRanges" = tolist(null) /* of string */ "servicePorts" = tolist(null) /* of object */ "sessionAffinity" = tostring(null) "sessionAffinityConfig" = { "clientIP" = { "timeoutSeconds" = tonumber(null) } } } "nodePort" = { "advertisedURL" = { "enabled" = tobool(null) "prefix" = tostring(null) } "annotations" = tomap(null) /* of string */ "externalTrafficPolicy" = tostring(null) "host" = tostring(null) "labels" = tomap(null) /* of string */ "nodePortOffset" = tonumber(null) "servicePorts" = tolist(null) /* of object */ "sessionAffinity" = tostring(null) "sessionAffinityConfig" = { "clientIP" = { "timeoutSeconds" = tonumber(null) } } } "route" = { "annotations" = tomap(null) /* of string */ "bootstrapPrefix" = tostring(null) "brokerPrefix" = tostring(null) "domain" = tostring(null) "labels" = tomap(null) /* of string */ "wildcardPolicy" = tostring(null) } "staticForHostBasedRouting" = { "brokerPrefix" = tostring(null) "domain" = tostring(null) "port" = tonumber(null) } "staticForPortBasedRouting" = { "host" = tostring(null) "portOffset" = tonumber(null) } "type" = tostring(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "internal" = { "authentication" = { "jaasConfig" = { "secretRef" = tostring(null) } "jaasConfigPassThrough" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "principalMappingRules" = tolist(null) /* of string */ "type" = tostring(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } } "metricReporter" = { "authentication" = { "jaasConfig" = { "secretRef" = tostring(null) } "jaasConfigPassThrough" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "oauthbearer" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "type" = tostring(null) } "bootstrapEndpoint" = tostring(null) "enabled" = true "replicationFactor" = tonumber(null) "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "metrics" = { "authentication" = { "type" = tostring(null) } "prometheus" = { "blacklist" = tolist(null) /* of string */ "rules" = tolist(null) /* of object */ "whitelist" = tolist(null) /* of string */ } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "mountedSecrets" = tolist(null) /* of object */ "mountedVolumes" = { "volumeMounts" = tolist(null) /* of object */ "volumes" = null /* tuple */ } "oneReplicaPerNode" = tobool(null) "passwordEncoder" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "podTemplate" = { "affinity" = { "nodeAffinity" = { "preferredDuringSchedulingIgnoredDuringExecution" = tolist(null) /* of object */ "requiredDuringSchedulingIgnoredDuringExecution" = { "nodeSelectorTerms" = tolist(null) /* of object */ } } "podAffinity" = { "preferredDuringSchedulingIgnoredDuringExecution" = tolist(null) /* of object */ "requiredDuringSchedulingIgnoredDuringExecution" = tolist(null) /* of object */ } "podAntiAffinity" = { "preferredDuringSchedulingIgnoredDuringExecution" = tolist(null) /* of object */ "requiredDuringSchedulingIgnoredDuringExecution" = tolist(null) /* of object */ } } "annotations" = tomap(null) /* of string */ "envVars" = tolist(null) /* of object */ "labels" = tomap(null) /* of string */ "podSecurityContext" = { "fsGroup" = tonumber(null) "fsGroupChangePolicy" = tostring(null) "runAsGroup" = tonumber(null) "runAsNonRoot" = tobool(null) "runAsUser" = tonumber(null) "seLinuxOptions" = { "level" = tostring(null) "role" = tostring(null) "type" = tostring(null) "user" = tostring(null) } "seccompProfile" = { "localhostProfile" = tostring(null) "type" = tostring(null) } "supplementalGroups" = tolist(null) /* of number */ "sysctls" = tolist(null) /* of object */ "windowsOptions" = { "gmsaCredentialSpec" = tostring(null) "gmsaCredentialSpecName" = tostring(null) "hostProcess" = tobool(null) "runAsUserName" = tostring(null) } } "priorityClassName" = tostring(null) "probe" = { "liveness" = { "failureThreshold" = tonumber(null) "initialDelaySeconds" = tonumber(null) "periodSeconds" = tonumber(null) "successThreshold" = tonumber(null) "timeoutSeconds" = tonumber(null) } "readiness" = { "failureThreshold" = tonumber(null) "initialDelaySeconds" = tonumber(null) "periodSeconds" = tonumber(null) "successThreshold" = tonumber(null) "timeoutSeconds" = tonumber(null) } } "resources" = { "limits" = tomap(null) /* of string */ "requests" = tomap(null) /* of string */ } "securityContext" = { "allowPrivilegeEscalation" = tobool(null) "capabilities" = { "add" = tolist(null) /* of string */ "drop" = tolist(null) /* of string */ } "privileged" = tobool(null) "procMount" = tostring(null) "readOnlyRootFilesystem" = tobool(null) "runAsGroup" = tonumber(null) "runAsNonRoot" = tobool(null) "runAsUser" = tonumber(null) "seLinuxOptions" = { "level" = tostring(null) "role" = tostring(null) "type" = tostring(null) "user" = tostring(null) } "seccompProfile" = { "localhostProfile" = tostring(null) "type" = tostring(null) } "windowsOptions" = { "gmsaCredentialSpec" = tostring(null) "gmsaCredentialSpecName" = tostring(null) "hostProcess" = tobool(null) "runAsUserName" = tostring(null) } } "serviceAccountName" = tostring(null) "terminationGracePeriodSeconds" = tonumber(null) "tolerations" = tolist(null) /* of object */ "topologySpreadConstraints" = tolist(null) /* of object */ } "rackAssignment" = { "availabilityZoneCount" = tonumber(null) "nodeLabels" = tolist(null) /* of string */ } "replicas" = 3 "services" = { "kafkaRest" = { "authentication" = { "basic" = { "debug" = tobool(null) "directoryPathInContainer" = tostring(null) "restrictedRoles" = tolist(null) /* of string */ "roles" = tolist(null) /* of string */ "secretRef" = tostring(null) } "type" = tostring(null) } "externalAccess" = { "loadBalancer" = { "advertisedURL" = { "enabled" = tobool(null) "prefix" = tostring(null) } "annotations" = tomap(null) /* of string */ "domain" = tostring(null) "externalTrafficPolicy" = tostring(null) "labels" = tomap(null) /* of string */ "loadBalancerSourceRanges" = tolist(null) /* of string */ "port" = tonumber(null) "prefix" = tostring(null) "servicePorts" = tolist(null) /* of object */ "sessionAffinity" = tostring(null) "sessionAffinityConfig" = { "clientIP" = { "timeoutSeconds" = tonumber(null) } } } "nodePort" = { "advertisedURL" = { "enabled" = tobool(null) "prefix" = tostring(null) } "annotations" = tomap(null) /* of string */ "externalTrafficPolicy" = tostring(null) "host" = tostring(null) "labels" = tomap(null) /* of string */ "nodePortOffset" = tonumber(null) "servicePorts" = tolist(null) /* of object */ "sessionAffinity" = tostring(null) "sessionAffinityConfig" = { "clientIP" = { "timeoutSeconds" = tonumber(null) } } } "route" = { "annotations" = tomap(null) /* of string */ "domain" = tostring(null) "labels" = tomap(null) /* of string */ "prefix" = tostring(null) "wildcardPolicy" = tostring(null) } "type" = tostring(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "mds" = { "authentication" = { "type" = tostring(null) } "externalAccess" = { "loadBalancer" = { "advertisedURL" = { "enabled" = tobool(null) "prefix" = tostring(null) } "annotations" = tomap(null) /* of string */ "domain" = tostring(null) "externalTrafficPolicy" = tostring(null) "labels" = tomap(null) /* of string */ "loadBalancerSourceRanges" = tolist(null) /* of string */ "port" = tonumber(null) "prefix" = tostring(null) "servicePorts" = tolist(null) /* of object */ "sessionAffinity" = tostring(null) "sessionAffinityConfig" = { "clientIP" = { "timeoutSeconds" = tonumber(null) } } } "nodePort" = { "advertisedURL" = { "enabled" = tobool(null) "prefix" = tostring(null) } "annotations" = tomap(null) /* of string */ "externalTrafficPolicy" = tostring(null) "host" = tostring(null) "labels" = tomap(null) /* of string */ "nodePortOffset" = tonumber(null) "servicePorts" = tolist(null) /* of object */ "sessionAffinity" = tostring(null) "sessionAffinityConfig" = { "clientIP" = { "timeoutSeconds" = tonumber(null) } } } "route" = { "annotations" = tomap(null) /* of string */ "domain" = tostring(null) "labels" = tomap(null) /* of string */ "prefix" = tostring(null) "wildcardPolicy" = tostring(null) } "type" = tostring(null) } "provider" = { "ldap" = { "address" = tostring(null) "authentication" = { "simple" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } "type" = tostring(null) } "configurations" = { "groupMemberAttribute" = tostring(null) "groupMemberAttributePattern" = tostring(null) "groupNameAttribute" = tostring(null) "groupObjectClass" = tostring(null) "groupSearchBase" = tostring(null) "groupSearchFilter" = tostring(null) "groupSearchScope" = tonumber(null) "userMemberOfAttributePattern" = tostring(null) "userNameAttribute" = tostring(null) "userObjectClass" = tostring(null) "userSearchBase" = tostring(null) "userSearchFilter" = tostring(null) "userSearchScope" = tonumber(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } "type" = tostring(null) } "tls" = { "directoryPathInContainer" = tostring(null) "enabled" = tobool(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } "tokenKeyPair" = { "directoryPathInContainer" = tostring(null) "secretRef" = tostring(null) } } } "storageClass" = { "name" = tostring(null) } "telemetry" = { "global" = tobool(null) } "tls" = { "autoGeneratedCerts" = tobool(null) "directoryPathInContainer" = tostring(null) "ignoreTrustStoreConfig" = tobool(null) "jksPassword" = { "secretRef" = tostring(null) } "secretRef" = tostring(null) } } ```

whereas the kafka_manifest ouput contains the merged manifest data passed to the kubernetes_manifest resource:

kafka_manifest = {
  "dataVolumeCapacity" = "10Gi"
  "image" = {
    "application" = "confluentinc/cp-server:7.2.0"
    "init" = "confluentinc/confluent-init-container:2.4.0"
  }
  "metricReporter" = {
    "enabled" = true
  }
  "replicas" = "3"
}

…m the kubernetes server rather than just returning whatever the user provider. the output objects will now include the null properties that were not specified as inputs. This also introduced a breaking change. the main module outputs for the confluent platform components were changed from '{component}_manifest' to '{component}_object' to reflect that the output data is derived from the server and not the manifest input.
@aidanmelen aidanmelen changed the title added 'kubernetes_manifest' data resources for retrieving objects fro… Output Objects from Kubernetes Server Aug 1, 2022
@aidanmelen aidanmelen changed the title Output Objects from Kubernetes Server Output Verbose Objects from Kubernetes Server Aug 1, 2022
@aidanmelen aidanmelen added the enhancement New feature or request label Aug 1, 2022
@aidanmelen aidanmelen merged commit 848ef08 into main Aug 1, 2022
@aidanmelen aidanmelen deleted the output-server-manifest branch August 1, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant