Skip to content

Commit

Permalink
Merge pull request #143 from perfectsense/feature/kube-ready
Browse files Browse the repository at this point in the history
Feature/kube ready
  • Loading branch information
deepanjan90 authored Jul 12, 2022
2 parents 919873f + cbf2fa5 commit a60ea11
Show file tree
Hide file tree
Showing 198 changed files with 7,738 additions and 4,074 deletions.
30 changes: 16 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,26 @@ configurations {
gyroDoclet
}

def azureSdkVersion = '1.31.0'
def azureSdkVersion = '1.41.2'

dependencies {
api 'gyro:gyro-core:0.99.6' + (releaseBuild ? '' : '-SNAPSHOT')
api 'gyro:gyro-core:1.1.2'

implementation 'com.psddev:dari-util:3.3.607-xe0f27a'
implementation 'com.google.guava:guava:23.0'
implementation 'com.microsoft.azure:adal4j:1.6.3'
implementation "com.microsoft.azure:azure:${azureSdkVersion}"
implementation "com.microsoft.azure:azure-mgmt-resources:${azureSdkVersion}"
implementation "com.microsoft.azure:azure-mgmt-network:${azureSdkVersion}"
implementation "com.microsoft.azure:azure-mgmt-compute:${azureSdkVersion}"
implementation "com.microsoft.azure:azure-mgmt-dns:${azureSdkVersion}"
implementation "com.microsoft.azure:azure-mgmt-storage:${azureSdkVersion}"
implementation 'com.github.seancfoley:ipaddress:5.0.2'
implementation 'org.reflections:reflections:0.9.10'

gyroDoclet 'gyro:gyro-doclet:0.99.1'
implementation 'com.google.guava:guava:31.1-jre'

implementation 'com.azure.resourcemanager:azure-resourcemanager:2.15.0'
implementation 'com.azure:azure-security-keyvault-certificates:4.3.2'
implementation 'com.azure:azure-data-tables:12.3.0'
implementation 'com.azure:azure-storage-queue:12.12.2'
implementation 'com.azure:azure-storage-file-share:12.12.2'
implementation 'com.azure:azure-storage-blob:12.16.1'
implementation 'com.azure:azure-security-keyvault-certificates:4.3.2'
implementation 'com.azure:azure-identity:1.5.1'
implementation 'com.azure:azure-core-http-okhttp:1.9.0'
runtimeOnly 'com.nimbusds:oauth2-oidc-sdk:9.35'

gyroDoclet 'gyro:gyro-doclet:1.0.0'
}

task referenceDocs(type: Javadoc) {
Expand Down
4 changes: 4 additions & 0 deletions examples/accessmanagement/application.gyro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
azure::application application-example
name: "application-example"
account-type: "AzureADMyOrg"
end
9 changes: 9 additions & 0 deletions examples/accessmanagement/serviceprincipal.gyro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
azure::application application-service-principal-example
name: "application-service-principal-example"
account-type: "AzureADMyOrg"
end

azure::service-principal service-principal-example
name: "application-service-principal-example"
application: $(azure::application application-service-principal-example)
end
105 changes: 105 additions & 0 deletions examples/containerservice/kubernetes-cluster.gyro
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
azure::resource-group resource-group-cluster-example
name: "resource-group-cluster-example"

tags: {
Name: "resource-group-cluster-example"
}
end

azure::network network-cluster-example
name: "network-cluster-example"
resource-group: $(azure::resource-group resource-group-cluster-example)
address-spaces: [
"10.0.0.0/8"
]

subnet
address-prefix: "10.240.0.0/16"
name: "subnet1"
end

tags: {
Name: "network-cluster-example"
}
end

azure::registry registry-example-cluster
name: "registryClusterExample"
sku: "Premium"
resource-group: $(azure::resource-group resource-group-cluster-example)
public-network-access: false
admin-user-enabled: false

tags: {
Name: "registry-example-cluster"
}
end

azure::public-ip-address public-ip-address-example-cluster
name: "public-ip-address-example-cluster"
resource-group: $(azure::resource-group resource-group-cluster-example)
idle-timeout-in-minute: 4
sku-type: "STANDARD"
tags: {
Name: "public-ip-address-example-cluster"
}
end

azure::kubernetes-cluster kubernetes-cluster-example
name: "kubernetes-cluster-example"
version: "1.22.4"
enable-private-cluster: false

resource-group: $(azure::resource-group resource-group-cluster-example)

linux-root-username: "adminuser"
ssh-key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDK/2jCF+4AF3aJ+d1f4yjVECuYaXYGj2z4Nu4nc6zFX1cgSm4ukI+CDlbbYjDGiHblkDbuGg067KsnjFAH6xrUpmOu4XO9NJz8GuCD0TEE+EG39PcpY1A+mfKyFNK7RvWpf2GB5nWXUvDzek1j9FqnRktE1Bj/Zyj2nBG/ymAZF+zHMgZ8PecDjdPeSSkUzkuMoOdNqjFXhRGd1p4upbVWtyq7rQHi1mPfEv7pllF8H48+nTFx5/crT7/AhOBtVpQJPM+bahy+4H2gF3Pek91v608DkbnjvszUmyhghHQOOnseIJ+bgJVumMNXwxATVAe/weqMAF/sGtJrkuBFJkl274TQzfmM+Z09YtuiIbBBCnwF1MeXC3Fbb3f8E7yFBJ3T8Mt9wxc9elDZA+ziFhHmQrMdfEyQiyq+h5Q+GMiXkAYk0Ikuc1MCprYkplb1aR5oOGVha6UFOu7NqRvrFjscVaetZ0UEHv0AZhb54N7/x6DPCwzTaw/3iYhhSu1we3k= generated-by-azure"

dns-prefix: "kubernetes-cluster-example-dns"
enable-rbac: true

agent-pool
name: "agentpool"
size: "Standard_DS2_v2"
count: 1
availability-zones: [1,2,3]
mode: "System"
auto-scaling-enabled: true
type: "VirtualMachineScaleSets"
os-type: "Linux"
os-disk-type: "Managed"
os-disk-size-in-gb: 128
node-size: 1
network: $(azure::network network-cluster-example)
subnet: "subnet1"
maximum-pods-per-node: 110
minimum-node-size: 1
maximum-node-size: 5
kubelet-disk-type: "OS"

tags: {
Name: "agentpool_primary"
}
end

network-profile
dns-service-ip: "10.0.0.10"
docker-bridge-cidr: "172.17.0.1/16"
service-cidr: "10.0.0.0/16"
load-balancer-sku: "Standard"
outbound-type: "loadBalancer"
network-plugin: "azure"

load-balancer-profile
outbound-ips
public-ips: [ $(azure::public-ip-address public-ip-address-example-cluster) ]
end

end
end

tags: {
Name: "kubernetes-cluster-example"
}

end
1 change: 0 additions & 1 deletion examples/dns/dns-zone.gyro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ end

azure::dns-zone dns-zone-example-zones
name: "zones.example.com"
public-access: false
resource-group: $(azure::resource-group resource-group-dns-zone-example)
tags: {
Name: "resource-group-dns-zone-example"
Expand Down
53 changes: 21 additions & 32 deletions examples/keyvault/certificate.gyro
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,30 @@ azure::key-vault-certificate vault-certificate-example
vault: $(azure::key-vault vault-example-certificate)

policy
key-properties
exportable: false
reuse-key: false
#size: 2048
#type: "RSA"
end
certificate-type: ""
content-type: "application/x-pkcs12"
transparent: false
key-curve-name: "P-256"
key-size: 2048
validity-in-months: 2
enabled: false
enhanced-key-usage: []
exportable: false
key-reusable: false
key-usage: ["digitalSignature", "keyEncipherment"]
key-type: "RSA"
subject: "CN=a1.com"

lifetime-action
action
type: "EmailContacts"
end

trigger
lifetime-percentage: 90
end
action: "EmailContacts"
days-before-expiring: 356
lifetime-percentage: 90
end

secret-properties
content-type: "application/x-pkcs12"
end

x509-properties
key-usage: ["digitalSignature", "keyEncipherment"]
subject: "CN=a1.com"
validity-in-months: 2
ekus: ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"]
end

attribute
"enabled" : true
"expires" : "2020-04-03T15:54:12.000Z"
end

issuer-parameter
name: "Self"
subject-alternative-name
email: [""]
dns-names: [""]
upns: [""]
end
end
end
end
6 changes: 3 additions & 3 deletions examples/keyvault/key.gyro
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ azure::key-vault-key vault-key-example

attribute
enabled : false
expires : "2020-04-04T15:54:12.000Z"
not-before : "2020-04-02T15:54:12.000Z"
expires : "2020-04-04T15:54:12Z"
not-before : "2020-04-02T15:54:12Z"
end

tags: {
Name: "vault-key-examples"
}
end
end
4 changes: 2 additions & 2 deletions examples/keyvault/secret.gyro
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ azure::key-vault-secret vault-secret-example

attribute
enabled : true
expires : "2020-04-04T15:54:12.000Z"
not-before : "2020-04-02T15:54:12.000Z"
expires : "2020-04-04T15:54:12Z"
not-before : "2020-04-02T15:54:12Z"
end

tags: {
Expand Down
27 changes: 27 additions & 0 deletions examples/registries/registry.gyro
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
azure::resource-group resource-group-registry-example
name: "resource-group-registry-example"

tags: {
Name: "resource-group-registry-example"
}
end

azure::registry registry-example
name: "registryExample"
sku: "Premium"
resource-group: $(azure::resource-group resource-group-registry-example)
public-network-access: false
admin-user-enabled: false

tags: {
Name: "registry-example"
}

webhook
name: "testWebhook"
actions: ["push"]
enabled: true
service-uri: "https://www.google.com"
repository-scope: "foo:*"
end
end
19 changes: 7 additions & 12 deletions examples/storage/cloud-blob-container.gyro
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,19 @@ end

azure::storage-account blob-storage-account-example
resource-group: $(azure::resource-group blob-resource-group)
name: "testblobexample"

cors-rule
allowed-headers: ["*"]
allowed-methods: ["POST"]
allowed-origins: ["*"]
exposed-headers: ["*"]
max-age: 6
type: "blob"
end
name: "testblobexampledj"

tags: {
Name: "testblobexample"
Name: "testblobexampledj"
}
end

azure::cloud-blob-container blob-container-example
name: "blobcontainerexample"
public-access: "CONTAINER"
public-access: "container"
storage-account: $(azure::storage-account blob-storage-account-example)

metadata: {
Name: blob-container-example
}
end
5 changes: 2 additions & 3 deletions examples/storage/cloud-blob.gyro
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ end

azure::cloud-blob-container blob-container-example
name: "blobcontainer"
public-access: "CONTAINER"
public-access: "container"
storage-account: $(azure::storage-account blob-storage-account-example)
end

azure::cloud-blob blob-example
blob-directory-path: "/path/to/blob"
blob-path: "path/to/blob"
container: $(azure::cloud-blob-container blob-container-example)
file-path: "test-blob-doc.txt"
storage-account: $(azure::storage-account blob-storage-account-example)
end
36 changes: 0 additions & 36 deletions examples/storage/cloud-file-directory.gyro

This file was deleted.

Loading

0 comments on commit a60ea11

Please sign in to comment.