Skip to content

Commit

Permalink
Testing further
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrencegripper committed Mar 29, 2019
1 parent 10b595d commit 4b0c855
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 40 deletions.
13 changes: 12 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"name": "Launch K3s",
"type": "go",
"request": "launch",
"mode": "test",
Expand All @@ -15,6 +15,17 @@
"KUBECONFIG": "/etc/rancher/k3s/k3s.yaml",
},
"args": ["-test.v"]
},
{
"name": "Launch KubeContext current",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceRoot}/kubernetes/.",
"env": {
"TF_ACC": 1,
},
"args": ["-test.v"]
}
]
}
40 changes: 40 additions & 0 deletions _examples/crds/basic_crd.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
provider "k8sraw" {}


resource "k8sraw_yaml" "crd" {
# depends_on = ["k8sraw_yaml.definecrd"]
yaml_body = <<YAML
apiVersion: "stable.example.com/v1"
kind: CronTab
metadata:
name: my-new-cron-object
spec:
cronSpec: "* * * * /5"
image: my-awesome-cron-image
YAML
}

# resource "k8sraw_yaml" "definecrd" {
# yaml_body = <<YAML
# apiVersion: apiextensions.k8s.io/v1beta1
# kind: CustomResourceDefinition
# metadata:
# name: crontabs.stable.example.com
# spec:
# group: stable.example.com
# conversion:
# strategy: None
# scope: Namespaced
# names:
# plural: crontabs
# singular: crontab
# kind: CronTab
# shortNames:
# - ct
# version: v1
# versions:
# - name: v1
# served: true
# storage: true
# YAML
# }
39 changes: 0 additions & 39 deletions _examples/crds/basic_crd.tfw

This file was deleted.

1 change: 1 addition & 0 deletions kubernetes/resource_kubernetes_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func resourceKubernetesYAMLRead(d *schema.ResourceData, meta interface{}) error
if err != nil {
return err
}

d.Set("live_yaml_incluster", getMD5Hash(builder.String()))

return nil
Expand Down

0 comments on commit 4b0c855

Please sign in to comment.