class KubernetesConfigDataLoader implements ConfigDataLoader<KubernetesConfigDataResource>, Ordered {

	@Override
	public ConfigData load(ConfigDataLoaderContext context, KubernetesConfigDataResource resource)
			throws IOException, ConfigDataResourceNotFoundException {<FILL_FUNCTION_BODY>}

	@Override
	public int getOrder() {
		return -1;
	}

}


		List<PropertySource<?>> propertySources = new ArrayList<>(2);
		ConfigurableBootstrapContext bootstrapContext = context.getBootstrapContext();
		Environment env = resource.getEnvironment();

		if (bootstrapContext.isRegistered(SecretsPropertySourceLocator.class)) {
			propertySources.add(bootstrapContext.get(SecretsPropertySourceLocator.class).locate(env));
		}

		if (bootstrapContext.isRegistered(ConfigMapPropertySourceLocator.class)) {
			propertySources.add(bootstrapContext.get(ConfigMapPropertySourceLocator.class).locate(env));
		}

		// boot 2.4.5+
		return new ConfigData(propertySources, propertySource -> {
			String propertySourceName = propertySource.getName();
			List<Option> options = new ArrayList<>();
			options.add(Option.IGNORE_IMPORTS);
			options.add(Option.IGNORE_PROFILES);
			// TODO: the profile is now available on the backend
			// in a future minor, add the profile associated with a
			// PropertySource see
			// https://github.com/spring-cloud/spring-cloud-config/issues/1874
			for (String profile : resource.getAcceptedProfiles()) {
				// TODO: switch to match
				// , is used as a profile-separator for property sources
				// from vault
				// - is the default profile-separator for property sources
				if (propertySourceName.matches(".*[-,]" + profile + ".*")) {
					// // TODO: switch to Options.with() when implemented
					options.add(Option.PROFILE_SPECIFIC);
				}
			}
			return ConfigData.Options.of(options.toArray(new Option[0]));
		});

	
<no_super_class>