Created
May 3, 2020 22:35
-
-
Save rafaribe/b79c2528c0e5df4be02aa578b8d30f24 to your computer and use it in GitHub Desktop.
Example of Pihole Config
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 { Pihole, StorageOptions, PiholeInputs } from 'pulumi-pihole'; | |
import * as k8s from '@pulumi/kubernetes'; | |
const piholeStorageArgs: StorageOptions = { | |
storageClass: 'sc-rafak3s', | |
storageNode: 'rafak3s', | |
storageSize: '1Gi', | |
accessModes: ['ReadWriteOnce'], | |
persistentVolumeReclaimPolicy: 'Retain', | |
localVolumePaths: { | |
etcLocalPath: '/mnt/data/pv-001', | |
dnsmasqLocalPath: 'mnt/data/pv-002', | |
}, | |
}; | |
const piholeInputs: PiholeInputs = { | |
namespace: 'pihole', | |
loadBalancerIP: '192.168.1.250', | |
storageOptions: piholeStorageArgs, | |
password: 'password', | |
generateYAMLToFolder: 'yaml', | |
}; | |
//need to define the password via: | |
//pulumi set config piholepassword--secret | |
const provider = new k8s.Provider('templatingYaml', { | |
context: 'invalid-context-disabling-default-provider', | |
renderYamlToDirectory: 'yaml', | |
}); | |
const pihole = new Pihole('pihole-test', piholeInputs, { providers: { kubernetes: provider } }); | |
//const metallb = new MetalLb('metallb', 'v0.8.2'); | |
//export const configMapData = metallb.configMap.data; | |
export const piholeIP = pihole.services[0].spec.loadBalancerIP; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment