Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View karthikeyanVK's full-sized avatar
🎯
Focusing

Karthikeyan VK karthikeyanVK

🎯
Focusing
View GitHub Profile
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: petshop-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
var HelloBlockchain = artifacts.require("HelloBlockchain");
module.exports = function(done) {
console.log("Getting the deployed version of the HelloBlockchain smart contract")
HelloBlockchain.deployed().then(function(instance) {
console.log("Calling getMessage function for contract ", instance.address);
return instance.getMessage();
}).then(function(result) {
console.log("Request message value: ", result);
console.log("Request complete");
var HelloBlockchain = artifacts.require("HelloBlockchain");
module.exports = function(done) {
console.log("Getting the deployed version of the HelloBlockchain smart contract")
HelloBlockchain.deployed().then(function(instance) {
console.log("Calling SendRequest function for contract ", instance.address);
return instance.SendRequest("Hello, blockchain!");
}).then(function(result) {
console.log("Transaction hash: ", result.tx);
console.log("Request complete");
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
contract HelloBlockchain {
enum StateType {Request, Respond}
//List of properties
StateType public State;
address public Requestor;
address public Responder;
var HelloBlockchain = artifacts.require("HelloBlockchain");
var Arg = "Hello world";
module.exports = deployer => {
deployer.deploy(HelloBlockchain, Arg);
};
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "5777",
}
}
}
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-orders-service
labels:
app: {{ .Values.orders.label.name }}
spec:
ports:
- port: {{ .Values.orders.service.port }}
protocol: TCP
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-orders-deployment
labels:
app: {{ .Values.orders.label.name }}
spec:
replicas: {{ .Values.orders.replicas }}
selector:
matchLabels:
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-products-service
labels:
app: {{ .Values.products.label.name }}
spec:
ports:
- port: {{ .Values.products.service.port }}
protocol: TCP
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-products-deployment
labels:
app: {{ .Values.products.label.name }}
spec:
replicas: {{ .Values.products.replicas }}
selector:
matchLabels: