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
from pyspark import SparkConf | |
from pyspark.sql import SparkSession | |
# Spark Session Configuration | |
conf = ( | |
SparkConf() | |
.set("spark.mongodb.write.connection.uri", "mongodb+srv://test:test@spark.cvq7lmq.mongodb.net/test.test") | |
.set("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions") | |
.set("spark.sql.catalog.demo", "org.apache.iceberg.spark.SparkCatalog") | |
.set("spark.sql.catalog.demo.type", "hadoop") |
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: kyverno.io/v1 | |
kind: Policy | |
metadata: | |
name: allowed-image-repos | |
namespace: a | |
annotations: | |
policies.kyverno.io/title: Allowed Image Repositories | |
policies.kyverno.io/category: Other | |
policies.kyverno.io/severity: medium | |
kyverno.io/kyverno-version: 1.9.0 |
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: kyverno.io/v1 | |
kind: Policy | |
metadata: | |
name: add-nodeselector | |
namespace: a | |
annotations: | |
policies.kyverno.io/title: Add nodeSelector | |
policies.kyverno.io/category: Sample | |
policies.kyverno.io/subject: Pod | |
policies.kyverno.io/minversion: 1.6.0 |
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
vpa: | |
enabled: true | |
recommender: | |
enabled: true | |
updater: | |
enabled: false | |
metrics-server: | |
enabled: true | |
apiService: |
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
# Choose the Image which has Node installed already | |
FROM node:alpine as build | |
WORKDIR /code | |
COPY package.json package.json | |
COPY package-lock.json package-lock.json | |
RUN npm ci --production | |
# COPY all the files from Current Directory into the Container |
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
FROM node:alpine | |
WORKDIR /app | |
COPY package.json ./ | |
COPY package-lock.json ./ | |
COPY ./ ./ | |
RUN npm i | |
CMD ["npm", "run", "start"] |
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: policy.jspolicy.com/v1beta1 | |
kind: JsPolicy | |
metadata: | |
name: "ns.rq.devsecops.com" | |
spec: | |
operations: ["CREATE"] | |
resources: ["namespaces"] | |
apiGroups: [""] | |
type: Controller | |
objectSelector: |
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: policy.jspolicy.com/v1beta1 | |
kind: JsPolicy | |
metadata: | |
name: "deny-default-namespace.devsecops.com" | |
spec: | |
operations: ["CREATE"] | |
resources: ["*"] | |
scope: Namespaced | |
javascript: | | |
if (request.namespace === "default") { |
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: policy.jspolicy.com/v1beta1 | |
kind: JsPolicy | |
metadata: | |
name: "inject-agent-sidecar.devsecops.com" | |
spec: | |
type: Mutating | |
operations: ["CREATE"] | |
resources: ["pods"] | |
javascript: | | |
if (request.object.metadata?.annotations?.["inject-agent"] === "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
import kfp | |
from kfp import dsl | |
import kfp.components as comp | |
# Creating a component | |
@comp.create_component_from_func | |
def process_data_op(): | |
print("Processing Data") | |
NewerOlder