protected MavenProject getProject() { if (buildContext != null) { return buildContext.getProject(); } return null; }
/** * Returns true if the kind is a controller */ public boolean isController() { return isPodController() || isDeployment() || this == Kind.DAEMON_SET || this == Kind.STATEFUL_SET || this == Kind.JOB; }
@Override public Void apply(Enricher enricher) { enricher.addMetadata(builder, enricherList); return null; } });
public BaseEnricher(EnricherContext enricherContext, String name) { this.enricherContext = enricherContext; // Pick the configuration which is for us this.config = new EnricherConfig(name, enricherContext.getConfiguration()); this.log = new PrefixedLogger(name, enricherContext.getLog()); this.name = name; }
protected boolean hasConfig(Configs.Key key) { return config.get(key) != null; }
protected Map<String, String> getRawConfig() { return config.getRawConfig(); }
/** * Override this method to create a per-container readiness probe. */ protected Probe getReadinessProbe(ContainerBuilder containerBuilder) { // return a generic probe by default return getReadinessProbe(); }
/** * Override this method to create a per-container liveness probe. */ protected Probe getLivenessProbe(ContainerBuilder containerBuilder) { // return a generic probe by default return getLivenessProbe(); }
@Override public Void apply(Enricher enricher) { enricher.adapt(builder); return null; } });
public Map<String, String> extract(Enricher enricher, Kind kind) { return enricher.getLabels(kind); } },
public Map<String, String> extract(Enricher enricher, Kind kind) { return enricher.getAnnotations(kind); } },
public Map<String, String> extract(Enricher enricher, Kind kind) { return enricher.getSelector(kind); } };
protected List<ImageConfiguration> getImages() { return buildContext.getImages(); }
/** * Returns true if the kind is a controller */ public boolean isController() { return isPodController() || isDeployment() || this == Kind.DAEMON_SET || this == Kind.STATEFUL_SET || this == Kind.JOB; }
protected String getConfig(Configs.Key key, String defaultVal) { return config.get(key, defaultVal); }
protected Map<String, String> getRawConfig() { return config.getRawConfig(); }
protected String getConfig(Configs.Key key, String defaultVal) { return config.get(key, defaultVal); }
protected String getConfig(Configs.Key key) { return config.get(key); }
protected String getConfig(Configs.Key key) { return config.get(key); }
protected boolean hasConfig(Configs.Key key) { return config.get(key) != null; }