This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
V1CustomResourceDefinition crd = Yaml.loadAs(new File("mycrd.yaml"), V1CustomResourceDefinition.class); | |
JSON crdSerializer = new JSON(); | |
ObjectMapper oasSerializer = Json.mapper(); | |
OpenAPI openapi = new OpenAPI().components(new Components()); | |
Components components = openapi.getComponents(); | |
for (V1CustomResourceDefinitionVersion version : crd.getSpec().getVersions()) { | |
V1JSONSchemaProps crdSchema = version.getSchema().getOpenAPIV3Schema(); | |
JsonSchema oasSchema = oasSerializer.readValue(crdSerializer.serialize(crdSchema), JsonSchema.class); | |
oasSchema.extensions(new HashMap<>()) | |
.addExtension("x-kubernetes-group-version-kind", List.of(Map.of("kind", crd.getSpec().getNames().getKind(), "group", crd.getSpec().getGroup(), "version", version.getName()))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start a Kubernetes Cluster. For building a controller we don't really | |
// need to have worker nodes. The control plane should be plenty. | |
// k3s server gives much more than that the controller-runtime test suite | |
// provides (no controller-manager and scheduler) | |
Path tempDir = Files.createTempDirectory("kube-cluster"); | |
File kubeConfig = new File(tempDir.toFile(), "k3s.yaml"); | |
Process k3sServer = new ProcessBuilder("k3s", "server", "--disable-agent", | |
"--bind-address", "127.0.0.1", | |
"--data-dir", tempDir.toString(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
name: genius | |
namespace: bach-system | |
annotations: | |
kubernetes.io/ingress.class: traefik | |
traefik.ingress.kubernetes.io/browser-xss-filter: "true" | |
traefik.ingress.kubernetes.io/content-type-nosniff: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bind to port 80 and convince users to upgrade to TLS (forcefully) | |
server { | |
listen 80; | |
server_name genius.dev.hadoop.bloomberg.com; | |
rewrite ^ https://genius.dev.hadoop.bloomberg.com$request_uri? permanent; | |
} | |
# The actual TLS port binding | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR] Failed to execute goal on project shade-kubernetes: Could not resolve dependencies for project io.espinosa:shade-kubernetes:jar:1.0-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.7 at specified path /usr/lib/jvm/java-8-jdk/jre/../lib/tools.jar -> [Help 1] | |
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project shade-kubernetes: Could not resolve dependencies for project io.espinosa:shade-kubernetes:jar:1.0-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.7 at specified path /usr/lib/jvm/java-8-jdk/jre/../lib/tools.jar | |
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269) | |
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147) | |
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248) | |
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.nexus.enable = true; | |
services.nginx.enable = true; | |
services.nexus.package = unstablePackages.nexus; | |
services.nginx.virtualHosts."nexus.nixos.test" = { | |
locations."/" = { | |
proxyPass = "http://localhost:8081"; | |
}; | |
extraConfig = '' | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metric_storeFileCount | |
metric_memStoreSize | |
metric_maxStoreFileAge | |
metric_minStoreFileAge | |
metric_avgStoreFileAge | |
metric_numReferenceFiles | |
metric_storeFileSize | |
metric_compactionsCompletedCount | |
metric_numBytesCompactedCount | |
metric_numFilesCompactedCount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bosh stop --skip-drain -d cf | |
Using environment 'https://10.0.0.6:25555' as client 'admin' | |
Using deployment 'cf' | |
Continue? [yN]: y | |
Task 243 | |
Task 243 | 23:44:26 | Preparing deployment: Preparing deployment (00:00:05) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @description anonymizer | |
document.body.innerHTML.replace('[email protected]', 'dockerhp@email'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cookbooks/bcpc-hadoop/recipes/hive_config.rb b/cookbooks/bcpc-hadoop/recipes/hive_config.rb | |
index d5b3dab..98f9375 100644 | |
--- a/cookbooks/bcpc-hadoop/recipes/hive_config.rb | |
+++ b/cookbooks/bcpc-hadoop/recipes/hive_config.rb | |
@@ -31,12 +31,13 @@ stats_password = make_config('mysql-hive-table-stats-password', secure_password) | |
end | |
hive_site_vars = { | |
- is_hive_serverzzzz: node.run_list.expand(node.chef_environment).recipes.include?('bcpc-hadoop::hive_hcatalog'), | |
+ is_hive_server: node.run_list.expand(node.chef_environment).recipes.include?('bcpc-hadoop::hive_hcatalog'), |
NewerOlder