class KubernetesCommonsSanitizeAutoConfiguration {

	@Bean
	@ConditionalOnMissingBean
	SanitizingFunction secretsPropertySourceSanitizingFunction() {<FILL_FUNCTION_BODY>}

}

		return data -> {
			PropertySource<?> propertySource = data.getPropertySource();
			if (propertySource instanceof BootstrapPropertySource<?> bootstrapPropertySource) {
				PropertySource<?> source = bootstrapPropertySource.getDelegate();
				if (source instanceof SecretsPropertySource) {
					return new SanitizableData(propertySource, data.getKey(), data.getValue())
							.withValue(SanitizableData.SANITIZED_VALUE);
				}
			}

			if (propertySource instanceof SecretsPropertySource) {
				return new SanitizableData(propertySource, data.getKey(), data.getValue())
						.withValue(SanitizableData.SANITIZED_VALUE);
			}

			// at the moment, our structure is pretty simply, CompositePropertySource
			// children can be SecretsPropertySource; i.e.: there is no recursion
			// needed to get all children. If this structure changes, there are enough
			// unit tests that will start failing.
			if (propertySource instanceof CompositePropertySource compositePropertySource) {
				Collection<PropertySource<?>> sources = compositePropertySource.getPropertySources();
				for (PropertySource<?> one : sources) {
					if (one.containsProperty(data.getKey()) && one instanceof SecretsPropertySource) {
						return new SanitizableData(propertySource, data.getKey(), data.getValue())
								.withValue(SanitizableData.SANITIZED_VALUE);
					}
				}
			}
			return data;
		};
	
<no_super_class>